From d2f85f666b8f9af84caea1d3b41d5df8a3c4d68c Mon Sep 17 00:00:00 2001 From: Packit Service Date: Jan 29 2021 22:21:58 +0000 Subject: pandoc-2.0.6 base --- diff --git a/AUTHORS.md b/AUTHORS.md new file mode 100644 index 0000000..16c2a3e --- /dev/null +++ b/AUTHORS.md @@ -0,0 +1,195 @@ +# Contributors + +- Arata Mizuki +- Aaron Wolen +- Albert Krewinkel +- Alex Ivkin +- Alex Vong +- Alexander Kondratskiy +- Alexander Krotov +- Alexander Sulfrian +- Alexander V Vershilov +- Alfred Wechselberger +- Andreas Lööw +- Andrew Dunning +- Antoine Latter +- Arata Mizuki +- Arlo O'Keeffe +- Artyom Kazak +- Agustín Martín Barbero +- B. Scott Michel +- Ben Firshman +- Ben Gamari +- Beni Cherniavsky-Paskin +- Benoit Schweblin +- Bjorn Buckwalter +- Bradley Kuhn +- Brent Yorgey +- Bryan O'Sullivan +- Caleb McDaniel +- Calvin Beck +- Carlos Sosa +- Chris Black +- Christian Conkle +- Christoffer Ackelman +- Christoffer Sawicki +- Clare Macrae +- Clint Adams +- Conal Elliott +- Craig S. Bosma +- Daniel Bergey +- Daniel T. Staal +- Daniele D'Orazio +- David A Roberts +- David Lazar +- David Röthlisberger +- Denis Laxalde +- Douglas Calvert +- Emanuel Evans +- Emily Eisenberg +- Eric Kow +- Eric Seidel +- Felix Yan +- Florian Eitel +- François Gannaz +- Freiric Barral +- Freirich Raabe +- Frerich Raabe +- Fyodor Sheremetyev +- Gabor Pali +- Gavin Beatty +- Gottfried Haider +- Greg Maslov +- Greg Rundlett +- Grégory Bataille +- Gwern Branwen +- Hamish Mackenzie +- Hans-Peter Deifel +- Henrik Tramberend +- Henry de Valence +- Hubert Plociniczak +- Ilya V. Portnov +- Ivo Clarysse +- J. Lewis Muir +- Jaime Marquínez Ferrándiz +- Jakob Voß +- James Aspnes +- Jamie F. Olson +- Jan Larres +- Jan Schulz +- Jason Ronallo +- Jeff Arnold +- Jeff Runningen +- Jens Getreu +- Jens Petersen +- Jesse Rosenthal +- Joe Hillenbrand +- John MacFarlane +- John Muccigrosso +- John Luke Bentley +- Jonas Smedegaard +- Jonathan Daugherty +- Jose Luis Duran +- Josef Svenningsson +- Julien Cretel +- Juliusz Gonera +- Justin Bogner +- Jérémy Bobbio +- Keiichiro Shikano +- Kelsey Hightower +- Kolen Cheung +- Konstantin Zudov +- Kristof Bastiaensen +- Herwig Stuetz +- Lars-Dominik Braun +- Luke Plant +- Marc Schreiber +- Mark Szepieniec +- Mark Wright +- Martin Linn +- Masayoshi Takahashi +- Matej Kollar +- Mathias Schenner +- Mathieu Duponchelle +- Matthew Eddey +- Matthew Pickering +- Matthias C. M. Troffaes +- Mauro Bieg +- Max Bolingbroke +- Max Rydahl Andersen +- Merijn Verstraaten +- Michael Beaumont +- Michael Chladek +- Michael Snoyman +- Michael Thompson +- MinRK +- Morton Fox +- Nathan Gass +- Neil Mayhew +- Nick Bart +- Nicolas Kaiser +- Nikolay Yakimov +- Oliver Matthews +- Ophir Lifshitz +- Or Neeman +- Pablo Rodríguez +- Paul Rivier +- Paulo Tanimoto +- Peter Wang +- Philippe Ombredanne +- Phillip Alday +- Prayag Verma +- Puneeth Chaganti +- Ralf Stephan +- Raniere Silva +- Recai Oktaş +- Roland Hieber +- RyanGlScott +- Sascha Wilde +- Scott Morrison +- Sergei Trofimovich +- Sergey Astanin +- Shahbaz Youssefi +- Shaun Attfield +- Sidarth Kapur +- Sidharth Kapur +- Simon Hengel +- Stefan Dresselhaus +- Sumit Sahrawat +- Thenaesh Elango +- Thomas Hodgson +- Thomas Weißschuh +- Tim Lin +- Timm Albers +- Timothy Humphries +- Tiziano Müller +- Todd Sifleet +- Tom Leese +- Uli Köhler +- Václav Zeman +- Viktor Kronvall +- Vincent +- Václav Haisman +- Václav Zeman +- Wandmalfarbe +- Waldir Pimenta +- Wikiwide +- Xavier Olive +- Yuchen Pei +- bucklereed +- bumper314 +- csforste +- d-dorazio +- iandol +- infinity0x +- lwolfsonkin +- nkalvi +- qerub +- robabla +- roblabla +- rodja.trappe +- rski +- shreevatsa.public +- takahashim +- tgkokk +- thsutton diff --git a/BUGS b/BUGS new file mode 100644 index 0000000..037e4c7 --- /dev/null +++ b/BUGS @@ -0,0 +1,4 @@ +To view a list of known bugs, or to enter a bug report, please use +Pandoc's issue tracker: . + +See also CONTRIBUTING.md. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..c104c73 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,330 @@ +Contributing to pandoc +====================== + +Have a question? +---------------- + +Ask on [pandoc-discuss]. + + +Found a bug? +------------ + +Bug reports are welcome! Please report all bugs on pandoc's github +[issue tracker]. + +Before you submit a bug report, search the [open issues] *and* [closed issues] +to make sure the issue hasn't come up before. Also, check the [User's Guide] and +[FAQs] for anything relevant. + +Make sure you can reproduce the bug with the [latest released version] of pandoc +(or, even better, the [development version]). + +Your report should give detailed, *reproducible* instructions, including + + * the pandoc version (check using `pandoc -v`) + * the exact command line used + * the exact input used + * the output received + * the output you expected instead + +A small test case (just a few lines) is ideal. If your input is large, +try to whittle it down to a *minimum working example*. + +Out of scope? +------------- + +A less than perfect conversion does not necessarily mean there's +a bug in pandoc. Quoting from the MANUAL: + +> Because pandoc's intermediate representation of a document is less +> expressive than many of the formats it converts between, one should +> not expect perfect conversions between every format and every other. +> Pandoc attempts to preserve the structural elements of a document, but +> not formatting details such as margin size. And some document elements, +> such as complex tables, may not fit into pandoc's simple document +> model. While conversions from pandoc's Markdown to all formats aspire +> to be perfect, conversions from formats more expressive than pandoc's +> Markdown can be expected to be lossy. + +For example, both `docx` and `odt` formats can represent margin size, but +because pandoc's internal document model does not contain a representation of +margin size, this information will be lost on converting from docx +to `odt`. (You can, however, customize margin size using `--reference-doc`.) + +So before submitting a bug report, consider whether it might be +"out of scope." If it concerns a feature of documents that isn't +representable in pandoc's Markdown, then it very likely is. +(If in doubt, you can always ask on [pandoc-discuss].) + +Fixing bugs from the issue tracker +---------------------------------- + +Almost all the bugs on the issue tracker have one or more associated +tags. These are used to indicate the *complexity* and *nature* of a +bug. There is not yet a way to indicate priority. An up to date +summary of issues can be found on [GitHub labels]. + +* [beginner-friendly] — The perfect starting point for new contributors. The + issue is generic and can be resolved without deep knowledge of the code + base. +* [enhancement] — A feature which would be desirable. We recommend + you discuss any proposed enhancement on pandoc-discuss before + writing code. +* [bug] — A problem which needs to be fixed. +* [complexity:low] — The fix should only be a couple of lines. +* [complexity:high] — The fix might require structural changes or in depth + knowledge of the code base. +* [new:reader] — A request to add a new input format. +* [new:writer] — A request to add a new output format. +* [docs] — A discrepancy, or ambiguity in the documentation. +* [status:in-progress] — Someone is actively working on or planning to work on the + ticket. +* [status:more-discussion-needed] — It is unclear what the correct approach + to solving the ticket is. Before starting on tickets such as this it + would be advisable to post on the ticket. +* [status:more-info-needed] — We require more information from a user before + we can classify a report properly. + +Issues related to a specific format are tagged accordingly, e.g. feature request +or bug reports related to Markdown are labelled with [format:markdown]. + +Have an idea for a new feature? +------------------------------- + +First, search [pandoc-discuss] and the issue tracker (both [open issues] *and* +[closed issues]) to make sure that the idea has not been discussed before. + +Explain the rationale for the feature you're requesting. Why would this +feature be useful? Consider also any possible drawbacks, including backwards +compatibility, new library dependencies, and performance issues. + +It is best to discuss a potential new feature on [pandoc-discuss] +before opening an issue. + +Patches and pull requests +------------------------- + +Patches and pull requests are welcome. Before you put time into a nontrivial +patch, it is a good idea to discuss it on [pandoc-discuss], especially if it is +for a new feature (rather than fixing a bug). + +Please follow these guidelines: + +1. Each patch (commit) should make a single logical change (fix a bug, add + a feature, clean up some code, add documentation). Everything + related to that change should be included (including tests and + documentation), and nothing unrelated should be included. + +2. The first line of the commit message should be a short description + of the whole commit (ideally <= 50 characters). Then there should + be a blank line, followed by a more detailed description of the + change. + +3. Follow the stylistic conventions you find in the existing + pandoc code. Use spaces, not tabs, and wrap code to 80 columns. + Always include type signatures for top-level functions. + Consider installing [EditorConfig], this will help you to follow the + coding style prevalent in pandoc. + +4. Your code should compile without warnings (`-Wall` clean). + +5. Run the tests to make sure your code does not introduce new bugs. + (See below under [Tests](#tests).) All tests should pass. + +6. It is a good idea to add test cases for the bug you are fixing. (See + below under [Tests](#tests).) If you are adding a new writer or reader, + you must include tests. + +7. If you are adding a new feature, include updates to `MANUAL.txt`. + +8. All code must be released under the general license governing pandoc + (GPL v2). + +9. It is better not to introduce new dependencies. Dependencies on + external C libraries should especially be avoided. + +10. We aim for compatibility with ghc versions from 7.8.3 to the + latest release. All pull requests and commits are tested + automatically on , using GHC versions in the + `Tested-With` stanza of `pandoc.cabal`. We currently relax + the "`-Wall` clean" requirement for GHC 7.10.x, because + there are so many warnings relating to the addition of type + classes to the Prelude. + +Tests +----- + +Tests can be run as follows: + + cabal install --only-dependencies --enable-tests + cabal configure --enable-tests + cabal build + cabal test + +or, if you're using [stack], + + stack setup + stack test + +The test program is `test/test-pandoc.hs`. + +Benchmarks +---------- + +To run benchmarks with cabal: + + cabal configure --enable-benchmarks + cabal build + cabal bench + +With stack: + + stack bench + +You can also build pandoc with the `weigh-pandoc` flag and +run `weigh-pandoc` to get some statistics on memory usage. +(Eventually this should be incorporated into the benchmark +suite.) + +Using the REPL +-------------- + +With a recent version of cabal, you can do `cabal repl` and get +a ghci REPL for working with pandoc. With [stack], use +`cabal ghci`. + +We recommend using the following `.ghci` file (which can be +placed in the source directory): + + :set -fobject-code + :set -XTypeSynonymInstances + :set -XScopedTypeVariables + :set -XOverloadedStrings + +Profiling +--------- + +To use the GHC profiler with cabal: + + cabal clean + cabal install --enable-library-profiling --enable-executable-profiling + pandoc +RTS -p -RTS [file]... + less pandoc.prof + +With stack: + + stack clean + stack install --profile + pandoc +RTS -p -RTS [file]... + less pandoc.prof + +Templates +--------- + +The default templates live in `data/templates`, which is a git +subtree linked to . +The purpose of maintaining a separate repository is to allow +people to maintain variant templates as a fork. + +You can modify the templates and submit patches without worrying +much about this: when these patches are merged, we will +push them to the main templates repository by doing + + git subtree push --prefix=data/templates templates master + +where `templates` is a remote pointing to the templates +repository. + +The code +-------- + +Pandoc has a publicly accessible git repository on +github: . To get a local copy of the source: + + git clone https://github.com/jgm/pandoc.git + +The source for the main pandoc program is `pandoc.hs`. The source for +the pandoc library is in `src/`, the source for the tests is in +`test/`, and the source for the benchmarks is in `benchmark/`. + +The modules `Text.Pandoc.Definition`, `Text.Pandoc.Builder`, and +`Text.Pandoc.Generic` are in a separate library `pandoc-types`. The code can +be found in . + +To build pandoc, you will need a working installation of the +[Haskell platform]. + +The library is structured as follows: + + - `Text.Pandoc` is a top-level module that exports what is needed + by most users of the library. Any patches that add new readers + or writers will need to make changes here, too. + - `Text.Pandoc.Definition` (in `pandoc-types`) defines the types + used for representing a pandoc document. + - `Text.Pandoc.Builder` (in `pandoc-types`) provides functions for + building pandoc documents programatically. + - `Text.Pandoc.Generics` (in `pandoc-types`) provides functions allowing + you to promote functions that operate on parts of pandoc documents + to functions that operate on whole pandoc documents, walking the + tree automatically. + - `Text.Pandoc.Readers.*` are the readers, and `Text.Pandoc.Writers.*` + are the writers. + - `Text.Pandoc.Biblio` is a utility module for formatting citations + using citeproc-hs. + - `Text.Pandoc.Data` is used to embed data files when the `embed_data_files` + cabal flag is used. It is generated from `src/Text/Pandoc/Data.hsb` using + the preprocessor [hsb2hs]. + - `Text.Pandoc.Highlighting` contains the interface to the + skylighting library, which is used for code syntax highlighting. + - `Text.Pandoc.ImageSize` is a utility module containing functions for + calculating image sizes from the contents of image files. + - `Text.Pandoc.MIME` contains functions for associating MIME types + with extensions. + - `Text.Pandoc.Options` defines reader and writer options. + - `Text.Pandoc.PDF` contains functions for producing a PDF from a + LaTeX source. + - `Text.Pandoc.Parsing` contains parsing functions used in multiple readers. + - `Text.Pandoc.Pretty` is a pretty-printing library specialized to + the needs of pandoc. + - `Text.Pandoc.SelfContained` contains functions for making an HTML + file "self-contained," by importing remotely linked images, CSS, + and JavaScript and turning them into `data:` URLs. + - `Text.Pandoc.Shared` is a grab-bag of shared utility functions. + - `Text.Pandoc.Writers.Shared` contains utilities used in writers only. + - `Text.Pandoc.Slides` contains functions for splitting a markdown document + into slides, using the conventions described in the MANUAL. + - `Text.Pandoc.Templates` defines pandoc's templating system. + - `Text.Pandoc.UTF8` contains functions for converting text to and from + UTF8 bytestrings (strict and lazy). + - `Text.Pandoc.Asciify` contains functions to derive ascii versions of + identifiers that use accented characters. + - `Text.Pandoc.UUID` contains functions for generating UUIDs. + - `Text.Pandoc.XML` contains functions for formatting XML. + +[open issues]: https://github.com/jgm/pandoc/issues +[closed issues]: https://github.com/jgm/pandoc/issues?q=is%3Aissue+is%3Aclosed +[latest released version]: https://github.com/jgm/pandoc/releases/latest +[development version]: https://github.com/pandoc-extras/pandoc-nightly/releases/latest +[pandoc-discuss]: http://groups.google.com/group/pandoc-discuss +[issue tracker]: https://github.com/jgm/pandoc/issues +[User's Guide]: http://pandoc.org/MANUAL.html +[FAQs]: http://pandoc.org/faqs.html +[EditorConfig]: http://editorconfig.org/ +[Haskell platform]: http://www.haskell.org/platform/ +[hsb2hs]: http://hackage.haskell.org/package/hsb2hs +[GitHub labels]: https://github.com/jgm/pandoc/labels +[beginner-friendly]: https://github.com/jgm/pandoc/labels/beginner-friendly +[enhancement]: https://github.com/jgm/pandoc/labels/enhancement +[bug]: https://github.com/jgm/pandoc/labels/bug +[complexity:low]: https://github.com/jgm/pandoc/labels/complexity:low +[complexity:high]: https://github.com/jgm/pandoc/labels/complexity:high +[docs]: https://github.com/jgm/pandoc/labels/docs +[format:markdown]: https://github.com/jgm/pandoc/labels/format:markdown +[new:reader]: https://github.com/jgm/pandoc/labels/new:reader +[new:writer]: https://github.com/jgm/pandoc/labels/new:writer +[status:in-progress]: https://github.com/jgm/pandoc/labels/status:in-progress +[status:more-discussion-needed]: https://github.com/jgm/pandoc/labels/status:more-discussion-needed +[status:more-info-needed]: https://github.com/jgm/pandoc/labels/status:more-info-needed +[stack]: https://github.com/commercialhaskell/stack + diff --git a/COPYING.md b/COPYING.md new file mode 100644 index 0000000..af5153d --- /dev/null +++ b/COPYING.md @@ -0,0 +1,361 @@ +### GNU GENERAL PUBLIC LICENSE + +Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +### Preamble + +The licenses for most software are designed to take away your freedom +to share and change it. By contrast, the GNU General Public License is +intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + +To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if +you distribute copies of the software, or if you modify it. + +For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + +We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + +Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, +we want its recipients to know that what they have is not the +original, so that any problems introduced by others will not reflect +on the original authors' reputations. + +Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at +all. + +The precise terms and conditions for copying, distribution and +modification follow. + +### TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +**0.** This License applies to any program or other work which +contains a notice placed by the copyright holder saying it may be +distributed under the terms of this General Public License. The +"Program", below, refers to any such program or work, and a "work +based on the Program" means either the Program or any derivative work +under copyright law: that is to say, a work containing the Program or +a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is +included without limitation in the term "modification".) Each licensee +is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the Program +(independent of having been made by running the Program). Whether that +is true depends on what the Program does. + +**1.** You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a +fee. + +**2.** You may modify your copy or copies of the Program or any +portion of it, thus forming a work based on the Program, and copy and +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 +including an appropriate copyright notice and a notice that there is +no warranty (or else, saying that you provide a warranty) and that +users may redistribute the program under these conditions, and telling +the user how to view a copy of this License. (Exception: if the +Program itself is interactive but does not normally print such an +announcement, your work based on the Program is not required to print +an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + +**3.** You may copy and distribute the Program (or a work based on it, +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 +copy of the corresponding source code, to be distributed under the +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 +program in object code or executable form with such an offer, in +accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + +**4.** You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt otherwise +to copy, modify, sublicense or distribute the Program is void, and +will automatically terminate your rights under this License. However, +parties who have received copies, or rights, from you under this +License will not have their licenses terminated so long as such +parties remain in full compliance. + +**5.** You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +**6.** Each time you redistribute the Program (or any work based on +the Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + +**7.** If, as a consequence of a court judgment or allegation of +patent infringement or for any other reason (not limited to patent +issues), conditions are imposed on you (whether by court order, +agreement or otherwise) that contradict the conditions of this +License, they do not excuse you from the conditions of this License. +If you cannot distribute so as to satisfy simultaneously your +obligations under this License and any other pertinent obligations, +then as a consequence you may not distribute the Program at all. For +example, if a patent license would not permit royalty-free +redistribution of the Program by all those who receive copies directly +or indirectly through you, then the only way you could satisfy both it +and this License would be to refrain entirely from distribution of the +Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + +**8.** If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + +**9.** The Free Software Foundation may publish revised and/or new +versions of the General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Program does not specify a +version number of this License, you may choose any version ever +published by the Free Software Foundation. + +**10.** If you wish to incorporate parts of the Program into other +free programs whose distribution conditions are different, write to +the author to ask for permission. For software which is copyrighted by +the Free Software Foundation, write to the Free Software Foundation; +we sometimes make exceptions for this. Our decision will be guided by +the two goals of preserving the free status of all derivatives of our +free software and of promoting the sharing and reuse of software +generally. + +**NO WARRANTY** + +**11.** BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +**12.** IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + +### END OF TERMS AND CONDITIONS + +### How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these +terms. + +To do so, attach the following notices to the program. It is safest to +attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + one line to give the program's name and an idea of what it does. + Copyright (C) yyyy name of author + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2 + of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +Also add information on how to contact you by electronic and paper +mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + 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' + for details. + +The hypothetical commands \`show w' and \`show c' should show the +appropriate parts of the General Public License. Of course, the +commands you use may be called something other than \`show w' and +\`show c'; they could even be mouse-clicks or menu items--whatever +suits your program. + +You should also get your employer (if you work as a programmer) or +your school, if any, to sign a "copyright disclaimer" for the program, +if necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright + interest in the program `Gnomovision' + (which makes passes at compilers) written + by James Hacker. + + signature of Ty Coon, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, +you may consider it more useful to permit linking proprietary +applications with the library. If this is what you want to do, use the +[GNU Lesser General Public +License](http://www.gnu.org/licenses/lgpl.html) instead of this +License. \ No newline at end of file diff --git a/COPYRIGHT b/COPYRIGHT new file mode 100644 index 0000000..10e33eb --- /dev/null +++ b/COPYRIGHT @@ -0,0 +1,186 @@ +Pandoc +Copyright (C) 2006-2017 John MacFarlane + +With the exceptions noted below, this code is released under the [GPL], +version 2 or later: + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +The GNU General Public License is available in the file COPYING.md in +the source distribution. On Debian systems, the complete text of the +GPL can be found in `/usr/share/common-licenses/GPL`. + +[GPL]: http://www.gnu.org/copyleft/gpl.html + +Pandoc's complete source code is available from the [Pandoc home page]. + +[Pandoc home page]: http://pandoc.org + +Pandoc includes some code with different copyrights, or subject to different +licenses. The copyright and license statements for these sources are included +below. All are GPL-compatible licenses. + +---------------------------------------------------------------------- +The modules in the `pandoc-types` repository (Text.Pandoc.Definition, +Text.Pandoc.Builder, Text.Pandoc.Generics, Text.Pandoc.JSON, +Text.Pandoc.Walk) are licensed under the BSD 3-clause license: + +Copyright (c) 2006-2017, John MacFarlane + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + * Neither the name of John MacFarlane nor the names of other + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +---------------------------------------------------------------------- +Pandoc's templates (in `data/templates`) are dual-licensed GPL (v2 or +higher, same as pandoc) and the BSD 3-clause license. + +Copyright (c) 2014--2017, John MacFarlane + +---------------------------------------------------------------------- +src/Text/Pandoc/Writers/Muse.hs +Copyright (C) 2017 Alexander Krotov + +Released under the GNU General Public License version 2 or later. + +---------------------------------------------------------------------- +src/Text/Pandoc/Writers/Texinfo.hs +Copyright (C) 2008-2017 John MacFarlane and Peter Wang + +Released under the GNU General Public License version 2 or later. + +---------------------------------------------------------------------- +src/Text/Pandoc/Writers/OpenDocument.hs +Copyright (C) 2008-2017 Andrea Rossato and John MacFarlane + +Released under the GNU General Public License version 2 or later. + +---------------------------------------------------------------------- +src/Text/Pandoc/Writers/Org.hs +Copyright (C) 2010-2017 Puneeth Chaganti, John MacFarlane, and + Albert Krewinkel + +Released under the GNU General Public License version 2 or later. + +---------------------------------------------------------------------- +src/Text/Pandoc/Writers/ZimWiki.hs +Copyright (C) 2017 Alex Ivkin + +Released under the GNU General Public License version 2 or later. + +---------------------------------------------------------------------- +src/Text/Pandoc/Readers/Docx.hs +src/Text/Pandoc/Readers/Docx/* +Copyright (C) 2014-2017 Jesse Rosenthal + +Released under the GNU General Public License version 2 or later. + +---------------------------------------------------------------------- +src/Text/Pandoc/Readers/Textile.hs +Copyright (C) 2010-2017 Paul Rivier and John MacFarlane + +Released under the GNU General Public License version 2 or later. + +---------------------------------------------------------------------- +src/Text/Pandoc/Readers/Org.hs +test/Tests/Readers/Org.hs +Copyright (C) 2014-2017 Albert Krewinkel + +Released under the GNU General Public License version 2 or later. + +---------------------------------------------------------------------- +data/LaTeXMathML.js +Adapted by Jeff Knisely and Douglas Woodall from +ASCIIMathML.js v. 1.4.7 +Copyright (C) 2005 Peter Jipsen + +Released under the GNU General Public License version 2 or later. + +---------------------------------------------------------------------- +data/MathMLinHTML.js +Copyright (C) 2004 Peter Jipsen http://www.chapman.edu/~jipsen + +Released under the GNU General Public License version 2 or later. + +------------------------------------------------------------------------ +data/pandoc.lua +Copyright (C) 2017 Albert Krewinkel + +Released under the GNU General Public License version 2 or later. + +---------------------------------------------------------------------- +The dzslides template contains JavaScript and CSS from Paul Rouget's +dzslides template. +http://github.com/paulrouget/dzslides + +Released under the Do What the Fuck You Want To Public License. + +------------------------------------------------------------------------ +Pandoc embeds a lua interpreter (via hslua). + +Copyright © 1994–2015 Lua.org, PUC-Rio. + +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. + +------------------------------------------------------------------------ +The template pandoc.jats is Copyright 2013--15 Martin Fenner, +released under GPL version 2 or later. + +The file data/jats.csl is derived from a csl file by Martin Fenner, +revised by Martin Paul Eve and then John MacFarlane. +"This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 +License. Originally by Martin Fenner." diff --git a/INSTALL.md b/INSTALL.md new file mode 100644 index 0000000..aae6308 --- /dev/null +++ b/INSTALL.md @@ -0,0 +1,334 @@ +# Installing pandoc + +## Windows + + - There is a package installer at pandoc's [download page]. + This will install pandoc, replacing older versions, and + update your path to include the directory where pandoc's + binaries are installed. + + - If you prefer not to use the msi installer, we also provide + a zip file that contains pandoc's binaries and + documentation. Simply unzip this file and move the binaries + to a directory of your choice. + + - For PDF output, you'll also need to install LaTeX. + We recommend [MiKTeX](http://miktex.org/). + +## macOS + + - You can install pandoc using + [homebrew](http://brew.sh): `brew install pandoc`. + + - There is a package installer at pandoc's [download page]. + If you later want to uninstall the package, you can do so + by downloading [this script][uninstaller] + and running it with `perl uninstall-pandoc.pl`. + + - We also provide a zip file containing the binaries and man + pages, for those who prefer not to use the installer. Simply + unzip the file and move the binaries and man pages to + whatever directory you like. + + - For PDF output, you'll also need LaTeX. Because a full [MacTeX] + installation takes more than a gigabyte of disk space, we recommend + installing [BasicTeX](http://www.tug.org/mactex/morepackages.html) + (64M) and using the `tlmgr` tool to install additional packages + as needed. If you get errors warning of fonts not found, try + + tlmgr install collection-fontsrecommended + +## Linux + + - First, try your package manager. + Pandoc is in the [Debian], [Ubuntu], [Slackware], + [Arch], [Fedora], [NiXOS], [openSUSE], and [gentoo] repositories. + Note, however, that versions in the repositories are often + old. + + - We provide a binary package for amd64 architecture on + the [download page]. This provides both `pandoc` and + `pandoc-citeproc`. The executables are statically linked and + have no dynamic dependencies or dependencies on external + data files. Note: because of the static + linking, the pandoc binary from this package cannot use lua + filters that require external lua modules written in C. + + Both a tarball and a deb installer are provided. To install the deb: + + sudo dpkg -i $DEB + + where `$DEB` is the path to the downloaded deb. This will + install the `pandoc` and `pandoc-citeproc` executables and + man pages. + + If you use an RPM-based distro, you may be able to install + the deb from our download page using `alien`. + + On any distro, you may install from the tarball into `$DEST` + (say, `/usr/local/` or `$HOME/.local`) by doing + + tar xvzf $TGZ --strip-components 1 -C $DEST + + where `$TGZ` is the path to the downloaded zipped tarball. + For Pandoc versions before 2.0, which don't provide + a tarball, try instead + + ar p $DEB data.tar.gz | tar xvz --strip-components 2 -C $DEST + + - You can also install from source, using the + instructions below under [Compiling from source]. + Note that most distros have the Haskell platform in their + package repositories. For example, on Debian/Ubuntu, + you can install it with `apt-get install haskell-platform`. + + - For PDF output, you'll need LaTeX. We recommend installing + [TeX Live](http://www.tug.org/texlive/) via your package + manager. (On Debian/Ubuntu, `apt-get install texlive`.) + +## BSD + + - Pandoc is in the [NetBSD] and [FreeBSD ports] repositories. + +## Compiling from source + +If for some reason a binary package is not available for your +platform, or if you want to hack on pandoc or use a non-released +version, you can install from source. + +### Getting the pandoc source code + +Source tarballs can be found at +. For example, to +fetch the source for version 1.17.0.3: + + wget https://hackage.haskell.org/package/pandoc-1.17.0.3/pandoc-1.17.0.3.tar.gz + tar xvzf pandoc-1.17.0.3.tar.gz + cd pandoc-1.17.0.3 + +Or you can fetch the development code by cloning the repository: + + git clone https://github.com/jgm/pandoc + cd pandoc + +Note: there may be times when the development code is broken +or depends on other libraries which must be installed +separately. Unless you really know what you're doing, install +the last released version. + +### Quick stack method + +The easiest way to build pandoc from source is to use [stack]: + +1. Install [stack]. + +2. Change to the pandoc source directory and issue the following commands: + + stack setup + stack install --test + + `stack setup` will automatically download the ghc compiler + if you don't have it. `stack install` will install the + `pandoc` executable into `~/.local/bin`, which you should + add to your `PATH`. This process will take a while, and + will consume a considerable amount of disk space. + +### Quick cabal method + +1. Install the [Haskell platform]. This will give you [GHC] and + the [cabal-install] build tool. Note that pandoc requires + GHC >= 7.8. + +2. Update your package database: + + cabal update + +3. Use `cabal` to install pandoc and its dependencies: + + cabal install pandoc --enable-tests + + This procedure will install the released version of pandoc, + which will be downloaded automatically from HackageDB. + + If you want to install a modified or development version + of pandoc instead, switch to the source directory and do + as above, but without the 'pandoc': + + cabal install + +4. Make sure the `$CABALDIR/bin` directory is in your path. You should + now be able to run `pandoc`: + + pandoc --help + + [Not sure where `$CABALDIR` is?](http://www.haskell.org/haskellwiki/Cabal-Install#The_cabal-install_configuration_file) + +5. If you want to process citations with pandoc, you will also need to + install a separate package, `pandoc-citeproc`. This can be installed + using cabal: + + cabal install pandoc-citeproc + + By default `pandoc-citeproc` uses the "i;unicode-casemap" method + to sort bibliography entries (RFC 5051). If you would like to + use the locale-sensitive unicode collation algorithm instead, + specify the `unicode_collation` flag: + + cabal install pandoc-citeproc -funicode_collation + + Note that this requires the `text-icu` library, which in turn + depends on the C library `icu4c`. Installation directions + vary by platform. Here is how it might work on macOS with homebrew: + + brew install icu4c + cabal install --extra-lib-dirs=/usr/local/Cellar/icu4c/51.1/lib \ + --extra-include-dirs=/usr/local/Cellar/icu4c/51.1/include \ + -funicode_collation text-icu pandoc-citeproc + +6. The `pandoc.1` man page will be installed automatically. cabal shows + you where it is installed: you may need to set your `MANPATH` + accordingly. If `MANUAL.txt` has been modified, the man page can be + rebuilt: `make man/pandoc.1`. + + The `pandoc-citeproc.1` man page will also be installed automatically. + + +### Custom cabal method + +This is a step-by-step procedure that offers maximal control +over the build and installation. Most users should use the +quick install, but this information may be of use to packagers. +For more details, see the [Cabal User's Guide]. These instructions +assume that the pandoc source directory is your working directory. + +1. Install dependencies: in addition to the [Haskell platform], + you will need a number of additional libraries. You can install + them all with + + cabal update + cabal install --only-dependencies + +2. Configure: + + cabal configure --prefix=DIR --bindir=DIR --libdir=DIR \ + --datadir=DIR --libsubdir=DIR --datasubdir=DIR --docdir=DIR \ + --htmldir=DIR --program-prefix=PREFIX --program-suffix=SUFFIX \ + --mandir=DIR --flags=FLAGSPEC --enable-tests + + All of the options have sensible defaults that can be overridden + as needed. + + `FLAGSPEC` is a list of Cabal configuration flags, optionally + preceded by a `-` (to force the flag to `false`), and separated + by spaces. Pandoc's flags include: + + - `embed_data_files`: embed all data files into the binary (default no). + This is helpful if you want to create a relocatable binary. + + - `https`: enable support for downloading resources over https + (using the `http-client` and `http-client-tls` libraries). + +3. Build: + + cabal build + cabal test + +4. Build API documentation: + + cabal haddock --html-location=URL --hyperlink-source + +5. Copy the files: + + cabal copy --destdir=PATH + + The default destdir is `/`. + +6. Register pandoc as a GHC package: + + cabal register + + Package managers may want to use the `--gen-script` option to + generate a script that can be run to register the package at + install time. + +### Creating a relocatable binary + +It is possible to compile pandoc such that the data files +pandoc uses are embedded in the binary. The resulting binary +can be run from any directory and is completely self-contained. +With cabal, add `-fembed_data_files` to the `cabal configure` +or `cabal install` commands. + +With stack, use `--flag pandoc:embed_data_files`. + + + +### Running tests + +Pandoc comes with an automated test suite. +To run with cabal, `cabal test`; to run with stack, `stack +test`. + +To run particular tests (pattern-matching on their names), use +the `-p` option: + + cabal test --test-options='-p markdown' + +Or with stack: + + stack test --test-arguments='-p markdown' + +It is often helpful to add `-j4` (run tests in parallel) +and `--hide-successes` (don't clutter output with successes) +to the test arguments as well. + +If you add a new feature to pandoc, please add tests as well, following +the pattern of the existing tests. The test suite code is in +`test/test-pandoc.hs`. If you are adding a new reader or writer, it is +probably easiest to add some data files to the `test` directory, and +modify `test/Tests/Old.hs`. Otherwise, it is better to modify the module +under the `test/Tests` hierarchy corresponding to the pandoc module you +are changing. + +### Running benchmarks + +To build and run the benchmarks: + + cabal configure --enable-benchmarks && cabal build + cabal bench + +or with stack: + + stack bench + +To use a smaller sample size so the benchmarks run faster: + + cabal bench --benchmark-options='-s 20' + +To run just the markdown benchmarks: + + cabal bench --benchmark-options='markdown' + + +[Arch]: https://www.archlinux.org/packages/community/x86_64/pandoc/ +[Cabal User's Guide]: http://www.haskell.org/cabal/release/latest/doc/users-guide/builders.html#setup-configure-paths +[Debian]: https://packages.debian.org/pandoc +[Fedora]: https://apps.fedoraproject.org/packages/pandoc +[FreeBSD ports]: http://www.freshports.org/textproc/pandoc/ +[GHC]: http://www.haskell.org/ghc/ +[GPL]: http://www.gnu.org/copyleft/gpl.html +[Haskell platform]: http://hackage.haskell.org/platform/ +[MacPorts]: http://trac.macports.org/browser/trunk/dports/textproc/pandoc/Portfile +[MacTeX]: https://tug.org/mactex/ +[NetBSD]: http://pkgsrc.se/wip/pandoc +[NixOS]: https://nixos.org/nixos/packages.html +[Slackware]: https://www.slackbuilds.org/result/?search=pandoc&sv= +[Ubuntu]: https://packages.ubuntu.com/pandoc +[download page]: https://github.com/jgm/pandoc/releases/latest +[gentoo]: http://packages.gentoo.org/package/app-text/pandoc +[haskell repository]: https://wiki.archlinux.org/index.php/Haskell_Package_Guidelines#.5Bhaskell.5D +[openSUSE]: https://software.opensuse.org/package/pandoc +[source tarball]: http://hackage.haskell.org/package/pandoc +[stack]: http://docs.haskellstack.org/en/stable/install_and_upgrade.html +[cabal-install]: http://hackage.haskell.org/trac/hackage/wiki/CabalInstall +[uninstaller]: https://raw.githubusercontent.com/jgm/pandoc/master/macos/uninstall-pandoc.pl diff --git a/MANUAL.txt b/MANUAL.txt new file mode 100644 index 0000000..3f8cc69 --- /dev/null +++ b/MANUAL.txt @@ -0,0 +1,4499 @@ +% Pandoc User's Guide +% John MacFarlane +% December 27, 2017 + +Synopsis +======== + +`pandoc` [*options*] [*input-file*]... + +Description +=========== + +Pandoc is a [Haskell] library for converting from one markup format to +another, and a command-line tool that uses this library. It can read +[Markdown], [CommonMark], [PHP Markdown Extra], [GitHub-Flavored +Markdown], [MultiMarkdown], and (subsets of) [Textile], +[reStructuredText], [HTML], [LaTeX], [MediaWiki markup], [TWiki +markup], [TikiWiki markup], [Creole 1.0], [Haddock markup], [OPML], +[Emacs Org mode], [DocBook], [JATS], [Muse], [txt2tags], [Vimwiki], +[EPUB], [ODT], and [Word docx]; and it can write plain text, [Markdown], +[CommonMark], [PHP Markdown Extra], [GitHub-Flavored Markdown], +[MultiMarkdown], [reStructuredText], [XHTML], [HTML5], [LaTeX] +\(including [`beamer`] slide shows\), [ConTeXt], [RTF], [OPML], +[DocBook], [JATS], [OpenDocument], [ODT], [Word docx], [GNU Texinfo], +[MediaWiki markup], [DokuWiki markup], [ZimWiki markup], [Haddock +markup], [EPUB] \(v2 or v3\), [FictionBook2], [Textile], [groff man], +[groff ms], [Emacs Org mode], [AsciiDoc], [InDesign ICML], [TEI +Simple], [Muse], [PowerPoint] slide shows and [Slidy], [Slideous], +[DZSlides], [reveal.js] or [S5] HTML slide shows. It can also produce +[PDF] output on systems where LaTeX, ConTeXt, `pdfroff`, +`wkhtmltopdf`, `prince`, or `weasyprint` is installed. + +Pandoc's enhanced version of Markdown includes syntax for [footnotes], +[tables], flexible [ordered lists], [definition lists], [fenced code +blocks], [superscripts and subscripts], [strikeout], [metadata blocks], +automatic tables of contents, embedded LaTeX [math], [citations], and +[Markdown inside HTML block elements][Extension: +`markdown_in_html_blocks`]. (These enhancements, described further under +[Pandoc's Markdown], can be disabled using the `markdown_strict` input +or output format.) + +In contrast to most existing tools for converting Markdown to HTML, which +use regex substitutions, pandoc has a modular design: it consists of a +set of readers, which parse text in a given format and produce a native +representation of the document, and a set of writers, which convert +this native representation into a target format. Thus, adding an input +or output format requires only adding a reader or writer. + +Because pandoc's intermediate representation of a document is less +expressive than many of the formats it converts between, one should +not expect perfect conversions between every format and every other. +Pandoc attempts to preserve the structural elements of a document, but +not formatting details such as margin size. And some document elements, +such as complex tables, may not fit into pandoc's simple document +model. While conversions from pandoc's Markdown to all formats aspire +to be perfect, conversions from formats more expressive than pandoc's +Markdown can be expected to be lossy. + +[Markdown]: http://daringfireball.net/projects/markdown/ +[CommonMark]: http://commonmark.org +[PHP Markdown Extra]: https://michelf.ca/projects/php-markdown/extra/ +[GitHub-Flavored Markdown]: https://help.github.com/articles/github-flavored-markdown/ +[MultiMarkdown]: http://fletcherpenney.net/multimarkdown/ +[reStructuredText]: http://docutils.sourceforge.net/docs/ref/rst/introduction.html +[S5]: http://meyerweb.com/eric/tools/s5/ +[Slidy]: http://www.w3.org/Talks/Tools/Slidy/ +[Slideous]: http://goessner.net/articles/slideous/ +[HTML]: http://www.w3.org/html/ +[HTML5]: http://www.w3.org/TR/html5/ +[polyglot markup]: https://www.w3.org/TR/html-polyglot/ +[XHTML]: http://www.w3.org/TR/xhtml1/ +[LaTeX]: http://latex-project.org +[`beamer`]: https://ctan.org/pkg/beamer +[Beamer User's Guide]: http://ctan.math.utah.edu/ctan/tex-archive/macros/latex/contrib/beamer/doc/beameruserguide.pdf +[ConTeXt]: http://www.contextgarden.net/ +[RTF]: http://en.wikipedia.org/wiki/Rich_Text_Format +[DocBook]: http://docbook.org +[JATS]: https://jats.nlm.nih.gov +[txt2tags]: http://txt2tags.org +[EPUB]: http://idpf.org/epub +[OPML]: http://dev.opml.org/spec2.html +[OpenDocument]: http://opendocument.xml.org +[ODT]: http://en.wikipedia.org/wiki/OpenDocument +[Textile]: http://redcloth.org/textile +[MediaWiki markup]: https://www.mediawiki.org/wiki/Help:Formatting +[DokuWiki markup]: https://www.dokuwiki.org/dokuwiki +[ZimWiki markup]: http://zim-wiki.org/manual/Help/Wiki_Syntax.html +[TWiki markup]: http://twiki.org/cgi-bin/view/TWiki/TextFormattingRules +[TikiWiki markup]: https://doc.tiki.org/Wiki-Syntax-Text#The_Markup_Language_Wiki-Syntax +[Haddock markup]: https://www.haskell.org/haddock/doc/html/ch03s08.html +[Creole 1.0]: http://www.wikicreole.org/wiki/Creole1.0 +[groff man]: http://man7.org/linux/man-pages/man7/groff_man.7.html +[groff ms]: http://man7.org/linux/man-pages/man7/groff_ms.7.html +[Haskell]: https://www.haskell.org +[GNU Texinfo]: http://www.gnu.org/software/texinfo/ +[Emacs Org mode]: http://orgmode.org +[AsciiDoc]: http://www.methods.co.nz/asciidoc/ +[DZSlides]: http://paulrouget.com/dzslides/ +[Word docx]: https://en.wikipedia.org/wiki/Office_Open_XML +[PDF]: https://www.adobe.com/pdf/ +[reveal.js]: http://lab.hakim.se/reveal-js/ +[FictionBook2]: http://www.fictionbook.org/index.php/Eng:XML_Schema_Fictionbook_2.1 +[InDesign ICML]: https://www.adobe.com/content/dam/Adobe/en/devnet/indesign/cs55-docs/IDML/idml-specification.pdf +[TEI Simple]: https://github.com/TEIC/TEI-Simple +[Muse]: https://amusewiki.org/library/manual +[PowerPoint]: https://en.wikipedia.org/wiki/Microsoft_PowerPoint +[Vimwiki]: https://vimwiki.github.io + +Using `pandoc` +-------------- + +If no *input-file* is specified, input is read from *stdin*. +Otherwise, the *input-files* are concatenated (with a blank +line between each) and used as input. Output goes to *stdout* by +default (though output to the terminal is disabled for the +`odt`, `docx`, `epub2`, and `epub3` output formats, unless it is +forced using `-o -`). For output to a file, use the `-o` +option: + + pandoc -o output.html input.txt + +By default, pandoc produces a document fragment, not a standalone +document with a proper header and footer. To produce a standalone +document, use the `-s` or `--standalone` flag: + + pandoc -s -o output.html input.txt + +For more information on how standalone documents are produced, see +[Templates], below. + +Instead of a file, an absolute URI may be given. In this case +pandoc will fetch the content using HTTP: + + pandoc -f html -t markdown http://www.fsf.org + +It is possible to supply a custom User-Agent string or other +header when requesting a document from a URL: + + pandoc -f html -t markdown --request-header User-Agent:"Mozilla/5.0" \ + http://www.fsf.org + +If multiple input files are given, `pandoc` will concatenate them all (with +blank lines between them) before parsing. This feature is disabled for + binary input formats such as `EPUB`, `odt`, and `docx`. + +The format of the input and output can be specified explicitly using +command-line options. The input format can be specified using the +`-r/--read` or `-f/--from` options, the output format using the +`-w/--write` or `-t/--to` options. Thus, to convert `hello.txt` from +Markdown to LaTeX, you could type: + + pandoc -f markdown -t latex hello.txt + +To convert `hello.html` from HTML to Markdown: + + pandoc -f html -t markdown hello.html + +Supported output formats are listed below under the `-t/--to` option. +Supported input formats are listed below under the `-f/--from` option. Note +that the `rst`, `textile`, `latex`, and `html` readers are not complete; +there are some constructs that they do not parse. + +If the input or output format is not specified explicitly, `pandoc` +will attempt to guess it from the extensions of +the input and output filenames. Thus, for example, + + pandoc -o hello.tex hello.txt + +will convert `hello.txt` from Markdown to LaTeX. If no output file +is specified (so that output goes to *stdout*), or if the output file's +extension is unknown, the output format will default to HTML. +If no input file is specified (so that input comes from *stdin*), or +if the input files' extensions are unknown, the input format will +be assumed to be Markdown unless explicitly specified. + +Pandoc uses the UTF-8 character encoding for both input and output. +If your local character encoding is not UTF-8, you +should pipe input and output through [`iconv`]: + + iconv -t utf-8 input.txt | pandoc | iconv -f utf-8 + +Note that in some output formats (such as HTML, LaTeX, ConTeXt, +RTF, OPML, DocBook, and Texinfo), information about +the character encoding is included in the document header, which +will only be included if you use the `-s/--standalone` option. + +[`iconv`]: http://www.gnu.org/software/libiconv/ + +Creating a PDF +-------------- + +To produce a PDF, specify an output file with a `.pdf` extension. +By default, pandoc will use LaTeX to create the PDF: + + pandoc test.txt -o test.pdf + +Production of a PDF requires that a LaTeX engine be installed (see +`--pdf-engine`, below), and assumes that the following LaTeX packages +are available: [`amsfonts`], [`amsmath`], [`lm`], [`unicode-math`], +[`ifxetex`], [`ifluatex`], [`listings`] (if the +`--listings` option is used), [`fancyvrb`], [`longtable`], +[`booktabs`], [`graphicx`] and [`grffile`] (if the document +contains images), [`hyperref`], [`xcolor`] (with `colorlinks`), [`ulem`], [`geometry`] (with the +`geometry` variable set), [`setspace`] (with `linestretch`), and +[`babel`] (with `lang`). The use of `xelatex` or `lualatex` as +the LaTeX engine requires [`fontspec`]. `xelatex` uses +[`polyglossia`] (with `lang`), [`xecjk`], and [`bidi`] (with the +`dir` variable set). If the `mathspec` variable is set, +`xelatex` will use [`mathspec`] instead of [`unicode-math`]. +The [`upquote`] and [`microtype`] packages are used if +available, and [`csquotes`] will be used for [typography] +if added to the template or included in any header file. The +[`natbib`], [`biblatex`], [`bibtex`], and [`biber`] packages can +optionally be used for [citation rendering]. These are included +with all recent versions of [TeX Live]. + +Alternatively, pandoc can use [ConTeXt], `pdfroff`, or any of the +following HTML/CSS-to-PDF-engines, to create a PDF: [`wkhtmltopdf`], +[`weasyprint`] or [`prince`]. +To do this, specify an output file with a `.pdf` extension, as before, +but add the `--pdf-engine` option or `-t context`, `-t html`, or `-t ms` +to the command line (`-t html` defaults to `--pdf-engine=wkhtmltopdf`). + +PDF output can be controlled using [variables for LaTeX] (if +LaTeX is used) and [variables for ConTeXt] (if ConTeXt is used). +When using an HTML/CSS-to-PDF-engine, `--css` affects the output. +If `wkhtmltopdf` is used, then the variables `margin-left`, +`margin-right`, `margin-top`, `margin-bottom`, and `papersize` +will affect the output. + +[`amsfonts`]: https://ctan.org/pkg/amsfonts +[`amsmath`]: https://ctan.org/pkg/amsmath +[`lm`]: https://ctan.org/pkg/lm +[`ifxetex`]: https://ctan.org/pkg/ifxetex +[`ifluatex`]: https://ctan.org/pkg/ifluatex +[`listings`]: https://ctan.org/pkg/listings +[`fancyvrb`]: https://ctan.org/pkg/fancyvrb +[`longtable`]: https://ctan.org/pkg/longtable +[`booktabs`]: https://ctan.org/pkg/booktabs +[`graphicx`]: https://ctan.org/pkg/graphicx +[`grffile`]: https://ctan.org/pkg/grffile +[`geometry`]: https://ctan.org/pkg/geometry +[`setspace`]: https://ctan.org/pkg/setspace +[`xecjk`]: https://ctan.org/pkg/xecjk +[`hyperref`]: https://ctan.org/pkg/hyperref +[`ulem`]: https://ctan.org/pkg/ulem +[`babel`]: https://ctan.org/pkg/babel +[`bidi`]: https://ctan.org/pkg/bidi +[`mathspec`]: https://ctan.org/pkg/mathspec +[`unicode-math`]: https://ctan.org/pkg/unicode-math +[`polyglossia`]: https://ctan.org/pkg/polyglossia +[`fontspec`]: https://ctan.org/pkg/fontspec +[`upquote`]: https://ctan.org/pkg/upquote +[`microtype`]: https://ctan.org/pkg/microtype +[`csquotes`]: https://ctan.org/pkg/csquotes +[`natbib`]: https://ctan.org/pkg/natbib +[`biblatex`]: https://ctan.org/pkg/biblatex +[`bibtex`]: https://ctan.org/pkg/bibtex +[`biber`]: https://ctan.org/pkg/biber +[TeX Live]: http://www.tug.org/texlive/ +[`wkhtmltopdf`]: https://wkhtmltopdf.org +[`weasyprint`]: http://weasyprint.org +[`prince`]: https://www.princexml.com/ + +Options +======= + +General options +--------------- + +`-f` *FORMAT*, `-r` *FORMAT*, `--from=`*FORMAT*, `--read=`*FORMAT* + +: Specify input format. *FORMAT* can be `native` (native Haskell), + `json` (JSON version of native AST), `markdown` (pandoc's + extended Markdown), `markdown_strict` (original unextended + Markdown), `markdown_phpextra` (PHP Markdown Extra), + `markdown_mmd` (MultiMarkdown), `gfm` (GitHub-Flavored Markdown), + `commonmark` (CommonMark Markdown), `textile` (Textile), `rst` + (reStructuredText), `html` (HTML), `docbook` (DocBook), `t2t` + (txt2tags), `docx` (docx), `odt` (ODT), `epub` (EPUB), `opml` (OPML), + `org` (Emacs Org mode), `mediawiki` (MediaWiki markup), `twiki` (TWiki + markup), `tikiwiki` (TikiWiki markup), `creole` (Creole 1.0), + `haddock` (Haddock markup), or `latex` (LaTeX). + (`markdown_github` provides deprecated and less accurate support + for Github-Flavored Markdown; please use `gfm` instead, unless you + need to use extensions other than `smart`.) + Extensions can be individually enabled or disabled by + appending `+EXTENSION` or `-EXTENSION` to the format name. + See [Extensions] below, for a list of extensions and + their names. See `--list-input-formats` and `--list-extensions`, + below. + +`-t` *FORMAT*, `-w` *FORMAT*, `--to=`*FORMAT*, `--write=`*FORMAT* + +: Specify output format. *FORMAT* can be `native` (native Haskell), + `json` (JSON version of native AST), `plain` (plain text), + `markdown` (pandoc's extended Markdown), `markdown_strict` + (original unextended Markdown), `markdown_phpextra` (PHP Markdown + Extra), `markdown_mmd` (MultiMarkdown), `gfm` (GitHub-Flavored + Markdown), `commonmark` (CommonMark Markdown), `rst` + (reStructuredText), `html4` (XHTML 1.0 Transitional), `html` or + `html5` (HTML5/XHTML [polyglot markup]), `latex` (LaTeX), `beamer` + (LaTeX beamer slide show), `context` (ConTeXt), `man` (groff man), + `mediawiki` (MediaWiki markup), `dokuwiki` (DokuWiki markup), + `zimwiki` (ZimWiki markup), `textile` (Textile), `org` (Emacs Org + mode), `texinfo` (GNU Texinfo), `opml` (OPML), `docbook` or + `docbook4` (DocBook 4), `docbook5` (DocBook 5), `jats` (JATS XML), + `opendocument` (OpenDocument), `odt` (OpenOffice text document), + `docx` (Word docx), `haddock` (Haddock markup), `rtf` (rich text + format), `epub2` (EPUB v2 book), `epub` or `epub3` (EPUB v3), + `fb2` (FictionBook2 e-book), `asciidoc` (AsciiDoc), `icml` + (InDesign ICML), `tei` (TEI Simple), `slidy` (Slidy HTML and + JavaScript slide show), `slideous` (Slideous HTML and JavaScript + slide show), `dzslides` (DZSlides HTML5 + JavaScript slide show), + `revealjs` (reveal.js HTML5 + JavaScript slide show), `s5` (S5 + HTML and JavaScript slide show), `pptx` (PowerPoint slide show) or + the path of a custom lua writer (see [Custom writers], + below). (`markdown_github` provides deprecated and less accurate + support for Github-Flavored Markdown; please use `gfm` instead, + unless you use extensions that do not work with `gfm`.) Note that + `odt`, `epub`, and `epub3` output will not be directed to + *stdout*; an output filename must be specified using the + `-o/--output` option. Extensions can be individually enabled or + disabled by appending `+EXTENSION` or `-EXTENSION` to the format + name. See [Extensions] below, for a list of extensions and their + names. See `--list-output-formats` and `--list-extensions`, below. + +`-o` *FILE*, `--output=`*FILE* + +: Write output to *FILE* instead of *stdout*. If *FILE* is + `-`, output will go to *stdout*, even if a non-textual format + (`docx`, `odt`, `epub2`, `epub3`) is specified. + +`--data-dir=`*DIRECTORY* + +: Specify the user data directory to search for pandoc data files. + If this option is not specified, the default user data directory + will be used. This is, in UNIX: + + $HOME/.pandoc + + in Windows XP: + + C:\Documents And Settings\USERNAME\Application Data\pandoc + + and in Windows Vista or later: + + C:\Users\USERNAME\AppData\Roaming\pandoc + + You can find the default user data directory on your system by + looking at the output of `pandoc --version`. + A `reference.odt`, `reference.docx`, `epub.css`, `templates`, + `slidy`, `slideous`, or `s5` directory + placed in this directory will override pandoc's normal defaults. + +`--bash-completion` + +: Generate a bash completion script. To enable bash completion + with pandoc, add this to your `.bashrc`: + + eval "$(pandoc --bash-completion)" + +`--verbose` + +: Give verbose debugging output. Currently this only has an effect + with PDF output. + +`--quiet` + +: Suppress warning messages. + +`--fail-if-warnings` + +: Exit with error status if there are any warnings. + +`--log=`*FILE* + +: Write log messages in machine-readable JSON format to + *FILE*. All messages above DEBUG level will be written, + regardless of verbosity settings (`--verbose`, `--quiet`). + +`--list-input-formats` + +: List supported input formats, one per line. + +`--list-output-formats` + +: List supported output formats, one per line. + +`--list-extensions`[`=`*FORMAT*] + +: List supported Markdown extensions, one per line, preceded + by a `+` or `-` indicating whether it is enabled by default + in *FORMAT*. If *FORMAT* is not specified, defaults for + pandoc's Markdown are given. + +`--list-highlight-languages` + +: List supported languages for syntax highlighting, one per + line. + +`--list-highlight-styles` + +: List supported styles for syntax highlighting, one per line. + See `--highlight-style`. + +`-v`, `--version` + +: Print version. + +`-h`, `--help` + +: Show usage message. + +Reader options +-------------- + +`--base-header-level=`*NUMBER* + +: Specify the base level for headers (defaults to 1). + +`--strip-empty-paragraphs` + +: *Deprecated. Use the `+empty_paragraphs` extension instead.* + Ignore paragraphs with no content. This option is useful + for converting word processing documents where users have + used empty paragraphs to create inter-paragraph space. + +`--indented-code-classes=`*CLASSES* + +: Specify classes to use for indented code blocks--for example, + `perl,numberLines` or `haskell`. Multiple classes may be separated + by spaces or commas. + +`--default-image-extension=`*EXTENSION* + +: Specify a default extension to use when image paths/URLs have no + extension. This allows you to use the same source for formats that + require different kinds of images. Currently this option only affects + the Markdown and LaTeX readers. + +`--file-scope` + +: Parse each file individually before combining for multifile + documents. This will allow footnotes in different files with the + same identifiers to work as expected. If this option is set, + footnotes and links will not work across files. Reading binary + files (docx, odt, epub) implies `--file-scope`. + +`--filter=`*PROGRAM* + +: Specify an executable to be used as a filter transforming the + pandoc AST after the input is parsed and before the output is + written. The executable should read JSON from stdin and write + JSON to stdout. The JSON must be formatted like pandoc's own + JSON input and output. The name of the output format will be + passed to the filter as the first argument. Hence, + + pandoc --filter ./caps.py -t latex + + is equivalent to + + pandoc -t json | ./caps.py latex | pandoc -f json -t latex + + The latter form may be useful for debugging filters. + + Filters may be written in any language. `Text.Pandoc.JSON` + exports `toJSONFilter` to facilitate writing filters in Haskell. + Those who would prefer to write filters in python can use the + module [`pandocfilters`], installable from PyPI. There are also + pandoc filter libraries in [PHP], [perl], and + [JavaScript/node.js]. + + In order of preference, pandoc will look for filters in + + 1. a specified full or relative path (executable or + non-executable) + + 2. `$DATADIR/filters` (executable or non-executable) + where `$DATADIR` is the user data directory (see + `--data-dir`, above). + + 3. `$PATH` (executable only) + +`--lua-filter=`*SCRIPT* + +: Transform the document in a similar fashion as JSON filters (see + `--filter`), but use pandoc's build-in lua filtering system. The given + lua script is expected to return a list of lua filters which will be + applied in order. Each lua filter must contain element-transforming + functions indexed by the name of the AST element on which the filter + function should be applied. + + The `pandoc` lua module provides helper functions for element + creation. It is always loaded into the script's lua environment. + + The following is an example lua script for macro-expansion: + + function expand_hello_world(inline) + if inline.c == '{{helloworld}}' then + return pandoc.Emph{ pandoc.Str "Hello, World" } + else + return inline + end + end + + return {{Str = expand_hello_world}} + + +`-M` *KEY*[`=`*VAL*], `--metadata=`*KEY*[`:`*VAL*] + +: Set the metadata field *KEY* to the value *VAL*. A value specified + on the command line overrides a value specified in the document. + Values will be parsed as YAML boolean or string values. If no value is + specified, the value will be treated as Boolean true. Like + `--variable`, `--metadata` causes template variables to be set. + But unlike `--variable`, `--metadata` affects the metadata of the + underlying document (which is accessible from filters and may be + printed in some output formats). + +`-p`, `--preserve-tabs` + +: Preserve tabs instead of converting them to spaces (the default). + Note that this will only affect tabs in literal code spans and code + blocks; tabs in regular text will be treated as spaces. + +`--tab-stop=`*NUMBER* + +: Specify the number of spaces per tab (default is 4). + +`--track-changes=accept`|`reject`|`all` + +: Specifies what to do with insertions, deletions, and comments + produced by the MS Word "Track Changes" feature. `accept` (the + default), inserts all insertions, and ignores all + deletions. `reject` inserts all deletions and ignores + insertions. Both `accept` and `reject` ignore comments. `all` puts + in insertions, deletions, and comments, wrapped in spans with + `insertion`, `deletion`, `comment-start`, and `comment-end` + classes, respectively. The author and time of change is + included. `all` is useful for scripting: only accepting changes + from a certain reviewer, say, or before a certain date. This + option only affects the docx reader. + +`--extract-media=`*DIR* + +: Extract images and other media contained in or linked from + the source document to the path *DIR*, creating it if + necessary, and adjust the images references in the document + so they point to the extracted files. If the source format is + a binary container (docx, epub, or odt), the media is + extracted from the container and the original + filenames are used. Otherwise the media is read from the + file system or downloaded, and new filenames are constructed + based on SHA1 hashes of the contents. + +`--abbreviations=`*FILE* + +: Specifies a custom abbreviations file, with abbreviations + one to a line. If this option is not specified, pandoc will + read the data file `abbreviations` from the user data + directory or fall back on a system default. To see the + system default, use + `pandoc --print-default-data-file=abbreviations`. The only + use pandoc makes of this list is in the Markdown reader. + Strings ending in a period that are found in this list will + be followed by a nonbreaking space, so that the period will + not produce sentence-ending space in formats like LaTeX. + +[`pandocfilters`]: https://github.com/jgm/pandocfilters +[PHP]: https://github.com/vinai/pandocfilters-php +[perl]: https://metacpan.org/pod/Pandoc::Filter +[JavaScript/node.js]: https://github.com/mvhenderson/pandoc-filter-node + +General writer options +---------------------- + +`-s`, `--standalone` + +: Produce output with an appropriate header and footer (e.g. a + standalone HTML, LaTeX, TEI, or RTF file, not a fragment). This option + is set automatically for `pdf`, `epub`, `epub3`, `fb2`, `docx`, and `odt` + output. + +`--template=`*FILE* + +: Use *FILE* as a custom template for the generated document. Implies + `--standalone`. See [Templates], below, for a description + of template syntax. If no extension is specified, an extension + corresponding to the writer will be added, so that `--template=special` + looks for `special.html` for HTML output. If the template is not + found, pandoc will search for it in the `templates` subdirectory of + the user data directory (see `--data-dir`). If this option is not used, + a default template appropriate for the output format will be used (see + `-D/--print-default-template`). + +`-V` *KEY*[`=`*VAL*], `--variable=`*KEY*[`:`*VAL*] + +: Set the template variable *KEY* to the value *VAL* when rendering the + document in standalone mode. This is generally only useful when the + `--template` option is used to specify a custom template, since + pandoc automatically sets the variables used in the default + templates. If no *VAL* is specified, the key will be given the + value `true`. + +`-D` *FORMAT*, `--print-default-template=`*FORMAT* + +: Print the system default template for an output *FORMAT*. (See `-t` + for a list of possible *FORMAT*s.) Templates in the user data + directory are ignored. + +`--print-default-data-file=`*FILE* + +: Print a system default data file. Files in the user data directory + are ignored. + +`--eol=crlf`|`lf`|`native` + +: Manually specify line endings: `crlf` (Windows), `lf` + (macOS/Linux/UNIX), or `native` (line endings appropriate + to the OS on which pandoc is being run). The default is + `native`. + +`--dpi`=*NUMBER* + +: Specify the dpi (dots per inch) value for conversion from pixels + to inch/centimeters and vice versa. The default is 96dpi. + Technically, the correct term would be ppi (pixels per inch). + +`--wrap=auto`|`none`|`preserve` + +: Determine how text is wrapped in the output (the source + code, not the rendered version). With `auto` (the default), + pandoc will attempt to wrap lines to the column width specified by + `--columns` (default 72). With `none`, pandoc will not wrap + lines at all. With `preserve`, pandoc will attempt to + preserve the wrapping from the source document (that is, + where there are nonsemantic newlines in the source, there + will be nonsemantic newlines in the output as well). + Automatic wrapping does not currently work in HTML output. + +`--columns=`*NUMBER* + +: Specify length of lines in characters. This affects text wrapping + in the generated source code (see `--wrap`). It also affects + calculation of column widths for plain text tables (see [Tables] below). + +`--toc`, `--table-of-contents` + +: Include an automatically generated table of contents (or, in + the case of `latex`, `context`, `docx`, `odt`, + `opendocument`, `rst`, or `ms`, an instruction to create + one) in the output document. This option has no effect on + `man`, `docbook4`, `docbook5`, or `jats` output. + +`--toc-depth=`*NUMBER* + +: Specify the number of section levels to include in the table + of contents. The default is 3 (which means that level 1, 2, and 3 + headers will be listed in the contents). + +`--strip-comments` + +: Strip out HTML comments in the Markdown or Textile source, + rather than passing them on to Markdown, Textile or HTML + output as raw HTML. This does not apply to HTML comments + inside raw HTML blocks when the `markdown_in_html_blocks` + extension is not set. + +`--no-highlight` + +: Disables syntax highlighting for code blocks and inlines, even when + a language attribute is given. + +`--highlight-style=`*STYLE*|*FILE* + +: Specifies the coloring style to be used in highlighted source code. + Options are `pygments` (the default), `kate`, `monochrome`, + `breezeDark`, `espresso`, `zenburn`, `haddock`, and `tango`. + For more information on syntax highlighting in pandoc, see + [Syntax highlighting], below. See also + `--list-highlight-styles`. + + Instead of a *STYLE* name, a JSON file with extension + `.theme` may be supplied. This will be parsed as a KDE + syntax highlighting theme and (if valid) used as the + highlighting style. + + To generate the JSON version of an existing style, + use `--print-highlight-style`. + +`--print-highlight-style=`*STYLE*|*FILE* + +: Prints a JSON version of a highlighting style, which can + be modified, saved with a `.theme` extension, and used + with `--highlight-style`. + +`--syntax-definition=`*FILE* + +: Instructs pandoc to load a KDE XML syntax definition file, + which will be used for syntax highlighting of appropriately + marked code blocks. This can be used to add support for + new languages or to use altered syntax definitions for + existing languages. + +`-H` *FILE*, `--include-in-header=`*FILE* + +: Include contents of *FILE*, verbatim, at the end of the header. + This can be used, for example, to include special + CSS or JavaScript in HTML documents. This option can be used + repeatedly to include multiple files in the header. They will be + included in the order specified. Implies `--standalone`. + +`-B` *FILE*, `--include-before-body=`*FILE* + +: Include contents of *FILE*, verbatim, at the beginning of the + document body (e.g. after the `` tag in HTML, or the + `\begin{document}` command in LaTeX). This can be used to include + navigation bars or banners in HTML documents. This option can be + used repeatedly to include multiple files. They will be included in + the order specified. Implies `--standalone`. + +`-A` *FILE*, `--include-after-body=`*FILE* + +: Include contents of *FILE*, verbatim, at the end of the document + body (before the `` tag in HTML, or the + `\end{document}` command in LaTeX). This option can be used + repeatedly to include multiple files. They will be included in the + order specified. Implies `--standalone`. + +`--resource-path=`*SEARCHPATH* + +: List of paths to search for images and other resources. + The paths should be separated by `:` on Linux, UNIX, and + macOS systems, and by `;` on Windows. If `--resource-path` + is not specified, the default resource path is the working + directory. Note that, if `--resource-path` is specified, + the working directory must be explicitly listed or it + will not be searched. For example: + `--resource-path=.:test` will search the working directory + and the `test` subdirectory, in that order. + +`--request-header=`*NAME*`:`*VAL* + +: Set the request header *NAME* to the value *VAL* when making + HTTP requests (for example, when a URL is given on the + command line, or when resources used in a document must be + downloaded). + +Options affecting specific writers +---------------------------------- + +`--self-contained` + +: Produce a standalone HTML file with no external dependencies, using + `data:` URIs to incorporate the contents of linked scripts, stylesheets, + images, and videos. The resulting file should be "self-contained," + in the sense that it needs no external files and no net access to be + displayed properly by a browser. This option works only with HTML output + formats, including `html4`, `html5`, `html+lhs`, `html5+lhs`, `s5`, + `slidy`, `slideous`, `dzslides`, and `revealjs`. Scripts, images, and + stylesheets at absolute URLs will be downloaded; those at relative URLs + will be sought relative to the working directory (if the first source + file is local) or relative to the base URL (if the first source + file is remote). Elements with the attribute + `data-external="1"` will be left alone; the documents they + link to will not be incorporated in the document. + Limitation: resources that are loaded dynamically through + JavaScript cannot be incorporated; as a result, + `--self-contained` does not work with `--mathjax`, and some + advanced features (e.g. zoom or speaker notes) may not work + in an offline "self-contained" `reveal.js` slide show. + +`--html-q-tags` + +: Use `` tags for quotes in HTML. + +`--ascii` + +: Use only ASCII characters in output. Currently supported only for + HTML and DocBook output (which uses numerical entities instead of + UTF-8 when this option is selected). + +`--reference-links` + +: Use reference-style links, rather than inline links, in writing Markdown + or reStructuredText. By default inline links are used. The + placement of link references is affected by the + `--reference-location` option. + +`--reference-location = block`|`section`|`document` + +: Specify whether footnotes (and references, if `reference-links` is + set) are placed at the end of the current (top-level) block, the + current section, or the document. The default is + `document`. Currently only affects the markdown writer. + +`--atx-headers` + +: Use ATX-style headers in Markdown and AsciiDoc output. The default is + to use setext-style headers for levels 1-2, and then ATX headers. + (Note: for `gfm` output, ATX headers are always used.) + +`--top-level-division=[default|section|chapter|part]` + +: Treat top-level headers as the given division type in LaTeX, ConTeXt, + DocBook, and TEI output. The hierarchy order is part, chapter, then section; + all headers are shifted such that the top-level header becomes the specified + type. The default behavior is to determine the best division type via + heuristics: unless other conditions apply, `section` is chosen. When the + LaTeX document class is set to `report`, `book`, or `memoir` (unless the + `article` option is specified), `chapter` is implied as the setting for this + option. If `beamer` is the output format, specifying either `chapter` or + `part` will cause top-level headers to become `\part{..}`, while + second-level headers remain as their default type. + +`-N`, `--number-sections` + +: Number section headings in LaTeX, ConTeXt, HTML, or EPUB output. + By default, sections are not numbered. Sections with class + `unnumbered` will never be numbered, even if `--number-sections` + is specified. + +`--number-offset=`*NUMBER*[`,`*NUMBER*`,`*...*] + +: Offset for section headings in HTML output (ignored in other + output formats). The first number is added to the section number for + top-level headers, the second for second-level headers, and so on. + So, for example, if you want the first top-level header in your + document to be numbered "6", specify `--number-offset=5`. + If your document starts with a level-2 header which you want to + be numbered "1.5", specify `--number-offset=1,4`. + Offsets are 0 by default. Implies `--number-sections`. + +`--listings` + +: Use the [`listings`] package for LaTeX code blocks + +`-i`, `--incremental` + +: Make list items in slide shows display incrementally (one by one). + The default is for lists to be displayed all at once. + +`--slide-level=`*NUMBER* + +: Specifies that headers with the specified level create + slides (for `beamer`, `s5`, `slidy`, `slideous`, `dzslides`). Headers + above this level in the hierarchy are used to divide the + slide show into sections; headers below this level create + subheads within a slide. Note that content that is + not contained under slide-level headers will not appear in + the slide show. The default is to set the slide level based + on the contents of the document; see [Structuring the slide + show]. + +`--section-divs` + +: Wrap sections in `
` tags (or `
` tags for `html4`), + and attach identifiers to the enclosing `
` (or `
`) + rather than the header itself. See + [Header identifiers], below. + +`--email-obfuscation=none`|`javascript`|`references` + +: Specify a method for obfuscating `mailto:` links in HTML documents. + `none` leaves `mailto:` links as they are. `javascript` obfuscates + them using JavaScript. `references` obfuscates them by printing their + letters as decimal or hexadecimal character references. The default + is `none`. + +`--id-prefix=`*STRING* + +: Specify a prefix to be added to all identifiers and internal links + in HTML and DocBook output, and to footnote numbers in Markdown + and Haddock output. This is useful for preventing duplicate + identifiers when generating fragments to be included in other pages. + +`-T` *STRING*, `--title-prefix=`*STRING* + +: Specify *STRING* as a prefix at the beginning of the title + that appears in the HTML header (but not in the title as it + appears at the beginning of the HTML body). Implies + `--standalone`. + +`-c` *URL*, `--css=`*URL* + +: Link to a CSS style sheet. This option can be used repeatedly to + include multiple files. They will be included in the order specified. + + A stylesheet is required for generating EPUB. If none is + provided using this option (or the `stylesheet` metadata + field), pandoc will look for a file `epub.css` in the + user data directory (see `--data-dir`). If it is not + found there, sensible defaults will be used. + +`--reference-doc=`*FILE* + +: Use the specified file as a style reference in producing a + docx or ODT file. + + Docx + + : For best results, the reference docx should be a modified + version of a docx file produced using pandoc. The contents + of the reference docx are ignored, but its stylesheets and + document properties (including margins, page size, header, + and footer) are used in the new docx. If no reference docx + is specified on the command line, pandoc will look for a + file `reference.docx` in the user data directory (see + `--data-dir`). If this is not found either, sensible + defaults will be used. + + To produce a custom `reference.docx`, first get a copy of + the default `reference.docx`: `pandoc + --print-default-data-file reference.docx > + custom-reference.docx`. Then open `custom-reference.docx` + in Word, modify the styles as you wish, and save the file. + For best results, do not make changes to this file other + than modifying the styles used by pandoc: [paragraph] + Normal, Body Text, First Paragraph, Compact, Title, + Subtitle, Author, Date, Abstract, Bibliography, Heading 1, + Heading 2, Heading 3, Heading 4, Heading 5, Heading 6, + Heading 7, Heading 8, Heading 9, Block Text, Footnote Text, + Definition Term, Definition, Caption, Table Caption, + Image Caption, Figure, Captioned Figure, TOC Heading; + [character] Default Paragraph Font, Body Text Char, + Verbatim Char, Footnote Reference, Hyperlink; [table] + Table. + + ODT + + : For best results, the reference ODT should be a modified + version of an ODT produced using pandoc. The contents of + the reference ODT are ignored, but its stylesheets are used + in the new ODT. If no reference ODT is specified on the + command line, pandoc will look for a file `reference.odt` in + the user data directory (see `--data-dir`). If this is not + found either, sensible defaults will be used. + + To produce a custom `reference.odt`, first get a copy of + the default `reference.odt`: `pandoc + --print-default-data-file reference.odt > + custom-reference.odt`. Then open `custom-reference.odt` in + LibreOffice, modify the styles as you wish, and save the + file. + +`--epub-cover-image=`*FILE* + +: Use the specified image as the EPUB cover. It is recommended + that the image be less than 1000px in width and height. Note that + in a Markdown source document you can also specify `cover-image` + in a YAML metadata block (see [EPUB Metadata], below). + +`--epub-metadata=`*FILE* + +: Look in the specified XML file for metadata for the EPUB. + The file should contain a series of [Dublin Core elements]. + For example: + + Creative Commons + es-AR + + By default, pandoc will include the following metadata elements: + `` (from the document title), `` (from the + document authors), `` (from the document date, which should + be in [ISO 8601 format]), `` (from the `lang` + variable, or, if is not set, the locale), and `` (a randomly generated UUID). Any of these may be + overridden by elements in the metadata file. + + Note: if the source document is Markdown, a YAML metadata block + in the document can be used instead. See below under + [EPUB Metadata]. + +`--epub-embed-font=`*FILE* + +: Embed the specified font in the EPUB. This option can be repeated + to embed multiple fonts. Wildcards can also be used: for example, + `DejaVuSans-*.ttf`. However, if you use wildcards on the command + line, be sure to escape them or put the whole filename in single quotes, + to prevent them from being interpreted by the shell. To use the + embedded fonts, you will need to add declarations like the following + to your CSS (see `--css`): + + @font-face { + font-family: DejaVuSans; + font-style: normal; + font-weight: normal; + src:url("DejaVuSans-Regular.ttf"); + } + @font-face { + font-family: DejaVuSans; + font-style: normal; + font-weight: bold; + src:url("DejaVuSans-Bold.ttf"); + } + @font-face { + font-family: DejaVuSans; + font-style: italic; + font-weight: normal; + src:url("DejaVuSans-Oblique.ttf"); + } + @font-face { + font-family: DejaVuSans; + font-style: italic; + font-weight: bold; + src:url("DejaVuSans-BoldOblique.ttf"); + } + body { font-family: "DejaVuSans"; } + +`--epub-chapter-level=`*NUMBER* + +: Specify the header level at which to split the EPUB into separate + "chapter" files. The default is to split into chapters at level 1 + headers. This option only affects the internal composition of the + EPUB, not the way chapters and sections are displayed to users. Some + readers may be slow if the chapter files are too large, so for large + documents with few level 1 headers, one might want to use a chapter + level of 2 or 3. + +`--epub-subdirectory=`*DIRNAME* + +: Specify the subdirectory in the OCF container that is to hold + the EPUB-specific contents. The default is `EPUB`. To put + the EPUB contents in the top level, use an empty string. + +`--pdf-engine=pdflatex`|`lualatex`|`xelatex`|`wkhtmltopdf`|`weasyprint`|`prince`|`context`|`pdfroff` + +: Use the specified engine when producing PDF output. + The default is `pdflatex`. If the engine is not in your PATH, + the full path of the engine may be specified here. + +`--pdf-engine-opt=`*STRING* + +: Use the given string as a command-line argument to the `pdf-engine`. + If used multiple times, the arguments are provided with spaces between + them. Note that no check for duplicate options is done. + +[Dublin Core elements]: http://dublincore.org/documents/dces/ +[ISO 8601 format]: http://www.w3.org/TR/NOTE-datetime + +Citation rendering +------------------ + +`--bibliography=`*FILE* + +: Set the `bibliography` field in the document's metadata to *FILE*, + overriding any value set in the metadata, and process citations + using `pandoc-citeproc`. (This is equivalent to + `--metadata bibliography=FILE --filter pandoc-citeproc`.) + If `--natbib` or `--biblatex` is also supplied, `pandoc-citeproc` is not + used, making this equivalent to `--metadata bibliography=FILE`. + If you supply this argument multiple times, each *FILE* will be added + to bibliography. + +`--csl=`*FILE* + +: Set the `csl` field in the document's metadata to *FILE*, + overriding any value set in the metadata. (This is equivalent to + `--metadata csl=FILE`.) + This option is only relevant with `pandoc-citeproc`. + +`--citation-abbreviations=`*FILE* + +: Set the `citation-abbreviations` field in the document's metadata to + *FILE*, overriding any value set in the metadata. (This is equivalent to + `--metadata citation-abbreviations=FILE`.) + This option is only relevant with `pandoc-citeproc`. + +`--natbib` + +: Use [`natbib`] for citations in LaTeX output. This option is not for use + with the `pandoc-citeproc` filter or with PDF output. It is intended for + use in producing a LaTeX file that can be processed with [`bibtex`]. + +`--biblatex` + +: Use [`biblatex`] for citations in LaTeX output. This option is not for use + with the `pandoc-citeproc` filter or with PDF output. It is intended for + use in producing a LaTeX file that can be processed with [`bibtex`] or [`biber`]. + +Math rendering in HTML +---------------------- + +The default is to render TeX math as far as possible using Unicode characters. +Formulas are put inside a `span` with `class="math"`, so that they may be styled +differently from the surrounding text if needed. However, this gives acceptable +results only for basic math, usually you will want to use `--mathjax` or another +of the following options. + +`--mathjax`[`=`*URL*] + +: Use [MathJax] to display embedded TeX math in HTML output. + TeX math will be put between `\(...\)` (for inline math) + or `\[...\]` (for display math) and wrapped in `` tags + with class `math`. Then the MathJax JavaScript will render it. + The *URL* should point to the `MathJax.js` load script. + If a *URL* is not provided, a link to the Cloudflare CDN will + be inserted. + +`--mathml` + +: Convert TeX math to [MathML] (in `epub3`, `docbook4`, `docbook5`, `jats`, + `html4` and `html5`). This is the default in `odt` output. Note that + currently only Firefox and Safari (and select e-book readers) natively + support MathML. + +`--webtex`[`=`*URL*] + +: Convert TeX formulas to `` tags that link to an external script + that converts formulas to images. The formula will be URL-encoded + and concatenated with the URL provided. For SVG images you can for + example use `--webtex https://latex.codecogs.com/svg.latex?`. + If no URL is specified, the CodeCogs URL generating PNGs + will be used (`https://latex.codecogs.com/png.latex?`). + Note: the `--webtex` option will affect Markdown output + as well as HTML, which is useful if you're targeting a + version of Markdown without native math support. + +`--katex`[`=`*URL*] + +: Use [KaTeX] to display embedded TeX math in HTML output. + The *URL* is the base URL for the KaTeX library. If a *URL* is + not provided, a link to the KaTeX CDN will be inserted. + +`--katex-stylesheet=`*URL* + +: The *URL* should point to the `katex.css` stylesheet. If this option is + not specified, a link to the KaTeX CDN will be inserted. Note that this + option does not imply `--katex`. + +`-m` [*URL*], `--latexmathml`[`=`*URL*] + +: *Deprecated.* + Use the [LaTeXMathML] script to display embedded TeX math in HTML output. + TeX math will be displayed between `$` or `$$` characters and put in + `` tags with class `LaTeX`. The LaTeXMathML JavaScript will then + change it to MathML. Note that currently only Firefox and Safari + (and select e-book readers) natively support MathML. + To insert a link the `LaTeXMathML.js` script, provide a *URL*. + +`--jsmath`[`=`*URL*] + +: *Deprecated.* + Use [jsMath] (the predecessor of MathJax) to display embedded TeX + math in HTML output. TeX math will be put inside `` tags + (for inline math) or `
` tags (for display math) with class + `math` and rendered by the jsMath script. The *URL* should point to + the script (e.g. `jsMath/easy/load.js`); if provided, it will be linked + to in the header of standalone HTML documents. If a *URL* is not provided, + no link to the jsMath load script will be inserted; it is then + up to the author to provide such a link in the HTML template. + +`--gladtex` + +: *Deprecated.* + Enclose TeX math in `` tags in HTML output. The resulting HTML + can then be processed by [gladTeX] to produce images of the typeset + formulas and an HTML file with links to these images. + So, the procedure is: + + pandoc -s --gladtex input.md -o myfile.htex + gladtex -d myfile-images myfile.htex + # produces myfile.html and images in myfile-images + +`--mimetex`[`=`*URL*] + +: *Deprecated.* + Render TeX math using the [mimeTeX] CGI script, which generates an + image for each TeX formula. This should work in all browsers. If + *URL* is not specified, it is assumed that the script is at + `/cgi-bin/mimetex.cgi`. + +[MathML]: http://www.w3.org/Math/ +[LaTeXMathML]: http://math.etsu.edu/LaTeXMathML/ +[jsMath]: http://www.math.union.edu/~dpvc/jsmath/ +[MathJax]: https://www.mathjax.org +[gladTeX]: http://ans.hsh.no/home/mgg/gladtex/ +[mimeTeX]: http://www.forkosh.com/mimetex.html +[KaTeX]: https://github.com/Khan/KaTeX + +Options for wrapper scripts +--------------------------- + +`--dump-args` + +: Print information about command-line arguments to *stdout*, then exit. + This option is intended primarily for use in wrapper scripts. + The first line of output contains the name of the output file specified + with the `-o` option, or `-` (for *stdout*) if no output file was + specified. The remaining lines contain the command-line arguments, + one per line, in the order they appear. These do not include regular + pandoc options and their arguments, but do include any options appearing + after a `--` separator at the end of the line. + +`--ignore-args` + +: Ignore command-line arguments (for use in wrapper scripts). + Regular pandoc options are not ignored. Thus, for example, + + pandoc --ignore-args -o foo.html -s foo.txt -- -e latin1 + + is equivalent to + + pandoc -o foo.html -s + +Templates +========= + +When the `-s/--standalone` option is used, pandoc uses a template to +add header and footer material that is needed for a self-standing +document. To see the default template that is used, just type + + pandoc -D *FORMAT* + +where *FORMAT* is the name of the output format. A custom template +can be specified using the `--template` option. You can also override +the system default templates for a given output format *FORMAT* +by putting a file `templates/default.*FORMAT*` in the user data +directory (see `--data-dir`, above). *Exceptions:* + +- For `odt` output, customize the `default.opendocument` + template. +- For `pdf` output, customize the `default.latex` template + (or the `default.context` template, if you use `-t context`, + or the `default.ms` template, if you use `-t ms`, or the + `default.html5` template, if you use `-t html5`). +- `docx` has no template (however, you can use + `--reference-doc` to customize the output). + +Templates contain *variables*, which allow for the inclusion of +arbitrary information at any point in the file. Variables may be set +within the document using [YAML metadata blocks][Extension: +`yaml_metadata_block`]. They may also be set at the +command line using the `-V/--variable` option: variables set in this +way override metadata fields with the same name. + +Variables set by pandoc +----------------------- + +Some variables are set automatically by pandoc. These vary somewhat +depending on the output format, but include metadata fields as well +as the following: + +`sourcefile`, `outputfile` +: source and destination filenames, as given on the command line. + `sourcefile` can also be a list if input comes from multiple files, or empty + if input is from stdin. You can use the following snippet in your template + to distinguish them: + + $if(sourcefile)$ + $for(sourcefile)$ + $sourcefile$ + $endfor$ + $else$ + (stdin) + $endif$ + + Similarly, `outputfile` can be `-` if output goes to the terminal. + +`title`, `author`, `date` +: allow identification of basic aspects of the document. Included + in PDF metadata through LaTeX and ConTeXt. These can be set + through a [pandoc title block][Extension: `pandoc_title_block`], + which allows for multiple authors, or through a YAML metadata block: + + --- + author: + - Aristotle + - Peter Abelard + ... + +`subtitle` +: document subtitle, included in HTML, EPUB, LaTeX, ConTeXt, and Word docx; + renders in LaTeX only when using a document class that supports + `\subtitle`, such as `beamer` or the [KOMA-Script] series (`scrartcl`, + `scrreprt`, `scrbook`).[^subtitle] + +`institute` +: author affiliations (in LaTeX and Beamer only). Can be a + list, when there are multiple authors. + +`abstract` +: document summary, included in LaTeX, ConTeXt, AsciiDoc, and Word docx + +`keywords` +: list of keywords to be included in HTML, PDF, and AsciiDoc metadata; + may be repeated as for `author`, above + +`header-includes` +: contents specified by `-H/--include-in-header` (may have multiple + values) + +`toc` +: non-null value if `--toc/--table-of-contents` was specified + +`toc-title` +: title of table of contents (works only with EPUB, + opendocument, odt, docx) + +`include-before` +: contents specified by `-B/--include-before-body` (may have + multiple values) + +`include-after` +: contents specified by `-A/--include-after-body` (may have + multiple values) + +`body` +: body of document + +`meta-json` +: JSON representation of all of the document's metadata. Field + values are transformed to the selected output format. + +[^subtitle]: To make `subtitle` work with other LaTeX + document classes, you can add the following to `header-includes`: + + \providecommand{\subtitle}[1]{% + \usepackage{titling} + \posttitle{% + \par\large#1\end{center}} + } + +Language variables +------------------ + +`lang` +: identifies the main language of the document, + using a code according to [BCP 47] (e.g. `en` or `en-GB`). + For some output formats, pandoc will convert it to an appropriate + format stored in the additional variables `babel-lang`, + `polyglossia-lang` (LaTeX) and `context-lang` (ConTeXt). + + Native pandoc `span`s and `div`s with the lang attribute + (value in BCP 47) can be used to switch the language in + that range. + +`otherlangs` +: a list of other languages used in the document + in the YAML metadata, according to [BCP 47]. For example: + `otherlangs: [en-GB, fr]`. + This is automatically generated from the `lang` attributes + in all `span`s and `div`s but can be overridden. + Currently only used by LaTeX through the generated + `babel-otherlangs` and `polyglossia-otherlangs` variables. + The LaTeX writer outputs polyglossia commands in the text but + the `babel-newcommands` variable contains mappings for them + to the corresponding babel. + +`dir` +: the base direction of the document, either `rtl` (right-to-left) + or `ltr` (left-to-right). + + For bidirectional documents, native pandoc `span`s and `div`s + with the `dir` attribute (value `rtl` or `ltr`) can be used to + override the base direction in some output formats. + This may not always be necessary if the final renderer + (e.g. the browser, when generating HTML) supports the + [Unicode Bidirectional Algorithm]. + + When using LaTeX for bidirectional documents, only the `xelatex` engine + is fully supported (use `--pdf-engine=xelatex`). + +[BCP 47]: https://tools.ietf.org/html/bcp47 +[Unicode Bidirectional Algorithm]: http://www.w3.org/International/articles/inline-bidi-markup/uba-basics + +Variables for slides +-------------------- + +Variables are available for [producing slide shows with pandoc], +including all [reveal.js configuration options]. + +`titlegraphic` +: title graphic for Beamer documents + +`logo` +: logo for Beamer documents + +`slidy-url` +: base URL for Slidy documents (defaults to + `https://www.w3.org/Talks/Tools/Slidy2`) + +`slideous-url` +: base URL for Slideous documents (defaults to `slideous`) + +`s5-url` +: base URL for S5 documents (defaults to `s5/default`) + +`revealjs-url` +: base URL for reveal.js documents (defaults to `reveal.js`) + +`theme`, `colortheme`, `fonttheme`, `innertheme`, `outertheme` +: themes for LaTeX [`beamer`] documents + +`themeoptions` +: options for LaTeX beamer themes (a list). + +`navigation` +: controls navigation symbols in `beamer` documents + (default is `empty` for no navigation symbols; other valid values + are `frame`, `vertical`, and `horizontal`). + +`section-titles` +: enables on "title pages" for new sections in `beamer` + documents (default = true). + +`beamerarticle` +: when true, the `beamerarticle` package is loaded (for + producing an article from beamer slides). + +`aspectratio` +: aspect ratio of slides (for beamer only, `1610` for 16:10, `169` for 16:9, + `149` for 14:9, `141` for 1.41:1, `54` for 5:4, `43` for 4:3 which is the + default, and `32` for 3:2). + +[reveal.js configuration options]: https://github.com/hakimel/reveal.js#configuration + +Variables for LaTeX +------------------- + +LaTeX variables are used when [creating a PDF]. + +`papersize` +: paper size, e.g. `letter`, `a4` + +`fontsize` +: font size for body text (e.g. `10pt`, `12pt`) + +`documentclass` +: document class, e.g. [`article`], [`report`], [`book`], [`memoir`] + +`classoption` +: option for document class, e.g. `oneside`; may be repeated + for multiple options + +`geometry` +: option for [`geometry`] package, e.g. `margin=1in`; + may be repeated for multiple options + +`margin-left`, `margin-right`, `margin-top`, `margin-bottom` +: sets margins, if `geometry` is not used (otherwise `geometry` + overrides these) + +`linestretch` +: adjusts line spacing using the [`setspace`] + package, e.g. `1.25`, `1.5` + +`fontfamily` +: font package for use with `pdflatex`: + [TeX Live] includes many options, documented in the [LaTeX Font Catalogue]. + The default is [Latin Modern][`lm`]. + +`fontfamilyoptions` +: options for package used as `fontfamily`: e.g. `osf,sc` with + `fontfamily` set to [`mathpazo`] provides Palatino with old-style + figures and true small caps; may be repeated for multiple options + +`mainfont`, `sansfont`, `monofont`, `mathfont`, `CJKmainfont` +: font families for use with `xelatex` or + `lualatex`: take the name of any system font, using the + [`fontspec`] package. Note that if `CJKmainfont` is used, + the [`xecjk`] package must be available. + +`mainfontoptions`, `sansfontoptions`, `monofontoptions`, `mathfontoptions`, `CJKoptions` +: options to use with `mainfont`, `sansfont`, `monofont`, `mathfont`, + `CJKmainfont` in `xelatex` and `lualatex`. Allow for any choices + available through [`fontspec`], such as the OpenType features + `Numbers=OldStyle,Numbers=Proportional`. May be repeated for multiple options. + +`fontenc` +: allows font encoding to be specified through `fontenc` package (with `pdflatex`); + default is `T1` (see guide to [LaTeX font encodings]) + +`microtypeoptions` +: options to pass to the microtype package + +`colorlinks` +: add color to link text; automatically enabled if any of `linkcolor`, `citecolor`, + `urlcolor`, or `toccolor` are set + +`linkcolor`, `citecolor`, `urlcolor`, `toccolor` +: color for internal links, citation links, external links, and links in table of contents: + uses options allowed by [`xcolor`], including the `dvipsnames`, `svgnames`, and `x11names` lists + +`links-as-notes` +: causes links to be printed as footnotes + +`indent` +: uses document class settings for indentation (the default LaTeX template + otherwise removes indentation and adds space between paragraphs) + +`subparagraph` +: disables default behavior of LaTeX template that redefines (sub)paragraphs + as sections, changing the appearance of nested headings in some classes + +`thanks` +: specifies contents of acknowledgments footnote after document title. + +`toc` +: include table of contents (can also be set using `--toc/--table-of-contents`) + +`toc-depth` +: level of section to include in table of contents + +`secnumdepth` +: numbering depth for sections, if sections are numbered + +`lof`, `lot` +: include list of figures, list of tables + +`bibliography` +: bibliography to use for resolving references + +`biblio-style` +: bibliography style, when used with `--natbib` and `--biblatex`. + +`biblio-title` +: bibliography title, when used with `--natbib` and `--biblatex`. + +`biblatexoptions` +: list of options for biblatex. + +`natbiboptions` +: list of options for natbib. + +`pagestyle` +: An option for LaTeX's `\pagestyle{}`. The default article class + supports 'plain' (default), 'empty', and 'headings'; headings puts + section titles in the header. + +[`article`]: https://ctan.org/pkg/article +[`report`]: https://ctan.org/pkg/report +[`book`]: https://ctan.org/pkg/book +[KOMA-Script]: https://ctan.org/pkg/koma-script +[`memoir`]: https://ctan.org/pkg/memoir +[`xcolor`]: https://ctan.org/pkg/xcolor +[LaTeX Font Catalogue]: http://www.tug.dk/FontCatalogue/ +[`mathpazo`]: https://ctan.org/pkg/mathpazo +[LaTeX font encodings]: https://ctan.org/pkg/encguide + +Variables for ConTeXt +--------------------- + +`papersize` +: paper size, e.g. `letter`, `A4`, `landscape` (see [ConTeXt Paper Setup]); + may be repeated for multiple options + +`layout` +: options for page margins and text arrangement (see [ConTeXt Layout]); + may be repeated for multiple options + +`margin-left`, `margin-right`, `margin-top`, `margin-bottom` +: sets margins, if `layout` is not used (otherwise `layout` + overrides these) + +`fontsize` +: font size for body text (e.g. `10pt`, `12pt`) + +`mainfont`, `sansfont`, `monofont`, `mathfont` +: font families: take the name of any system font (see [ConTeXt Font Switching]) + +`linkcolor`, `contrastcolor` +: color for links outside and inside a page, e.g. `red`, `blue` (see [ConTeXt Color]) + +`linkstyle` +: typeface style for links, e.g. `normal`, `bold`, `slanted`, `boldslanted`, `type`, `cap`, `small` + +`indenting` +: controls indentation of paragraphs, e.g. `yes,small,next` (see [ConTeXt Indentation]); + may be repeated for multiple options + +`whitespace` +: spacing between paragraphs, e.g. `none`, `small` (using [`setupwhitespace`]) + +`interlinespace` +: adjusts line spacing, e.g. `4ex` (using [`setupinterlinespace`]); + may be repeated for multiple options + +`headertext`, `footertext` +: text to be placed in running header or footer (see [ConTeXt Headers and Footers]); + may be repeated up to four times for different placement + +`pagenumbering` +: page number style and location (using [`setuppagenumbering`]); + may be repeated for multiple options + +`toc` +: include table of contents (can also be set using `--toc/--table-of-contents`) + +`lof`, `lot` +: include list of figures, list of tables + +[ConTeXt Paper Setup]: http://wiki.contextgarden.net/PaperSetup +[ConTeXt Layout]: http://wiki.contextgarden.net/Layout +[ConTeXt Font Switching]: http://wiki.contextgarden.net/Font_Switching +[ConTeXt Color]: http://wiki.contextgarden.net/Color +[ConTeXt Headers and Footers]: http://wiki.contextgarden.net/Headers_and_Footers +[ConTeXt Indentation]: http://wiki.contextgarden.net/Indentation +[`setupwhitespace`]: http://wiki.contextgarden.net/Command/setupwhitespace +[`setupinterlinespace`]: http://wiki.contextgarden.net/Command/setupinterlinespace +[`setuppagenumbering`]: http://wiki.contextgarden.net/Command/setuppagenumbering + +Variables for man pages +----------------------- + +`section` +: section number in man pages + +`header` +: header in man pages + +`footer` +: footer in man pages + +`adjusting` +: adjusts text to left (`l`), right (`r`), center (`c`), + or both (`b`) margins + +`hyphenate` +: if `true` (the default), hyphenation will be used + +Variables for ms +---------------- + +`pointsize` +: point size (e.g. `10p`) + +`lineheight` +: line height (e.g. `12p`) + +`fontfamily` +: font family (e.g. `T` or `P`) + +`indent` +: paragraph indent (e.g. `2m`) + +Using variables in templates +---------------------------- + +Variable names are sequences of alphanumerics, `-`, and `_`, +starting with a letter. A variable name surrounded by `$` signs +will be replaced by its value. For example, the string `$title$` in + + $title$ + +will be replaced by the document title. + +To write a literal `$` in a template, use `$$`. + +Templates may contain conditionals. The syntax is as follows: + + $if(variable)$ + X + $else$ + Y + $endif$ + +This will include `X` in the template if `variable` has a non-null +value; otherwise it will include `Y`. `X` and `Y` are placeholders for +any valid template text, and may include interpolated variables or other +conditionals. The `$else$` section may be omitted. + +When variables can have multiple values (for example, `author` in +a multi-author document), you can use the `$for$` keyword: + + $for(author)$ + + $endfor$ + +You can optionally specify a separator to be used between +consecutive items: + + $for(author)$$author$$sep$, $endfor$ + +A dot can be used to select a field of a variable that takes +an object as its value. So, for example: + + $author.name$ ($author.affiliation$) + +If you use custom templates, you may need to revise them as pandoc +changes. We recommend tracking the changes in the default templates, +and modifying your custom templates accordingly. An easy way to do this +is to fork the [pandoc-templates] repository and merge in changes after each +pandoc release. + +Templates may contain comments: anything on a line after `$--` +will be treated as a comment and ignored. + +[pandoc-templates]: https://github.com/jgm/pandoc-templates + +Extensions +========== + +The behavior of some of the readers and writers can be adjusted by +enabling or disabling various extensions. + +An extension can be enabled by adding `+EXTENSION` +to the format name and disabled by adding `-EXTENSION`. For example, +`--from markdown_strict+footnotes` is strict Markdown with footnotes +enabled, while `--from markdown-footnotes-pipe_tables` is pandoc's +Markdown without footnotes or pipe tables. + +The markdown reader and writer make by far the most use of extensions. +Extensions only used by them are therefore covered in the +section [Pandoc's Markdown] below (See [Markdown variants] for +`commonmark` and `gfm`.) In the following, extensions that also work +for other formats are covered. + +Typography +---------- + +#### Extension: `smart` #### + +Interpret straight quotes as curly quotes, `---` as em-dashes, +`--` as en-dashes, and `...` as ellipses. Nonbreaking spaces are +inserted after certain abbreviations, such as "Mr." + +This extension can be enabled/disabled for the following formats: + +input formats +: `markdown`, `commonmark`, `latex`, `mediawiki`, `org`, `rst`, `twiki` + +output formats +: `markdown`, `latex`, `context`, `rst` + +enabled by default in +: `markdown`, `latex`, `context` (both input and output) + +Note: If you are *writing* Markdown, then the `smart` extension +has the reverse effect: what would have been curly quotes comes +out straight. + +In LaTeX, `smart` means to use the standard TeX ligatures +for quotation marks (` `` ` and ` '' ` for double quotes, +`` ` `` and `` ' `` for single quotes) and dashes (`--` for +en-dash and `---` for em-dash). If `smart` is disabled, +then in reading LaTeX pandoc will parse these characters +literally. In writing LaTeX, enabling `smart` tells pandoc +to use the ligatures when possible; if `smart` is disabled +pandoc will use unicode quotation mark and dash characters. + +Headers and sections +-------------------- + +#### Extension: `auto_identifiers` #### + +A header without an explicitly specified identifier will be +automatically assigned a unique identifier based on the header text. + +This extension can be enabled/disabled for the following formats: + +input formats +: `markdown`, `latex`, `rst`, `mediawiki`, `textile` + +output formats +: `markdown`, `muse` + +enabled by default in +: `markdown`, `muse` + +The algorithm used to derive the identifier from the header text is: + + - Remove all formatting, links, etc. + - Remove all footnotes. + - Remove all punctuation, except underscores, hyphens, and periods. + - Replace all spaces and newlines with hyphens. + - Convert all alphabetic characters to lowercase. + - Remove everything up to the first letter (identifiers may + not begin with a number or punctuation mark). + - If nothing is left after this, use the identifier `section`. + +Thus, for example, + + Header Identifier + ------------------------------- ---------------------------- + `Header identifiers in HTML` `header-identifiers-in-html` + `*Dogs*?--in *my* house?` `dogs--in-my-house` + `[HTML], [S5], or [RTF]?` `html-s5-or-rtf` + `3. Applications` `applications` + `33` `section` + +These rules should, in most cases, allow one to determine the identifier +from the header text. The exception is when several headers have the +same text; in this case, the first will get an identifier as described +above; the second will get the same identifier with `-1` appended; the +third with `-2`; and so on. + +These identifiers are used to provide link targets in the table of +contents generated by the `--toc|--table-of-contents` option. They +also make it easy to provide links from one section of a document to +another. A link to this section, for example, might look like this: + + See the section on + [header identifiers](#header-identifiers-in-html-latex-and-context). + +Note, however, that this method of providing links to sections works +only in HTML, LaTeX, and ConTeXt formats. + +If the `--section-divs` option is specified, then each section will +be wrapped in a `section` (or a `div`, if `html4` was specified), +and the identifier will be attached to the enclosing `
` +(or `
`) tag rather than the header itself. This allows entire +sections to be manipulated using JavaScript or treated differently in +CSS. + +#### Extension: `ascii_identifiers` #### + +Causes the identifiers produced by `auto_identifiers` to be pure ASCII. +Accents are stripped off of accented Latin letters, and non-Latin +letters are omitted. + +Math Input +---------- + +The extensions [`tex_math_dollars`](#extension-tex_math_dollars), +[`tex_math_single_backslash`](#extension-tex_math_single_backslash), and +[`tex_math_double_backslash`](#extension-tex_math_double_backslash) +are described in the section about Pandoc's Markdown. + +However, they can also be used with HTML input. This is handy for +reading web pages formatted using MathJax, for example. + +Raw HTML/TeX +------------ + +The following extensions (especially how they affect Markdown +input/output) are also described in more detail in their respective +sections of [Pandoc's Markdown]. + +#### [Extension: `raw_html`] {#raw_html} + +When converting from HTML, parse elements to raw HTML which are not +representable in pandoc's AST. +By default, this is disabled for HTML input. + +#### [Extension: `raw_tex`] {#raw_tex} + +Allows raw LaTeX, TeX, and ConTeXt to be included in a document. + +This extension can be enabled/disabled for the following formats +(in addition to `markdown`): + +input formats +: `latex`, `org`, `textile` + +output formats +: `textile` + +#### [Extension: `native_divs`] {#native_divs} + +This extension is enabled by default for HTML input. This means that +`div`s are parsed to pandoc native elements. (Alternatively, you +can parse them to raw HTML using `-f html-native_divs+raw_html`.) + +When converting HTML to Markdown, for example, you may want to drop all +`div`s and `span`s: + + pandoc -f html-native_divs-native_spans -t markdown + +#### [Extension: `native_spans`] {#native_spans} + +Analogous to `native_divs` above. + + +Literate Haskell support +------------------------ + +#### Extension: `literate_haskell` #### + +Treat the document as literate Haskell source. + +This extension can be enabled/disabled for the following formats: + +input formats +: `markdown`, `rst`, `latex` + +output formats +: `markdown`, `rst`, `latex`, `html` + +If you append `+lhs` (or `+literate_haskell`) to one of the formats +above, pandoc will treat the document as literate Haskell source. +This means that + + - In Markdown input, "bird track" sections will be parsed as Haskell + code rather than block quotations. Text between `\begin{code}` + and `\end{code}` will also be treated as Haskell code. For + ATX-style headers the character '=' will be used instead of '#'. + + - In Markdown output, code blocks with classes `haskell` and `literate` + will be rendered using bird tracks, and block quotations will be + indented one space, so they will not be treated as Haskell code. + In addition, headers will be rendered setext-style (with underlines) + rather than ATX-style (with '#' characters). (This is because ghc + treats '#' characters in column 1 as introducing line numbers.) + + - In restructured text input, "bird track" sections will be parsed + as Haskell code. + + - In restructured text output, code blocks with class `haskell` will + be rendered using bird tracks. + + - In LaTeX input, text in `code` environments will be parsed as + Haskell code. + + - In LaTeX output, code blocks with class `haskell` will be rendered + inside `code` environments. + + - In HTML output, code blocks with class `haskell` will be rendered + with class `literatehaskell` and bird tracks. + +Examples: + + pandoc -f markdown+lhs -t html + +reads literate Haskell source formatted with Markdown conventions and writes +ordinary HTML (without bird tracks). + + pandoc -f markdown+lhs -t html+lhs + +writes HTML with the Haskell code in bird tracks, so it can be copied +and pasted as literate Haskell source. + +Note that GHC expects the bird tracks in the first column, so indentend literate +code blocks (e.g. inside an itemized environment) will not be picked up by the +Haskell compiler. + +Other extensions +---------------- + +#### Extension: `empty_paragraphs` #### + +Allows empty paragraphs. By default empty paragraphs are +omitted. + +This extension can be enabled/disabled for the following formats: + +input formats +: `docx`, `html` + +output formats +: `markdown`, `docx`, `odt`, `opendocument`, `html` + +#### Extension: `amuse` #### + +In the `muse` input format, this enables Text::Amuse +extensions to Emacs Muse markup. + +#### Extension: `citations` {#org-citations} + +Some aspects of [Pandoc's Markdown citation syntax](#citations) are also accepted +in `org` input. + + +Pandoc's Markdown +================= + +Pandoc understands an extended and slightly revised version of +John Gruber's [Markdown] syntax. This document explains the syntax, +noting differences from standard Markdown. Except where noted, these +differences can be suppressed by using the `markdown_strict` format instead +of `markdown`. Extensions can be enabled or disabled to specify the +behavior more granularly. They are described in the following. See also +[Extensions] above, for extensions that work also on other formats. + +Philosophy +---------- + +Markdown is designed to be easy to write, and, even more importantly, +easy to read: + +> A Markdown-formatted document should be publishable as-is, as plain +> text, without looking like it's been marked up with tags or formatting +> instructions. +> -- [John Gruber](http://daringfireball.net/projects/markdown/syntax#philosophy) + +This principle has guided pandoc's decisions in finding syntax for +tables, footnotes, and other extensions. + +There is, however, one respect in which pandoc's aims are different +from the original aims of Markdown. Whereas Markdown was originally +designed with HTML generation in mind, pandoc is designed for multiple +output formats. Thus, while pandoc allows the embedding of raw HTML, +it discourages it, and provides other, non-HTMLish ways of representing +important document elements like definition lists, tables, mathematics, and +footnotes. + +Paragraphs +---------- + +A paragraph is one or more lines of text followed by one or more blank lines. +Newlines are treated as spaces, so you can reflow your paragraphs as you like. +If you need a hard line break, put two or more spaces at the end of a line. + +#### Extension: `escaped_line_breaks` #### + +A backslash followed by a newline is also a hard line break. +Note: in multiline and grid table cells, this is the only way +to create a hard line break, since trailing spaces in the cells +are ignored. + +Headers +------- + +There are two kinds of headers: Setext and ATX. + +### Setext-style headers ### + +A setext-style header is a line of text "underlined" with a row of `=` signs +(for a level one header) or `-` signs (for a level two header): + + A level-one header + ================== + + A level-two header + ------------------ + +The header text can contain inline formatting, such as emphasis (see +[Inline formatting], below). + + +### ATX-style headers ### + +An ATX-style header consists of one to six `#` signs and a line of +text, optionally followed by any number of `#` signs. The number of +`#` signs at the beginning of the line is the header level: + + ## A level-two header + + ### A level-three header ### + +As with setext-style headers, the header text can contain formatting: + + # A level-one header with a [link](/url) and *emphasis* + +#### Extension: `blank_before_header` #### + +Standard Markdown syntax does not require a blank line before a header. +Pandoc does require this (except, of course, at the beginning of the +document). The reason for the requirement is that it is all too easy for a +`#` to end up at the beginning of a line by accident (perhaps through line +wrapping). Consider, for example: + + I like several of their flavors of ice cream: + #22, for example, and #5. + +#### Extension: `space_in_atx_header` #### + +Many Markdown implementations do not require a space between the +opening `#`s of an ATX header and the header text, so that +`#5 bolt` and `#hashtag` count as headers. With this extension, +pandoc does require the space. + +### Header identifiers ### + +See also the [`auto_identifiers` extension](#extension-auto_identifiers) above. + +#### Extension: `header_attributes` #### + +Headers can be assigned attributes using this syntax at the end +of the line containing the header text: + + {#identifier .class .class key=value key=value} + +Thus, for example, the following headers will all be assigned the identifier +`foo`: + + # My header {#foo} + + ## My header ## {#foo} + + My other header {#foo} + --------------- + +(This syntax is compatible with [PHP Markdown Extra].) + +Note that although this syntax allows assignment of classes and key/value +attributes, writers generally don't use all of this information. Identifiers, +classes, and key/value attributes are used in HTML and HTML-based formats such +as EPUB and slidy. Identifiers are used for labels and link anchors in the +LaTeX, ConTeXt, Textile, and AsciiDoc writers. + +Headers with the class `unnumbered` will not be numbered, even if +`--number-sections` is specified. A single hyphen (`-`) in an attribute +context is equivalent to `.unnumbered`, and preferable in non-English +documents. So, + + # My header {-} + +is just the same as + + # My header {.unnumbered} + +#### Extension: `implicit_header_references` #### + +Pandoc behaves as if reference links have been defined for each header. +So, to link to a header + + # Header identifiers in HTML + +you can simply write + + [Header identifiers in HTML] + +or + + [Header identifiers in HTML][] + +or + + [the section on header identifiers][header identifiers in + HTML] + +instead of giving the identifier explicitly: + + [Header identifiers in HTML](#header-identifiers-in-html) + +If there are multiple headers with identical text, the corresponding +reference will link to the first one only, and you will need to use explicit +links to link to the others, as described above. + +Like regular reference links, these references are case-insensitive. + +Explicit link reference definitions always take priority over +implicit header references. So, in the following example, the +link will point to `bar`, not to `#foo`: + + # Foo + + [foo]: bar + + See [foo] + +Block quotations +---------------- + +Markdown uses email conventions for quoting blocks of text. +A block quotation is one or more paragraphs or other block elements +(such as lists or headers), with each line preceded by a `>` character +and an optional space. (The `>` need not start at the left margin, but +it should not be indented more than three spaces.) + + > This is a block quote. This + > paragraph has two lines. + > + > 1. This is a list inside a block quote. + > 2. Second item. + +A "lazy" form, which requires the `>` character only on the first +line of each block, is also allowed: + + > This is a block quote. This + paragraph has two lines. + + > 1. This is a list inside a block quote. + 2. Second item. + +Among the block elements that can be contained in a block quote are +other block quotes. That is, block quotes can be nested: + + > This is a block quote. + > + > > A block quote within a block quote. + +If the `>` character is followed by an optional space, that space +will be considered part of the block quote marker and not part of +the indentation of the contents. Thus, to put an indented code +block in a block quote, you need five spaces after the `>`: + + > code + +#### Extension: `blank_before_blockquote` #### + +Standard Markdown syntax does not require a blank line before a block +quote. Pandoc does require this (except, of course, at the beginning of the +document). The reason for the requirement is that it is all too easy for a +`>` to end up at the beginning of a line by accident (perhaps through line +wrapping). So, unless the `markdown_strict` format is used, the following does +not produce a nested block quote in pandoc: + + > This is a block quote. + >> Nested. + + +Verbatim (code) blocks +---------------------- + +### Indented code blocks ### + +A block of text indented four spaces (or one tab) is treated as verbatim +text: that is, special characters do not trigger special formatting, +and all spaces and line breaks are preserved. For example, + + if (a > 3) { + moveShip(5 * gravity, DOWN); + } + +The initial (four space or one tab) indentation is not considered part +of the verbatim text, and is removed in the output. + +Note: blank lines in the verbatim text need not begin with four spaces. + + +### Fenced code blocks ### + +#### Extension: `fenced_code_blocks` #### + +In addition to standard indented code blocks, pandoc supports +*fenced* code blocks. These begin with a row of three or more +tildes (`~`) and end with a row of tildes that must be at least as long as +the starting row. Everything between these lines is treated as code. No +indentation is necessary: + + ~~~~~~~ + if (a > 3) { + moveShip(5 * gravity, DOWN); + } + ~~~~~~~ + +Like regular code blocks, fenced code blocks must be separated +from surrounding text by blank lines. + +If the code itself contains a row of tildes or backticks, just use a longer +row of tildes or backticks at the start and end: + + ~~~~~~~~~~~~~~~~ + ~~~~~~~~~~ + code including tildes + ~~~~~~~~~~ + ~~~~~~~~~~~~~~~~ + +#### Extension: `backtick_code_blocks` #### + +Same as `fenced_code_blocks`, but uses backticks (`` ` ``) instead of tildes +(`~`). + +#### Extension: `fenced_code_attributes` #### + +Optionally, you may attach attributes to fenced or backtick code block using +this syntax: + + ~~~~ {#mycode .haskell .numberLines startFrom="100"} + qsort [] = [] + qsort (x:xs) = qsort (filter (< x) xs) ++ [x] ++ + qsort (filter (>= x) xs) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here `mycode` is an identifier, `haskell` and `numberLines` are classes, and +`startFrom` is an attribute with value `100`. Some output formats can use this +information to do syntax highlighting. Currently, the only output formats +that uses this information are HTML, LaTeX, Docx, and Ms. If highlighting +is supported for your output format and language, then the code block above +will appear highlighted, with numbered lines. (To see which languages are +supported, type `pandoc --list-highlight-languages`.) Otherwise, the code +block above will appear as follows: + +
+      
+      ...
+      
+    
+ +The `numberLines` (or `number-lines`) class will cause the lines +of the code block to be numbered, starting with `1` or the value +of the `startFrom` attribute. The `lineAnchors` (or +`line-anchors`) class will cause the lines to be clickable +anchors in HTML output. + +A shortcut form can also be used for specifying the language of +the code block: + + ```haskell + qsort [] = [] + ``` + +This is equivalent to: + + ``` {.haskell} + qsort [] = [] + ``` + +If the `fenced_code_attributes` extension is disabled, but +input contains class attribute(s) for the code block, the first +class attribute will be printed after the opening fence as a bare +word. + +To prevent all highlighting, use the `--no-highlight` flag. +To set the highlighting style, use `--highlight-style`. +For more information on highlighting, see [Syntax highlighting], +below. + +Line blocks +----------- + +#### Extension: `line_blocks` #### + +A line block is a sequence of lines beginning with a vertical bar (`|`) +followed by a space. The division into lines will be preserved in +the output, as will any leading spaces; otherwise, the lines will +be formatted as Markdown. This is useful for verse and addresses: + + | The limerick packs laughs anatomical + | In space that is quite economical. + | But the good ones I've seen + | So seldom are clean + | And the clean ones so seldom are comical + + | 200 Main St. + | Berkeley, CA 94718 + +The lines can be hard-wrapped if needed, but the continuation +line must begin with a space. + + | The Right Honorable Most Venerable and Righteous Samuel L. + Constable, Jr. + | 200 Main St. + | Berkeley, CA 94718 + +This syntax is borrowed from [reStructuredText]. + +Lists +----- + +### Bullet lists ### + +A bullet list is a list of bulleted list items. A bulleted list +item begins with a bullet (`*`, `+`, or `-`). Here is a simple +example: + + * one + * two + * three + +This will produce a "compact" list. If you want a "loose" list, in which +each item is formatted as a paragraph, put spaces between the items: + + * one + + * two + + * three + +The bullets need not be flush with the left margin; they may be +indented one, two, or three spaces. The bullet must be followed +by whitespace. + +List items look best if subsequent lines are flush with the first +line (after the bullet): + + * here is my first + list item. + * and my second. + +But Markdown also allows a "lazy" format: + + * here is my first + list item. + * and my second. + +### Block content in list items ### + +A list item may contain multiple paragraphs and other block-level +content. However, subsequent paragraphs must be preceded by a blank line +and indented to line up with the first non-space content after +the list marker. + + * First paragraph. + + Continued. + + * Second paragraph. With a code block, which must be indented + eight spaces: + + { code } + +Exception: if the list marker is followed by an indented code +block, which must begin 5 spaces after the list marker, then +subsequent paragraphs must begin two columns after the last +character of the list marker: + + * code + + continuation paragraph + +List items may include other lists. In this case the preceding blank +line is optional. The nested list must be indented to line up with +the first non-space character after the list marker of the +containing list item. + + * fruits + + apples + - macintosh + - red delicious + + pears + + peaches + * vegetables + + broccoli + + chard + +As noted above, Markdown allows you to write list items "lazily," instead of +indenting continuation lines. However, if there are multiple paragraphs or +other blocks in a list item, the first line of each must be indented. + + + A lazy, lazy, list + item. + + + Another one; this looks + bad but is legal. + + Second paragraph of second + list item. + +### Ordered lists ### + +Ordered lists work just like bulleted lists, except that the items +begin with enumerators rather than bullets. + +In standard Markdown, enumerators are decimal numbers followed +by a period and a space. The numbers themselves are ignored, so +there is no difference between this list: + + 1. one + 2. two + 3. three + +and this one: + + 5. one + 7. two + 1. three + +#### Extension: `fancy_lists` #### + +Unlike standard Markdown, pandoc allows ordered list items to be marked +with uppercase and lowercase letters and roman numerals, in addition to +Arabic numerals. List markers may be enclosed in parentheses or followed by a +single right-parentheses or period. They must be separated from the +text that follows by at least one space, and, if the list marker is a +capital letter with a period, by at least two spaces.[^2] + +[^2]: The point of this rule is to ensure that normal paragraphs + starting with people's initials, like + + B. Russell was an English philosopher. + + do not get treated as list items. + + This rule will not prevent + + (C) 2007 Joe Smith + + from being interpreted as a list item. In this case, a backslash + escape can be used: + + (C\) 2007 Joe Smith + +The `fancy_lists` extension also allows '`#`' to be used as an +ordered list marker in place of a numeral: + + #. one + #. two + +#### Extension: `startnum` #### + +Pandoc also pays attention to the type of list marker used, and to the +starting number, and both of these are preserved where possible in the +output format. Thus, the following yields a list with numbers followed +by a single parenthesis, starting with 9, and a sublist with lowercase +roman numerals: + + 9) Ninth + 10) Tenth + 11) Eleventh + i. subone + ii. subtwo + iii. subthree + +Pandoc will start a new list each time a different type of list +marker is used. So, the following will create three lists: + + (2) Two + (5) Three + 1. Four + * Five + +If default list markers are desired, use `#.`: + + #. one + #. two + #. three + + +### Definition lists ### + +#### Extension: `definition_lists` #### + +Pandoc supports definition lists, using the syntax of +[PHP Markdown Extra] with some extensions.[^3] + + Term 1 + + : Definition 1 + + Term 2 with *inline markup* + + : Definition 2 + + { some code, part of Definition 2 } + + Third paragraph of definition 2. + +Each term must fit on one line, which may optionally be followed by +a blank line, and must be followed by one or more definitions. +A definition begins with a colon or tilde, which may be indented one +or two spaces. + +A term may have multiple definitions, and each definition may consist of one or +more block elements (paragraph, code block, list, etc.), each indented four +spaces or one tab stop. The body of the definition (including the first line, +aside from the colon or tilde) should be indented four spaces. However, +as with other Markdown lists, you can "lazily" omit indentation except +at the beginning of a paragraph or other block element: + + Term 1 + + : Definition + with lazy continuation. + + Second paragraph of the definition. + +If you leave space before the definition (as in the example above), +the text of the definition will be treated as a paragraph. In some +output formats, this will mean greater spacing between term/definition +pairs. For a more compact definition list, omit the space before the +definition: + + Term 1 + ~ Definition 1 + + Term 2 + ~ Definition 2a + ~ Definition 2b + +Note that space between items in a definition list is required. +(A variant that loosens this requirement, but disallows "lazy" +hard wrapping, can be activated with `compact_definition_lists`: see +[Non-pandoc extensions], below.) + +[^3]: I have been influenced by the suggestions of [David Wheeler](http://www.justatheory.com/computers/markup/modest-markdown-proposal.html). + +### Numbered example lists ### + +#### Extension: `example_lists` #### + +The special list marker `@` can be used for sequentially numbered +examples. The first list item with a `@` marker will be numbered '1', +the next '2', and so on, throughout the document. The numbered examples +need not occur in a single list; each new list using `@` will take up +where the last stopped. So, for example: + + (@) My first example will be numbered (1). + (@) My second example will be numbered (2). + + Explanation of examples. + + (@) My third example will be numbered (3). + +Numbered examples can be labeled and referred to elsewhere in the +document: + + (@good) This is a good example. + + As (@good) illustrates, ... + +The label can be any string of alphanumeric characters, underscores, +or hyphens. + +Note: continuation paragraphs in example lists must always +be indented four spaces, regardless of the length of the +list marker. That is, example lists always behave as if the +`four_space_rule` extension is set. This is because example +labels tend to be long, and indenting content to the +first non-space character after the label would be awkward. + +### Compact and loose lists ### + +Pandoc behaves differently from `Markdown.pl` on some "edge +cases" involving lists. Consider this source: + + + First + + Second: + - Fee + - Fie + - Foe + + + Third + +Pandoc transforms this into a "compact list" (with no `

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

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

This is the abstract.

+

It consists of two paragraphs.

+ +Variables can contain arbitrary YAML structures, but the template must match +this structure. The `author` variable in the default templates expects a +simple list or string, but can be changed to support more complicated +structures. The following combination, for example, would add an affiliation +to the author if one is given: + + --- + title: The document title + author: + - name: Author One + affiliation: University of Somewhere + - name: Author Two + affiliation: University of Nowhere + ... + +To use the structured authors in the example above, you would need a custom +template: + + $for(author)$ + $if(author.name)$ + $author.name$$if(author.affiliation)$ ($author.affiliation$)$endif$ + $else$ + $author$ + $endif$ + $endfor$ + + +Backslash escapes +----------------- + +#### Extension: `all_symbols_escapable` #### + +Except inside a code block or inline code, any punctuation or space +character preceded by a backslash will be treated literally, even if it +would normally indicate formatting. Thus, for example, if one writes + + *\*hello\** + +one will get + + *hello* + +instead of + + hello + +This rule is easier to remember than standard Markdown's rule, +which allows only the following characters to be backslash-escaped: + + \`*_{}[]()>#+-.! + +(However, if the `markdown_strict` format is used, the standard Markdown rule +will be used.) + +A backslash-escaped space is parsed as a nonbreaking space. It will +appear in TeX output as `~` and in HTML and XML as `\ ` or +`\ `. + +A backslash-escaped newline (i.e. a backslash occurring at the end of +a line) is parsed as a hard line break. It will appear in TeX output as +`\\` and in HTML as `
`. This is a nice alternative to +Markdown's "invisible" way of indicating hard line breaks using +two trailing spaces on a line. + +Backslash escapes do not work in verbatim contexts. + +Inline formatting +----------------- + +### Emphasis ### + +To *emphasize* some text, surround it with `*`s or `_`, like this: + + This text is _emphasized with underscores_, and this + is *emphasized with asterisks*. + +Double `*` or `_` produces **strong emphasis**: + + This is **strong emphasis** and __with underscores__. + +A `*` or `_` character surrounded by spaces, or backslash-escaped, +will not trigger emphasis: + + This is * not emphasized *, and \*neither is this\*. + +#### Extension: `intraword_underscores` #### + +Because `_` is sometimes used inside words and identifiers, +pandoc does not interpret a `_` surrounded by alphanumeric +characters as an emphasis marker. If you want to emphasize +just part of a word, use `*`: + + feas*ible*, not feas*able*. + + +### Strikeout ### + +#### Extension: `strikeout` #### + +To strikeout a section of text with a horizontal line, begin and end it +with `~~`. Thus, for example, + + This ~~is deleted text.~~ + + +### Superscripts and subscripts ### + +#### Extension: `superscript`, `subscript` #### + +Superscripts may be written by surrounding the superscripted text by `^` +characters; subscripts may be written by surrounding the subscripted +text by `~` characters. Thus, for example, + + H~2~O is a liquid. 2^10^ is 1024. + +If the superscripted or subscripted text contains spaces, these spaces +must be escaped with backslashes. (This is to prevent accidental +superscripting and subscripting through the ordinary use of `~` and `^`.) +Thus, if you want the letter P with 'a cat' in subscripts, use +`P~a\ cat~`, not `P~a cat~`. + + +### Verbatim ### + +To make a short span of text verbatim, put it inside backticks: + + What is the difference between `>>=` and `>>`? + +If the verbatim text includes a backtick, use double backticks: + + Here is a literal backtick `` ` ``. + +(The spaces after the opening backticks and before the closing +backticks will be ignored.) + +The general rule is that a verbatim span starts with a string +of consecutive backticks (optionally followed by a space) +and ends with a string of the same number of backticks (optionally +preceded by a space). + +Note that backslash-escapes (and other Markdown constructs) do not +work in verbatim contexts: + + This is a backslash followed by an asterisk: `\*`. + +#### Extension: `inline_code_attributes` #### + +Attributes can be attached to verbatim text, just as with +[fenced code blocks]: + + `<$>`{.haskell} + +### Small caps ### + +To write small caps, use the `smallcaps` class: + + [Small caps]{.smallcaps} + +Or, without the `bracketed_spans` extension: + + Small caps + +For compatibility with other Markdown flavors, CSS is also supported: + + Small caps + +This will work in all output formats that support small caps. + + +Math +---- + +#### Extension: `tex_math_dollars` #### + +Anything between two `$` characters will be treated as TeX math. The +opening `$` must have a non-space character immediately to its right, +while the closing `$` must have a non-space character immediately to its +left, and must not be followed immediately by a digit. Thus, +`$20,000 and $30,000` won't parse as math. If for some reason +you need to enclose text in literal `$` characters, backslash-escape +them and they won't be treated as math delimiters. + +TeX math will be printed in all output formats. How it is rendered +depends on the output format: + +Markdown, LaTeX, Emacs Org mode, ConTeXt, ZimWiki + ~ It will appear verbatim between `$` characters. + +reStructuredText + ~ It will be rendered using an [interpreted text role `:math:`]. + +AsciiDoc + ~ It will be rendered as `latexmath:[...]`. + +Texinfo + ~ It will be rendered inside a `@math` command. + +groff man + ~ It will be rendered verbatim without `$`'s. + +MediaWiki, DokuWiki + ~ It will be rendered inside `` tags. + +Textile + ~ It will be rendered inside `` tags. + +RTF, OpenDocument + ~ It will be rendered, if possible, using Unicode characters, + and will otherwise appear verbatim. + +ODT + ~ It will be rendered, if possible, using MathML. + +DocBook + ~ If the `--mathml` flag is used, it will be rendered using MathML + in an `inlineequation` or `informalequation` tag. Otherwise it + will be rendered, if possible, using Unicode characters. + +Docx + ~ It will be rendered using OMML math markup. + +FictionBook2 + ~ If the `--webtex` option is used, formulas are rendered as images + using CodeCogs or other compatible web service, downloaded + and embedded in the e-book. Otherwise, they will appear verbatim. + +HTML, Slidy, DZSlides, S5, EPUB + ~ The way math is rendered in HTML will depend on the + command-line options selected. Therefore see [Math rendering in HTML] + above. + +[interpreted text role `:math:`]: http://docutils.sourceforge.net/docs/ref/rst/roles.html#math + +Raw HTML +-------- + +#### Extension: `raw_html` #### + +Markdown allows you to insert raw HTML (or DocBook) anywhere in a document +(except verbatim contexts, where `<`, `>`, and `&` are interpreted +literally). (Technically this is not an extension, since standard +Markdown allows it, but it has been made an extension so that it can +be disabled if desired.) + +The raw HTML is passed through unchanged in HTML, S5, Slidy, Slideous, +DZSlides, EPUB, Markdown, Emacs Org mode, and Textile output, and suppressed +in other formats. + +#### Extension: `markdown_in_html_blocks` #### + +Standard Markdown allows you to include HTML "blocks": blocks +of HTML between balanced tags that are separated from the surrounding text +with blank lines, and start and end at the left margin. Within +these blocks, everything is interpreted as HTML, not Markdown; +so (for example), `*` does not signify emphasis. + +Pandoc behaves this way when the `markdown_strict` format is used; but +by default, pandoc interprets material between HTML block tags as Markdown. +Thus, for example, pandoc will turn + + + + + + +
*one*[a link](http://google.com)
+ +into + + + + + + +
onea link
+ +whereas `Markdown.pl` will preserve it as is. + +There is one exception to this rule: text between `` or a + style contains `. With this change, pandoc's + html5 writer creates HTML that is both valid HTML5 and valid XHTML. + + Regularized CSS in html/epub/html slide templates (#3485). + All templates now include `code{white-space: pre-wrap}` + and CSS for `q` if `--html-q-tags` is used. Previously some templates + had `pre` and others `pre-wrap`; the `q` styles were only sometimes + included. + + CSS for `.smallcaps`, (Mauro Bieg, #1592) + + `default.revealjs`: make `history` default to true. + + `default.revealjs`: use lazy loading (#2283). + + `default.revealjs`: add `mathjax` variable and some conditional code + to use the MathJaX plugin. + + `default.slidy` uses `https` instead of `http` (ickc, #3848). + + `default.dzslides`: Load Google Font using HTTPS by default + (Yoan Blanc). + + * DocBook5 template: Use `lang` and `subtitle` variables (Jens Getreu, + #3855). + + * LaTeX/Beamer template: + + + Combine LaTeX/Beamer templates (Andrew Dunning, #3878). + `default.beamer` has been removed; beamer now uses the + `default.latex` template. Beamer-specific parts are conditional + on the `beamer` variable set by the writer. Note that + `pandoc -D beamer` will return this (combined) template. + + Use `xcolor` for `colorlinks` option (Andrew Dunning, #3877). + Beamer loads `xcolor` rather than `color`, and thus the + `dvipsnames` option doesn't take effect. This also provides a wider + range of colour selections with the `svgnames` option. + + Use starred versions of `xcolor` names (Andrew Dunning). + Prevents changes to documents defined using the `dvipsnames` list (e.g. + `Blue` gives a different result with svgnames enabled). + + Load `polyglossia` after header-includes (#3898). It needs to be + loaded as late as possible. + + Use `unicode-math` (Vaclav Haisman). Use `mathspec` with only + XeLaTeX on request. + + Don't load `fontspec` before `unicode-math` (over there). + The `unicode-math` package loads `fontspec` so explict loading of + `fontspec` before `unicode-math` is not necessary. + + Use `unicode-math` by default in default.latex template. mathspec will + be used in xelatex if the `mathspec` variable is set; otherwise + unicode-math will be used (Václav Haisman). + + Use `dvipsnames` options when `colorlinks` specified (otherwise + we get an error for `maroon`) (Thomas Hodgson). + + Added beamer `titlegraphic` and `logo` variables (Thomas Hodgson). + + Fix typo in fix for notes in tables (#2378, zeeMonkeez). + + Fix `hyperref` options clash (Andrew Dunning, #3847) Avoids an options + clash when loading a package (e.g. `tufte-latex`) that uses + `hyperref` settings different from those in the template. + + Add `natbiboptions` variable (#3768). + + Fix links inside captions in LaTeX output with links-as-notes + (Václav Haisman, #3651). Declare our redefined `\href` robust. + + Load `parskip` before `hyperref` (Václav Haisman, #3654). + + Allow setting Japanese fonts when using LuaLaTeX (Václav Haisman, + #3873). by using the `luatexja-fontspec` and `luatexja-preset` + packages. Use existing `CJKmainfont` and `CJKoptions` template + variables. Add `luatexjafontspecoptions` for `luatexja-fontspec` + and `luatexjapresetoptions` for `luatexja-preset`. + + Added `aspectratio` variable to beamer template (Václav Haisman, + #3723). + + Modified template.latex to fix XeLaTex being used with tables + (lwolfsonkin, #3661). Reordered `lang` variable handling to + immediately before `bidi`. + + * ConTeXt template: Improved font handling: `simplefonts` is now + obsolete in ConTeXt (Pablo Rodríguez). + + + [documentation improvements] + + * MANUAL.txt: + + + Add URL for Prince HTML > PDF engine (Ian, #3919). + + Document that content above slide-level will be omitted in + slide shows. See #3460, #2265. + + Explain `--webtex` SVG url (Mauro Bieg, #3471) + + Small clarification in YAML metadata section. + + Document that html4 is technically XHTML 1.0 transitional. + + Remove refs to highlighting-kate (#3672). + + Document ibooks specific epub metadata. + + Clarify that mathml is used for ODT math. + + Mention limitations of Literate Haskell Support (#3410, + Joachim Breitner). + + Add documentation of limitations of grid tables (Stephen + McDowell, #3864). + + Clarify that meta-json contains transformed values (Jakob Voß, + #3491) Make clear that template variable `meta-json` does not + contain plain text values or JSON output format but field values + transformed to the selected output format. + + * COPYRIGHT: + + + Clarify that templates are dual-licensed. + + Clarify that pandoc-types is BSD3 licensed. + + List new files not written by jgm (Albert Krewinkel). + + Update dates in copyright notices (Albert Krewinkel). This follows + the suggestions given by the FSF for GPL licensed software. + + + * INSTALL.md: + + + Improved instructions for tests with patterns. + + Put RPM-based distros on separate point (Mauro Bieg, #3449) + + * CONTRIBUTING.md: + + + Fixed typos (Wandmalfarbe, #3479). + + Add "ask on pandoc-discuss" (Mauro Bieg). + + * Add lua filter documentation in `doc/lua-filters.md`. Note that the + end of this document is autogenerated from `data/pandoc.lua` + using `make doc/lua-filters.md`, which uses `tools/ldoc.ltp` + (Albert Krewinkel). + + * Add `doc/filters.md`. This is the old scripting tutorial from + the website. + + * Add `doc/using-the-pandoc-api.md` (#3289). This gives an introduction + to using pandoc as a Haskell library. + + + [build infrastructure improvements] + + * Removed `data/templates` submodule. Templates are now a subtree + in `data/templates`. This removes the need to do `git submodule + update`. + + * Renamed `tests` -> `test`. + + * Remove `https` flag. Always build with HTTPS support. + + * Use `file-embed` instead of `hsb2hs` to embed data files when + `embed_data_files` flag is set. `file-embed` gives us better dependency + tracking: if a data file changes, ghc/stack/cabal know to recompile + the Data module. This also removes `hsb2hs` as a build dependency. + + * Add `custom-setup` stanza to pandoc, lowercase field names. + + * Add `static` Cabal flag. + + * Name change OSX -> MacOS. Add a -MacOS suffix to mac package rather + than -OSX. Changed local names from osx to macos. + + * make_macos_package.sh - Use strip to reduce executable size. + + * Revised binary linux package. Now a completely static executable + is created, using Docker and alpine. We create both a deb and a + tarball. The old `deb` directory has been replaced with a `linux` + directory. Running `make` in the `linux` directory should + perform the build, putting the binary packages in `artifacts/`. + + * `linux/control.in`: add `Replaces:`, so existing pandoc-citeproc and + pandoc-data packages will be uninstalled; this package provides + both (#3822). Add latex packages as 'suggested', update + description. + + * Remove cpphs build requirement -- it is no longer needed. + + * Replaced `{deb,macos,windows}/stack.yaml` with `stack.pkg.yaml`. + + * Name change OSX -> macOS (ickc, #3869). + + * Fix casing of Linux, UNIX, and Windows (ickc). + + * `.travis.yml`: create a source dist and do cabal build and test there. + That way we catch errors due to files missing from the data + section of pandoc.cabal. + + * Makefile: + + + Split `make haddock` from `make full`. + + Add BRANCH variable for winpkg. + + Add `lint` target. + + Improve `make full`. Disable optimizations. + Build everything, inc. trypandoc and benchmarks. Use parallel build. + + Allow `make test` to take `TESTARGS`. + + * Added new command tests (`Tests.Command`), using small text files + in `test/command/`. Any files added in this directory will be treated + as shell tests (see smart.md for an example). This makes it very easy + to add regression tests etc. + + * Test fixes so we can find data files. In old tests & command tests, + we now set the environment variable `pandoc_datadir`. In lua tests, + we set the datadir explicitly. + + * Refactored `compareOutput` in docx writer test. + + * Consolidated some common functions in `Tests.Helper`. + + * Small change to unbalanced bracket test to speed up test suite. + + * Speed up Native writer quickcheck tests. + + * Use tasty for tests rather than test-framework. + + * Add simple Emacs mode to help with Pandoc templates editing. + (Václav Haisman, #3889). `tools/pandoc-template-mode.el` + + +pandoc (1.19.2) + + * Use skylighting library instead of highlighting-kate for syntax + highlighting. Skylighting is faster and more accurate (#3363). + Later we'll be able to add features like warning messages, dynamic + loading of xml syntax definitions, and dynamic loading of themes. + + * Added a new highlight style, `breezeDark`. + + * Text.Pandoc.Highlighting: Update list of `listings` languages (#3374). + This allows more languages to be used when using the `--listings` + option. + + * OpenDocument writer: + + + Small refactoring. Removed separate 'parent' parameter in paraStyle. + + Don't profilerate text styles unnecessarily (#3371). + This change makes the writer create only as many temporary + text styles as are absolutely necessary. It also consolidates + adjacent nodes with the same style. + + * Org reader (Albert Krewinkel): + + + Allow short hand for single-line raw blocks (Albert Krewinkel, + #3366). Single-line raw blocks can be given via `#+FORMAT: raw line`, + where `FORMAT` must be one of `latex`, `beamer`, `html`, or `texinfo`. + + Accept org-ref citations followed by commas (Albert Krewinkel). + Bugfix for an issue which, whenever the citation was immediately + followed by a comma, prevented correct parsing of org-ref citations. + + Ensure emphasis markup can be nested. Nested emphasis markup (e.g. + `/*strong and emphasized*/`) was interpreted incorrectly in that the + inner markup was not recognized. + + Remove pipe char irking the haddock coverage tool (Albert Krewinkel). + + * Docx reader: Empty header should be list of lists (Jesse Rosenthal). + In the past, the docx reader wrote an empty header as an empty list. It + should have the same width as a row (and be filled with empty cells). + + * MediaWiki reader: + + + Improved handling of display math (#3362). Sometimes display math is + indented with more than one colon. Previously we handled these cases + badly, generating definition lists and missing the math. + + Fix quotation mark parsing (#3336, tgkokk). Change MediaWiki reader's + behavior when the smart option is parsed to match other readers' + behavior. + + * Markdown reader: + + + Fixed `-f markdown_github-hard_line_breaks+escaped_line_breaks` + (#3341). Previously this did not properly enable escaped line breaks. + + Disallow space between inline code and attributes (#3326, #3323, + Mauro Bieg). + + * DocBook5 writer: make id attribute xml:id, fixes #3329 (#3330, Mauro Bieg). + + * Added some test cases for ODT reader (#3306, #3308, Hubert Plociniczak). + + * LaTeX writer: allow tables with empty cells to count as "plain." + This addresses a problem of too-wide tables when empty cells + are used. Thanks to Joost Kremers for reporting the issue. + + * Org writer: prefix footnote numbers with `fn:` (Albert Krewinkel). + Unprefixed numbers where used by older org-mode versions, but are no + longer supported. + + * HTML writer: don't process pars with empty RawInline, (#1040, #3327, + Mauro Bieg). + + * Markdown writer: Fix display math with `--webtex` (#3298). + + * Fix sample.lua so it properly handles raw blocks/inlines (#3358, + bumper314). + + * Templates: + + + default.latex: Moved geometry after hyperref (Václav Haisman). + Otherwise PDF sizes can be wrong in some circumstances. + + Copied a few changes from default.latex to default.beamer + (Wandmalfarbe). + + default.latex, default.beamer: Changed position of `\VerbatimNotes` + and `fancyvrb`. This fixes hyperlinks on footnotes in documents + that contain verbatim in notes (#3361). (Note: the beamer template + was updated to match the LaTeX template, but at this point verbatim + in notes seems not to work in beamer.) + + default.latex: Allow passing `microtypeoptions` to microtype + (Václav Haisman). + + default.latex: Add hyphen option to url package. + + default.docbook5: Fix namespace declarations (Mauro Bieg). + + * Moved `make_osx_package.sh` to `osx/` directory. + + * Travis continuous integration: + + + Fix false positives with dist build. + + Speed improvements (Kolen Cheung, #3304, #3357). + + * MANUAL.txt: + + + Clarify that blank space is needed around footnotes (#3352). + + Fixed typo (#3351, Alexey Rogechev). + + Note that `--wrap=auto` does not work in HTML output. + + Default `--columns` width is 72, not 80. + + Fixed broken links (#3316, Kolen Cheung). + + Document usage of `@*` in nocite section (#3333, John Muccigrosso). + + * INSTALL.md: + + + Indent code so it's properly formatted (#3335, Bheesham Persaud). + + Added instructions for extracting binary from OSX, Windows packages. + + * CONTRIBUTING.md: Describe labels currently used in issue tracker + (Albert Krewinkel). The labels have changed over time, the list of + labels is updated to reflect the current set of labels used in the + issue tracker. + + * Rearrange and extend badges in README (Albert Krewinkel, #3354) + + * Bumped version bounds for dependencies. + + +pandoc (1.19.1) + + * Set `PANDOC_VERSION` environment variable for filters (#2640). + This allows filters to check the pandoc version that produced + the JSON they are receiving. + + * Docx reader: Ensure one-row tables don't have header (#3285, + Jesse Rosenthal). Tables in MS Word are set by default to have + special first-row formatting, which pandoc uses to determine whether + or not they have a header. This means that one-row tables will, by + default, have only a header -- which we imagine is not what people + want. This change ensures that a one-row table is not understood to + be a header only. Note that this means that it is impossible to + produce a header-only table from docx, even though it is legal + pandoc. But we believe that in nearly all cases, it will be an + accidental (and unwelcome) result + + * HTML reader: + + + Fixed some bad regressions in HTML table parser (#3280). + This regression leads to the introduction of empty rows + in some circumstances. + + Understand `style=width:` as well as `width` in `col` (#3286). + + * RST reader: + + + Print warnings when keys, substitition, notes not found. + Previously the parsers failed and we got raw text. Now we get a + link with an empty URL, or empty inlines in the case of a note or + substitution. + + + Fix hyperlink aliases (#3283). + + * Man writer: Ensure that periods are escaped at beginning of line + (#3270). + + * LaTeX writer: Fix unnumbered headers when used with `--top-level` + (#3272, Albert Krewinkel). Fix interaction of top-level divisions + `part` or `chapter` with unnumbered headers when emitting LaTeX. Headers + are ensured to be written using stared commands (like `\subsection*{}`). + + * LaTeX template: use comma not semicolon to separate keywords for + `pdfkeywords`. Thanks to Wandmalfarbe. + + * Markdown writer: Fixed incorrect word wrapping (#3277). Previously pandoc + would sometimes wrap lines too early due to this bug. + + * Text.Pandoc.Pretty: Added `afterBreak` [API change]. This makes it + possible to insert escape codes for content that needs escaping at the + beginning of a line. + + * Removed old MathMLInHTML.js from 2004, which should no longer + be needed for MathML with modern browsers. + + * Fixed tests with dynamic linking (#2709). + + * Makefile: Use stack instead of cabal for targets. This is just + a convenience for developers. + + * Fixed bash completion of filenames with space (#2749). + + * MANUAL: improved documentation on how to create a custom `reference.docx`. + + * Fix minor spelling typos in the manual (#3273, Anthony Geoghegan) + +pandoc (1.19) + + * Changed resolution of filter paths. + + + We now first treat the argument of `--filter` as a full (absolute + or relative) path, looking for a program there. If it's found, we + run it. + + If not, and if it is a simple program name or a relative path, we + try resolving it relative to `$DATADIR/filters`. + + If this fails, then we treat it as a program name and look in the + user's PATH. + + Removed a hardcoded '/' that may have caused problems with + Windows paths. + + Previously if you did `--filter foo` and you had `foo` in your path and + also an executable `foo` in your working directory, the one in the path + would be used. Now the one in the working directory is used. + + In addition, when you do `--filter foo/bar.hs`, pandoc will now find a + filter `$DATADIR/filters/foo/bar.hs` -- assuming there isn't a + `foo/bar.hs` relative to the working directory. + + * Allow `file://` URIs as arguments (#3196). Also improved default reader + format detection. Previously with a URI ending in .md or .markdown, + pandoc would assume HTML input. Now it treats these as markdown. + + * Allow to overwrite top-level division type heuristics (#3258, + Albert Krewinkel). Pandoc uses heuristics to determine the most + reasonable top-level division type when emitting LaTeX or + Docbook markup. It is now possible to overwrite this implicitly set + top-level division via the `top-level-division` command line parameter. + + * Text.Pandoc.Options \[API changes\]: + + + Removed `writerStandalone` field in `WriterOptions`, made + `writerTemplate` a `Maybe` value. Previously setting + `writerStandalone = True` did nothing unless a template was provided + in writerTemplate. Now a fragment will be generated if + `writerTemplate` is `Nothing`; otherwise, the specified template + will be used and standalone output generated. + + `Division` has been renamed `TopLevelDivision` (#3197). The + `Section`, `Chapter`, and `Part` constructors were renamed to + `TopLevelSection`, `TopLevelChapter`, and + `TopLevelPart`, respectively. An additional `TopLevelDefault` + constructor was added, which is now also the new default value of + the `writerTopLevelDivision` field in `WriterOptions`. + + * Improved error if they give wrong arg to `--top-level-division`. + + * Use new module from texmath to lookup MS font codepoints in Docx reader. + Removed unexported module Text.Pandoc.Readers.Docx.Fonts. Its code now + lives in texmath (0.9). + + * DocBook reader: Fixed xref lookup (#3243). It previously only worked + when the qnames lacked the docbook namespace URI. + + * HTML reader: + + + Improved table parsing (#3027). We now check explicitly for non-1 + rowspan or colspan attributes, and fail when we encounter them. + Previously we checked that each row had the same number of cells, + but that could be true even with rowspans/colspans. And there are + cases where it isn't true in tables that we can handle fine -- e.g. + when a tr element is empty. So now we just pad rows with empty cells + when needed. + + Treat `` as MathML by default unless something else is + explicitly specified in xmlns. Provided it parses as MathML, + of course. Also fixed default which should be to inline math if no + display attribute is used. + + Only treat "a" element as link if it has href (#3226). Otherwise + treat as span. + + * Docx reader (Jesse Rosenthal): + + + Add a placeholder value for CHART. We wrap `[CHART]` in a + ``. Note that it maps to inlines because, in + docx, anything in a drawing tag can be part of a larger paragraph. + + Be more specific in parsing images We not only want `w:drawing`, + because that could also include charts. Now we specify + `w:drawing/pic:pic`. This shouldn't change behavior at all, but it's + a first step toward allowing other sorts of drawing data as well. + + Abstract out function to avoid code repetition. + + Update tests for img title and alt (#3204). + + Handle Alt text and titles in images. We use the "description" field + as alt text and the "title" field as title. These can be accessed + through the "Format Picture" dialog in Word. + + Docx reader utils: handle empty namespace in `elemName`. Previously, + if given an empty namespace `(elemName ns "" "foo")` `elemName` + would output a QName with a `Just ""` namespace. This is never what + we want. Now we output a `Nothing`. If someone *does* want a + `Just ""` in the namespace, they can enter the QName + value explicitly. + + * ODT reader/writer: + + + Inline code when text has a special style (Hubert Plociniczak). When + a piece of text has a text `Source_Text` then we assume that this is + a piece of the document that represents a code that needs to + be inlined. Adapted the writer to also reflect that change. + Previously it was just writing a 'preformatted' text using a + non-distinguishable font style. Code blocks are still not recognized + by the ODT reader. That's a separate issue. + + Infer table's caption from the paragraph (#3224, + Hubert Plociniczak). ODT's reader always put empty captions for the + parsed tables. This commit + + 1. checks paragraphs that follow the table definition + 2. treats specially a paragraph with a style named 'Table' + 3. does some postprocessing of the paragraphs that combines tables + followed immediately by captions + + The ODT writer used the `TableCaption` style for the caption + paragraph. This commit follows the OpenOffice approach which allows + for appending captions to table but uses a built-in style named + `Table` instead of `TableCaption`. Users of a custom `reference.odt` + should change the style's name from `TableCaption` to `Table`. + + * ODT reader: Infer tables' header props from rows (#3199, + Hubert Plociniczak). ODT reader simply provided an empty header list + which meant that the contents of the whole table, even if not empty, was + simply ignored. While we still do not infer headers we at least have to + provide default properties of columns. + + * Markdown reader: + + + Allow reference link labels starting with `@...` if `citations` + extension disabled (#3209). Example: in + + \[link text\]\[@a\] + + `link text` isn't hyperlinked because `[@a]` is parsed as + a citation. Previously this happened whether or not the `citations` + extension was enabled. Now it happens only if the `citations` + extension is enabled. + + Allow alignments to be specified in Markdown grid tables. For + example, + + +-------+---------------+--------------------+ + | Right | Left | Centered | + +=========:+:=================+:=============:+ + | Bananas | $1.34 | built-in wrapper | + +-------+---------------+--------------------+ + + + Allow Small Caps elements to be created using bracketed spans (as + they already can be using HTML-syntax spans) (#3191, Kolen Cheung). + + * LaTeX reader: + + + Don't treat `\vspace` and `\hspace` as block commands (#3256). + Fixed an error which came up, for example, with `\vspace` inside + a caption. (Captions expect inlines.) + + Improved table handling. We can now parse all of the tables emitted + by pandoc in our tests. The only thing we don't get yet are + alignments and column widths in more complex tables. See #2669. + + Limited support for minipage. + + Allow for `[]`s inside LaTeX optional args. Fixes cases like: + + Handle BVerbatim from fancyvrb (#3203). + + Handle hungarumlaut (#3201). + + Allow beamer-style `<...>` options in raw LaTeX (also in Markdown) + (#3184). This allows use of things like `\only<2,3>{my content}` in + Markdown that is going to be converted to beamer. + + * Use pre-wrap for code in dzslides template (Nicolas Porcel). Otherwise + overly long code will appear on every slide. + + * Org reader (Albert Krewinkel): + + + Respect column width settings (#3246). Table column properties can + optionally specify a column's width with which it is displayed in + the buffer. Some exporters, notably the ODT exporter in org-mode + v9.0, use these values to calculate relative column widths. The org + reader now implements the same behavior. Note that the org-mode + LaTeX and HTML exporters in Emacs don't support this feature yet, + which should be kept in mind by users who use the column + widths parameters. + + Allow HTML attribs on non-figure images (#3222). Images which are + the only element in a paragraph can still be given HTML attributes, + even if the image does not have a caption and is hence not a figure. + The following will add set the `width` attribute of the image to + `50%`: + + +ATTR\_HTML: :width 50% + ======================= + + \[\[file:image.jpg\]\] + + + Support `ATTR_HTML` for special blocks (#3182). Special + blocks (i.e. blocks with unrecognized names) can be prefixed with an + `ATTR_HTML` block attribute. The attributes defined in that + meta-directive are added to the `Div` which is used to represent the + special block. + + Support the `todo` export option. The `todo` export option allows to + toggle the inclusion of TODO keywords in the output. Setting this to + `nil` causes TODO keywords to be dropped from headlines. The default + is to include the keywords. + + Add support for todo-markers. Headlines can have optional + todo-markers which can be controlled via the `#+TODO`, `#+SEQ_TODO`, + or `#+TYP_TODO` meta directive. Multiple such directives can be + given, each adding a new set of recognized todo-markers. If no + custom todo-markers are defined, the default `TODO` and `DONE` + markers are used. Todo-markers are conceptually separate from + headline text and are hence excluded when autogenerating + headline IDs. The markers are rendered as spans and labelled with + two classes: One class is the markers name, the other signals the + todo-state of the marker (either `todo` or `done`). + + * LaTeX writer: + + + Use `\autocites*` when "suppress-author" citation used. + + Ensure that simple tables have simple cells (#2666). If cells + contain more than a single Plain or Para, then we need to set + nonzero widths and put contents into minipages. + + Remove invalid inlines in sections (#3218, Hubert Plociniczak). + + * Markdown writer: + + + Fix calculation of column widths for aligned multiline tables + (#1911, Björn Peemöller). This also fixes excessive CPU and memory + usage for tables when `--columns` is set in such a way that cells + must be very tiny. Now cells are guaranteed to be big enough so that + single words don't need to line break, even if this pushes the line + length above the column width. + + Use bracketed form for native spans when `bracketed_spans` + enabled (#3229). + + Fixed inconsistent spacing issue (#3232). Previously a tight bullet + sublist got rendered with a blank line after, while a tight ordered + sublist did not. Now we don't get the blank line in either case. + + Fix escaping of spaces in super/subscript (#3225). Previously two + backslashes were inserted, which gave a literal backslash. + + Adjust widths in Markdown grid tables so that they match + on round-trip. + + * Docx writer: + + + Give full detail when there are errors converting tex math. + + Handle title text in images (Jesse Rosenthal). We already handled + alt text. This just puts the image "title" into the docx + "title" attr. + + Fixed XML markup for empty cells (#3238). Previously the Compact + style wasn't being applied properly to empty cells. + + * HTML writer: + + + Updated `renderHtml` import from blaze-html. + + * Text.Pandoc.Pretty: + + + Fixed some bugs that caused blank lines in tables (#3251). The bugs + caused spurious blank lines in grid tables when we had things like + `blankline $$ blankline`. + + Add exported function `minOffet` \[API change\] (Björn Peemöller). + + Added error message for illegal call to `block` (Björn Peemöller). + + * Text.Pandoc.Shared: + + + Put `warn` in MonadIO. + + `fetchItem`: Better handling of protocol-relative URL (#2635). If + URL starts with `//` and there is no "base URL" (as there would be + if a URL were used on the command line), then default to http:. + + * Export Text.Pandoc.getDefaultExtensions \[API change\] (#3178). + + * In --version, trap error in `getAppUserDataDirectory` (#3241). This + fixes a crash with `pandoc --version` on unusual systems with no real + user (e.g. SQL Server 2016). + + * Added weigh-pandoc for memory usage diagnostics (#3169). + + * Use correct mime types for woff and woff2 (#3228). + + * Remove make\_travis\_yml.hs (#3235, Kolen Cheung). + + * changelog: Moved an item that was misplaced in the 1.17.2 section to the + 1.18 section where it belongs. + + * CONTRIBUTING.md: minor change in wording and punctuation (#3252, + Kolen Cheung). + + * Further revisions to manual for `--version` changes (#3244). + + +pandoc (1.18) + + * Added `--list-input-formats`, `--list-output-formats`, + `--list-extensions`, `--list-highlight-languages`, and + `--list-highlight-styles` (#3173). Removed list of highlighting + languages from `--version` output. Removed list of input and output + formats from default `--help` output. + + * Added `--reference-location=block|section|document` option + (Jesse Rosenthal). This determines whether Markdown link references + and footnotes are placed at the end of the document, the end of the + section, or the end of the top-level block. + + * Added `--top-level-division=section|chapter|part` (Albert Krewinkel). + This determines what a level-1 header corresponds to in LaTeX, + ConTeXt, DocBook, and TEI output. The default is `section`. + The `--chapters` option has been deprecated in favor of + `--top-level-division=chapter`. + + * Added `LineBlock` constructor for `Block` (Albert Krewinkel). This + is now used in parsing RST and Markdown line blocks, DocBook + `linegroup`/`line` combinations, and Org-mode `VERSE` blocks. + Previously `Para` blocks with hard linebreaks were used. `LineBlock`s + are handled specially in the following ouput formats: AsciiDoc + (as `[verse]` blocks), ConTeXt (`\startlines`/`\endlines`), + HTML (`div` with a style), Markdown (line blocks if `line_blocks` + is enabled), Org-mode (`VERSE` blocks), RST (line blocks). In + other output formats, a paragraph with hard linebreaks is emitted. + + * Allow binary formats to be written to stdout (but not to tty) (#2677). + Only works on posix, since we use the unix library to check whether + output is to tty. On Windows, pandoc works as before and always requires + an output file parameter for binary formats. + + * Changed JSON output format (Jesse Rosenthal). Previously we used + generically generated JSON, but this was subject to change depending + on the version of aeson pandoc was compiled with. To ensure stability, + we switched to using manually written ToJSON and FromJSON + instances, and encoding the API version. **Note:** pandoc filter + libraries will need to be revised to handle the format change. + Here is a summary of the essential changes: + + + The toplevel JSON format is now `{"pandoc-api-version" : + [MAJ, MIN, REV], "meta" : META, "blocks": BLOCKS}` + instead of `[{"unMeta": META}, [BLOCKS]]`. + Decoding fails if the major and minor version numbers don't + match. + + Leaf nodes no longer have an empty array for their "c" value. + Thus, for example, a `Space` is encoded as `{"t":"Space"}` + rather than `{"t":"Space","c":[]}` as before. + + * Removed `tests/Tests/Arbitrary.hs` and added a `Text.Pandoc.Arbitrary` + module to pandoc-types (Jesse Rosenthal). This makes it easier + to use QuickCheck with pandoc types outside of pandoc itself. + + * Add `bracketed_spans` Markdown extension, enabled by default + in pandoc `markdown`. This allows you to create a native span + using this syntax: `[Here is my span]{#id .class key="val"}`. + + * Added `angle_brackets_escapable` Markdown extension (#2846). + This is needed because github flavored Markdown has a slightly + different set of escapable symbols than original Markdown; + it includes angle brackets. + + * Export `Text.Pandoc.Error` in `Text.Pandoc` [API change]. + + * Print highlighting-kate version in `--version`. + + * `Text.Pandoc.Options`: + + + `Extension` has new constructors `Ext_brackted_spans` and + `Ext_angle_brackets_escapable` [API change]. + + Added `ReferenceLocation` type [API change] (Jesse Rosenthal). + + Added `writerReferenceLocation` field to `WriterOptions` (Jesse + Rosenthal). + + * `--filter`: we now check `$DATADIR/filters` for filters before + looking in the path (#3127, Jesse Rosenthal, thanks to Jakob + Voß for the idea). Filters placed in this directory need not + be executable; if the extension is `.hs`, `.php`, `.pl`, `.js`, + or `.rb`, pandoc will run the right interpreter. + + * For `--webtex`, replace deprecated Google Chart API by CodeCogs as + default (Kolen Cheung). + + * Removed `raw_tex` extension from `markdown_mmd` defaults (Kolen Cheung). + + * Execute .js filters with node (Jakob Voß). + + * Textile reader: + + + Support `bc..` extended code blocks (#3037). Also, remove trailing + newline in code blocks (consistently with Markdown reader). + + Improve table parsing. We now handle cell and row attributes, mostly + by skipping them. However, alignments are now handled properly. + Since in pandoc alignment is per-column, not per-cell, we + try to devine column alignments from cell alignments. + Table captions are also now parsed, and textile indicators + for thead and tfoot no longer cause parse failure. (However, + a row designated as tfoot will just be a regular row in pandoc.) + + Improve definition list parsing. We now allow multiple terms + (which we concatenate with linebreaks). An exponential parsing + bug (#3020) is also fixed. + + Disallow empty URL in explicit link (#3036). + + * RST reader: + + + Use Div instead of BlockQuote for admonitions (#3031). + The Div has class `admonition` and (if relevant) one of the + following: `attention`, `caution`, `danger`, `error`, `hint`, + `important`, `note`, `tip`, `warning`. **Note:** This will change + the rendering of some RST documents! The word ("Warning", "Attention", + etc.) is no longer added; that must be done with CSS or a filter. + + A Div is now used for `sidebar` as well. + + Skip whitespace before note (Jesse Rosenthal, #3163). RST requires a + space before a footnote marker. We discard those spaces so that footnotes + will be adjacent to the text that comes before it. This is in line with + what rst2latex does. + + Allow empty lines when parsing line blocks (Albert Krewinkel). + + * Markdown reader: + + + Allow empty lines when parsing line blocks (Albert Krewinkel). + + Allow attributes on autolinks (#3183, Daniele D'Orazio). + + * LaTeX reader: + + + More robust parsing of unknown environments (#3026). + We no longer fail on things like `^` inside options for tikz. + + Be more forgiving of non-standard characters, e.g. `^` outside of math. + Some custom environments give these a meaning, so we should try not to + fall over when we encounter them. + + Drop duplicate `*` in bibtexKeyChars (Albert Krewinkel) + + * MediaWiki reader: + + + Fix for unquoted attribute values in mediawiki tables (#3053). + Previously an unquoted attribute value in a table row + could cause parsing problems. + + Improved treatment of verbatim constructions (#3055). + Previously these yielded strings of alternating Code and Space + elements; we now incorporate the spaces into the Code. Emphasis + etc. is still possible inside these. + + Properly interpret XML tags in pre environments (#3042). They are meant + to be interpreted as literal text. + + * EPUB reader: don't add root path to data: URIs (#3150). + Thanks to @lep for the bug report and patch. + + * Org reader (Albert Krewinkel): + + + Preserve indentation of verse lines (#3064). Leading spaces in verse + lines are converted to non-breaking spaces, so indentation is preserved. + + Ensure image sources are proper links. Image sources as those in plain + images, image links, or figures, must be proper URIs or relative file + paths to be recognized as images. This restriction is now enforced + for all image sources. This also fixes the reader's usage of uncleaned + image sources, leading to `file:` prefixes not being deleted from + figure images. Thanks to @bsag for noticing this bug. + + Trim verse lines properly (Albert Krewinkel). + + Extract meta parsing code to module. Parsing of meta-data is well + separable from other block parsing tasks. Moving into new module to + get small files and clearly arranged code. + + Read markup only for special meta keys. Most meta-keys should be read + as normal string values, only a few are interpreted as marked-up text. + + Allow multiple, comma-separated authors. Multiple authors can be + specified in the `#+AUTHOR` meta line if they are given as a + comma-separated list. + + Give precedence to later meta lines. The last meta-line of any given + type is the significant line. Previously the value of the first line + was kept, even if more lines of the same type were encounterd. + + Read LaTeX_header as header-includes. LaTeX-specific header commands + can be defined in `#+LaTeX_header` lines. They are parsed as + format-specific inlines to ensure that they will only show up in LaTeX + output. + + Set documentclass meta from LaTeX_class. + + Set classoption meta from LaTeX_class_options. + + Read HTML_head as header-includes. HTML-specific head content can be + defined in `#+HTML_head` lines. They are parsed as format-specific + inlines to ensure that they will only show up in HTML output. + + Respect `author` export option. The `author` option controls whether + the author should be included in the final markup. Setting + `#+OPTIONS: author:nil` will drop the author from the final meta-data + output. + + Respect `email` export option. The `email` option controls whether the + email meta-field should be included in the final markup. Setting + `#+OPTIONS: email:nil` will drop the email field from the final + meta-data output. + + Respect `creator` export option. The `creator` option controls whether + the creator meta-field should be included in the final markup. Setting + `#+OPTIONS: creator:nil` will drop the creator field from the final + meta-data output. Org-mode recognizes the special value `comment` for + this field, causing the creator to be included in a comment. This is + difficult to translate to Pandoc internals and is hence interpreted the + same as other truish values (i.e. the meta field is kept if it's + present). + + Respect unnumbered header property (#3095). Sections the `unnumbered` + property should, as the name implies, be excluded from the automatic + numbering of section provided by some output formats. The Pandoc + convention for this is to add an "unnumbered" class to the header. The + reader treats properties as key-value pairs per default, so a special + case is added to translate the above property to a class instead. + + Allow figure with empty caption (Albert Krewinkel, #3161). + A `#+CAPTION` attribute before an image is enough to turn an image into + a figure. This wasn't the case because the `parseFromString` function, + which processes the caption value, would fail on empty values. Adding + a newline character to the caption value fixes this. + + * Docx reader: + + + Use XML convenience functions (Jesse Rosenthal). + The functions `isElem` and `elemName` (defined in Docx/Util.hs) make + the code a lot cleaner than the original XML.Light functions, but they + had been used inconsistently. This puts them in wherever applicable. + + Handle anchor spans with content in headers. Previously, we would only + be able to figure out internal links to a header in a docx if the + anchor span was empty. We change that to read the inlines out of the + first anchor span in a header. + + Let headers use exisiting id. Previously we always generated an id for + headers (since they wouldn't bring one from Docx). Now we let it use an + existing one if possible. This should allow us to recurs through anchor + spans. + + Use all anchor spans for header ids. Previously we only used the first + anchor span to affect header ids. This allows us to use all the anchor + spans in a header, whether they're nested or not (#3088). + + Test for nested anchor spans in header. This ensures that anchor spans + in header with content (or with other anchor spans inside) will resolve + to links to a header id properly. + + * ODT reader (Hubert Plociniczak) + + + Include list's starting value. Previously the starting value of + the lists' items has been hardcoded to 1. In reality ODT's list + style definition can provide a new starting value in one of its + attributes. + + Infer caption from the text following the image. + Frame can contain other frames with the text boxes. + + Add `fig:` to title for Image with a caption (as expected + by pandoc's writers). + + Basic support for images in ODT documents. + + Don't duplicate text for anchors (#3143). When creating an anchor + element we were adding its representation as well as the original + content, leading to text duplication. + + * DocBook writer: + + + Include an anchor element when a div or span has an id (#3102). + Note that DocBook does not have a class attribute, but at least this + provides an anchor for internal links. + + * LaTeX writer: + + + Don't use * for unnumbered paragraph, subparagraph. The starred + variants don't exist. This helps with part of #3058...it gets rid of + the spurious `*`s. But we still have numbers on the 4th and 5th level + headers. + + Properly escape backticks in verbatim (#3121, Jesse Rosenthal). + Otherwise they can cause unintended ligatures like `` ?` ``. + + Handle NARRAOW NO-BREAK SPACE into LaTeX (Vaclav Zeman) as `\,`. + + Don't include `[htbp]` placement for figures (#3103, Václav Haisman). + This allows figure placement defaults to be changed by the user + in the template. + + * HTML writer (slide show formats): In slide shows, don't change slide title + to level 1 header (#2221). + + * TEI writer: remove heuristic to detect book template (Albert Krewinkel). + TEI doesn't have `` elements but only generic `` division + elements. Checking the template for a trailing `` is nonsensical. + + * MediaWiki writer: transform filename with underscores in images (#3052). + `foo bar.jpg` becomes `foo_bar.jpg`. This was already done + for internal links, but it also needs to happen for images. + + * ICML writer: replace partial function (!!) in table handling (#3175, + Mauro Bieg). + + * Man writer: allow section numbers that are not a single digit (#3089). + + * AsciiDoc writer: avoid unnecessary use of "unconstrained" emphasis + (#3068). In AsciiDoc, you must use a special form of emphasis + (double `__`) for intraword emphasis. Pandoc was previously using + this more than necessary. + + * EPUB writer: use stringify instead of plain writer for metadata + (#3066). This means that underscores won't be used for emphasis, + or CAPS for bold. The metadata fields will just have unadorned + text. + + * Docx Writer: + + + Implement user-defined styles (Jesse Rosenthal). Divs and Spans + with a `custom-style` key in the attributes will apply the corresponding + key to the contained blocks or inlines. + + Add ReaderT env to the docx writer (Jesse Rosenthal). + + Clean up and streamline RTL behavior (Jesse Rosenthal, #3140). + You can set `dir: rtl` in YAML metadata, or use `-M dir=rtl` + on the command line. For finer-grained control, you can set + the `dir` attribute in Div or Span elements. + + * Org writer (Albert Krewinkel): + + + Remove blank line after figure caption. Org-mode only treats an image + as a figure if it is directly preceded by a caption. + + Ensure blank line after figure. An Org-mode figure should be surrounded + by blank lines. The figure would be recognized regardless, but images + in the following line would unintentionally be treated as figures as + well. + + Ensure link targets are paths or URLs. Org-mode treats links as + document internal searches unless the link target looks like a URL or + file path, either relative or absolute. This change ensures that this + is always the case. + + Translate language identifiers. Pandoc and Org-mode use different + programming language identifiers. An additional translation between + those identifiers is added to avoid unexpected behavior. This fixes a + problem where language specific source code would sometimes be output + as example code. + + Drop space before footnote markers (Albert Krewinkel, #3162). + The writer no longer adds an extra space before footnote markers. + + * Markdown writer: + + + Don't emit HTML for tables unless `raw_html` extension is set (#3154). + Emit `[TABLE]` if no suitable table formats are enabled and raw HTML + is disabled. + + Check for the `raw_html` extension before emiting a raw HTML block. + + Abstract out note/ref function (Jesse Rosenthal). + + Add ReaderT monad for environment variables (Jesse Rosenthal). + + * HTML, EPUB, slidy, revealjs templates: Use `

` instead of `

` for + subtitle, author, date (#3119). Note that, as a result of this change, + authors may need to update CSS. + + * revealjs template: Added `notes-server` option + (jgm/pandoc-templates#212, Yoan Blanc). + + * Beamer template: + + + Restore whitespace between paragraphs. This was + a regression in the last release (jgm/pandoc-templates#207). + + Added `themeoptions` variable (Carsten Gips). + + Added `beamerarticle` variable. This causes the `beamerarticle` + package to be loaded in beamer, to produce an article from beamer + slides. (Carsten Gips) + + Added support for `fontfamilies` structured variable + (Artem Klevtsov). + + Added hypersetup options (Jake Zimmerman). + + * LaTeX template: + + + Added dummy definition for `\institute`. + This isn't a standard command, and we want to avoid a crash when + `institute` is used with the default template. + + Define default figure placement (Václav Haisman), since pandoc + no longer includes `[htbp]` for figures. Users with custom templates + will want to add this. See #3103. + + Use footnote package to fix notes in tables (jgm/pandoc-templates#208, + Václav Haisman). + + * Moved template compiling/rendering code to a separate library. + `doctemplates`. This allows the pandoc templating system to be + used independently. + + * Text.Pandoc.Error: Fix out of index error in `handleError` + (Matthew Pickering). The fix is to not try to show the exact line when + it would cause an out-of-bounds error as a result of included files. + + * Text.Pandoc.Shared: Add `linesToBlock` function (Albert Krewinkel). + + * Text.Pandoc.Parsing.emailAddress: tighten up parsing of email + addresses. Technically `**@user` is a valid email address, but if we + allow things like this, we get bad results in markdown flavors + that autolink raw email addresses (see #2940). So we exclude a few + valid email addresses in order to avoid these more common bad cases. + + * Text.Pandoc.PDF: Don't crash with nonexistent image (#3100). Instead, + emit the alt text, emphasized. This accords with what the ODT writer + currently does. The user will still get a warning about a nonexistent + image. + + * Fix example in API documentation (#3176, Thomas Weißschuh). + + * Tell where to get tarball in INSTALL (#3062). + + * Rename README to MANUAL.txt and add GitHub-friendly README.md + (Albert Krewinkel, Kolen Cheung). + + * Replace COPYING with Markdown version COPYING.md from GNU (Kolen Cheung). + + * MANUAL.txt: + + + Put note on structured vars in separate paragraph (#2148, Albert + Krewinkel). Make it clearer that structured author variables require a + custom template + + Note that `--katex` works best with `html5` (#3077). + + Fix the LaTeX and EPUB links in manual (Morton Fox). + + Document `biblio-title` variable. + + * Improve spacing of footnotes in `--help` output (Waldir Pimenta). + + * Update KaTeX to v0.6.0 (Kolen Cheung). + + * Allow latest dependencies. + + * Use texmath 0.8.6.6 (#3040). + + * Allow http-client 0.4.30, which is the version in stackage lts. + Previously we required 0.5. + Remove CPP conditionals for earlier versions. + + * Remove support for GHC < 7.8 (Jesse Rosenthal). + + + Remove Compat.Monoid. + + Remove an inline monad compatibility macro. + + Remove Text.Pandoc.Compat.Except. + + Remove directory compat. + + Change constraint on mtl. + + Remove unnecessary CPP condition in UTF8. + + Bump base lower bound to 4.7. + + Remove 7.6 build from .travis.yaml. + + Bump supported ghc version in CONTRIBUTING.md. + + Add note about GHC version support to INSTALL. + + Remove GHC 7.6 from list of tested versions (Albert Krewinkel). + + Remove TagSoup compat. + + Add EOL note to time compat module. Because time 1.4 is a boot library + for GHC 7.8, we will support the compatibility module as long as we + support 7.8. But we should be clear about when we will no longer need + it. + + Remove blaze-html CPP conditional. + + Remove unnecessary CPP in custom Prelude. + +pandoc (1.17.2) + + * Added Zim Wiki writer, template and tests. `zimwiki` is now + a valid output format. (Alex Ivkin) + + * Changed email-obfuscation default to no obfuscation (#2988). + + `writerEmailObfuscation` in `defaultWriterOptions` is now + `NoObfuscation`. + + the default for the command-line `--email-obfuscation` option is + now `none`. + + * Docbook writer: Declare xlink namespace in Docbook5 output (Ivo Clarysse). + + * Org writer: + + + Support arbitrary raw inlines (Albert Krewinkel). + Org mode allows arbitrary raw inlines ("export snippets" in Emacs + parlance) to be included as `@@format:raw foreign format text@@`. + + Improve Div handling (Albert Krewinkel). Div blocks handling is + changed to make the output look more like idiomatic org mode: + - Div-wrapped content is output as-is if the div's attribute is the + null attribute. + - Div containers with an id but neither classes nor key-value pairs + are unwrapped and the id is added as an anchor. + - Divs with classes associated with greater block elements are + wrapped in a `#+BEGIN`...`#+END` block. + - The old behavior for Divs with more complex attributes is kept. + + * HTML writer: + + + Better support for raw LaTeX environments (#2758). + Previously we just passed all raw TeX through when MathJax was used for + HTML math. This passed through too much. With this patch, only raw + LaTeX environments that MathJax can handle get passed through. + This patch also causes raw LaTeX environments to be treated + as math, when possible, with MathML and WebTeX output. + + * Markdown writer: use raw HTML for simple, pipe tables with linebreaks + (#2993). Markdown line breaks involve a newline, and simple and pipe + tables can't contain one. + + * Make --webtex work with the Markdown writer (#1177). + This is a convenient option for people using + websites whose Markdown flavors don't provide for math. + + * Docx writer: + + + Set paragraph to FirstPara after display math (Jesse Rosenthal). + We treat display math like block quotes, and apply FirstParagraph style + to paragraphs that follow them. These can be styled as the user + wishes. (But, when the user is using indentation, this allows for + paragraphs to continue after display math without indentation.) + + Use actual creation time as doc prop (Jesse Rosenthal). + Previously, we had used the user-supplied date, if available, for Word's + document creation metadata. This could lead to weird results, as in + cases where the user post-dates a document (so the modification might be + prior to the creation). Here we use the actual computer time to set the + document creation. + + * LaTeX writer: + + + Don't URI-escape image source (#2825). Usually this is a local file, + and replacing spaces with `%20` ruins things. + + Allow 'standout' as a beamer frame option (#3007). + `## Slide title {.standout}`. + + * RST reader: Fixed links with no explicit link text. The link + `` ``_ `` should have `foo` as both its link text and its URL. + See RST spec at + Closes Debian #828167 -- reported by Christian Heller. + + * Textile reader: + + + Fixed attributes (#2984). Attributes can't be followed by + a space. So, `_(class)emph_` but `_(noclass) emph_`. + + Fixed exponential parsing bug (#3020). + + Fix overly aggressive interpretation as images (#2998). + Spaces are not allowed in the image URL in textile. + + * LaTeX reader: + + + Fix `\cite` so it is a NormalCitation not AuthorInText. + + Strip off double quotes around image source if present (#2825). + Avoids interpreting these as part of the literal filename. + + * Org reader: + + + Add semicolon to list of special chars (Albert Krewinkel) + Semicolons are used as special characters in citations syntax. This + ensures the correct parsing of Pandoc-style citations: `[prefix; @key; + suffix]`. Previously, parsing would have failed unless there was a space + or other special character as the last character. + + Add support for "Berkeley-style" cites (Albert Krewinkel, #1978). + A specification for an official Org-mode citation syntax was drafted by + Richard Lawrence and enhanced with the help of others on the orgmode + mailing list. Basic support for this citation style is added to the + reader. + + Support arbitrary raw inlines (Albert Krewinkel). + Org mode allows arbitrary raw inlines ("export snippets" in Emacs + parlance) to be included as `@@format:raw foreign format text@@`. + + Remove partial functions (Albert Krewinkel, #2991). + Partial functions like `head` lead to avoidable errors and should be + avoided. They are replaced with total functions. + + Support figure labels (Albert Krewinkel, #2496, #2999). + Figure labels given as `#+LABEL: thelabel` are used as the ID of the + respective image. This allows e.g. the LaTeX to add proper `\label` + markup. + + Improve tag and properties type safety (Albert Krewinkel). + Specific newtype definitions are used to replace stringly typing of tags + and properties. Type safety is increased while readability is improved. + + Parse as headlines, convert to blocks (Albert Krewinkel). + Emacs org-mode is based on outline-mode, which treats documents as trees + with headlines are nodes. The reader is refactored to parse into a + similar tree structure. This simplifies transformations acting on + document (sub-)trees. + * Refactor comment tree handling (Albert Krewinkel). + Comment trees were handled after parsing, as pattern matching on lists + is easier than matching on sequences. The new method of reading + documents as trees allows for more elegant subtree removal. + * Support archived trees export options (Albert Krewinkel). + Handling of archived trees can be modified using the `arch` option. + Archived trees are either dropped, exported completely, or collapsed to + include just the header when the `arch` option is nil, non-nil, or + `headline`, respectively. + * Put export setting parser into module (Albert Krewinkel). + Export option parsing is distinct enough from general block parsing to + justify putting it into a separate module. + * Support headline levels export setting (Albert Krewinkel). + The depths of headlines can be modified using the `H` option. Deeper + headlines will be converted to lists. + * Replace ugly code with view pattern (Albert Krewinkel). + Some less-than-smart code required a pragma switching of overlapping + pattern warnings in order to compile seamlessly. Using view patterns + makes the code easier to read and also doesn't require overlapping + pattern checks to be disabled. + * Fix parsing of verbatim inlines (Albert Krewinkel, #3016). + Org rules for allowed characters before or after markup chars were not + checked for verbatim text. This resultet in wrong parsing outcomes of + if the verbatim text contained e.g. space enclosed markup characters as + part of the text (`=is_substr = True=`). Forcing the parser to update + the positions of allowed/forbidden markup border characters fixes this. + + * LaTeX template: fix for obscure hyperref/xelatex issue. + Here's a minimal case: + + \documentclass[]{article} + \usepackage{hyperref} + \begin{document} + \section{\%á} + \end{document} + + Without this change, this fails on the second invocation of xelatex. + This affects inputs this like `# %á` with pdf output via xelatex. + + * trypandoc: call results 'html' instead of 'result'. + This is for better compatibility with babelmark2. + + * Document MultiMarkdown as input/output format (Albert Krewinkel, #2973). + MultiMarkdown was only mentioned as a supported Markdown dialect but not + as a possible input or output format. A brief mention is added + everywhere the other supported markdown dialects are mentioned. + + * Document Org mode as a format containing raw HTML (Albert Krewinkel) + Raw HTML is kept when the output format is Emacs Org mode. + + * Implement `RawInline` and `RawBlock` in sample lua custom writer (#2985). + + * Text.Pandoc.Shared: + + + Introduce blocksToInlines function (Jesse Rosenthal). + This is a lossy function for converting `[Block] -> [Inline]`. Its main + use, at the moment, is for docx comments, which can contain arbitrary + blocks (except for footnotes), but which will be converted to spans. + This is, at the moment, pretty useless for everything but the basic + `Para` and `Plain` comments. It can be improved, but the docx reader + should probably emit a warning if the comment contains more than this. + + Add BlockQuote to blocksToInlines (Jesse Rosenthal). + + Add further formats for `normalizeDate` (Jesse Rosenthal). + We want to avoid illegal dates -- in particular years with greater than + four digits. We attempt to parse series of digits first as `%Y%m%d`, then + `%Y%m`, and finally `%Y`. + + `normalizeDate` should reject illegal years (Jesse Rosenthal). + We only allow years between 1601 and 9999, inclusive. The ISO 8601 + actually says that years are supposed to start with 1583, but MS Word + only allows 1601-9999. This should stop corrupted word files if the date + is out of that range, or is parsed incorrectly. + + Improve year sanity check in normalizeDate (Jesse Rosenthal). + Previously we parsed a list of dates, took the first one, and then + tested its year range. That meant that if the first one failed, we + returned nothing, regardless of what the others did. Now we test for + sanity before running `msum` over the list of Maybe values. Anything + failing the test will be Nothing, so will not be a candidate. + + * Docx reader: + + + Add simple comment functionality. (Jesse Rosenthal). + This adds simple track-changes comment parsing to the docx reader. It is + turned on with `--track-changes=all`. All comments are converted to + inlines, which can list some information. In the future a warning will be + added for comments with formatting that seems like it will be excessively + denatured. Note that comments can extend across blocks. For that reason + there are two spans: `comment-start` and `comment-end`. `comment-start` + will contain the comment. `comment-end` will always be empty. The two + will be associated by a numeric id. + + Enable warnings in top-level reader (Jesse Rosenthal). + Previously we had only allowed for warnings in the parser. Now we allow + for them in the `Docx.hs` as well. The warnings are simply concatenated. + + Add warning for advanced comment formatting. (Jesse Rosenthal). + We can't guarantee we'll convert every comment correctly, though we'll + do the best we can. This warns if the comment includes something other + than Para or Plain. + + Add tests for warnings. (Jesse Rosenthal). + + Add tests for comments (Jesse Rosenthal). + We test for comments, using all track-changes options. Note that we + should only output comments if `--track-changes=all`. We also test for + emitting warnings if there is complicated formatting. + + * README: update to include track-changes comments. (Jesse Rosenthal) + + * Improved Windows installer - don't ignore properties set on command-line. + See #2708. Needs testing to see if this resolves the issue. + Thanks to @nkalvi. + + * Process markdown extensions on command line in L->R order (#2995). + Previously they were processed, very unintuitively, in R->L + order, so that `markdown-tex_math_dollars+tex_math_dollars` + had `tex_math_dollars` disabled. + + * Added `secnumdepth` variable to LaTeX template (#2920). + + * Include table of contents in README.html in Windows package. + + * Writers: treat SoftBreak as space for stripping (Jesse Rosenthal) + In Writers.Shared, we strip leading and trailing spaces for display + math. Since SoftBreak's are treated as spaces, we should strip those + too. + + * beamer, latex templates: pass biblatexoptions directly in package load. + This allows runtime optinos to be used. Fixes jgm/pandoc-citeproc#201 + + * CPP workaround for deprecation of `parseUrl` in http-client. + + * Removed some redundant class constraints. + + * make_oxs_package.sh - use OSX env variable. + + * Replaced INSTALL with INSTALL.md, incorporating INSTALL and the + old installing page from website. + + * Added `winpkg` target to Makefile. This downloads the windows package + from appveyor and signs it using the key. + + * Document Org mode as a format containing raw TeX (Albert Krewinkel). + Raw TeX is kept verbatim when the output format is Emacs Org mode. + + * Support math with haddock-library >= 1.4. + + * Removed `-rtsopts` from library stanza. It has no effect, and Hackage + wouldn't accept the package. + + * Update library dependency versions. + +pandoc (1.17.1) + + * New output format: `docbook5` (Ivo Clarysse). + + * `Text.Pandoc.Options`: Add `writerDocBook5` to `WriterOptions` + (API change). + + * Org writer: + + + Add :PROPERTIES: drawer support (Albert Krewinkel, #1962). + This allows header attributes to be added to org documents in the form + of `:PROPERTIES:` drawers. All available attributes are stored as + key/value pairs. This reflects the way the org reader handles + `:PROPERTIES:` blocks. + + Add drawer capability (Carlos Sosa). For the implementation of the + Drawer element in the Org Writer, we make use of a generic Block + container with attributes. The presence of a `drawer` class defines + that the `Div` constructor is a drawer. The first class defines the + drawer name to use. The key-value list in the attributes defines + the keys to add inside the Drawer. Lastly, the list of Block elements + contains miscellaneous blocks elements to add inside of the Drawer. + + Use `CUSTOM_ID` in properties (Albert Krewinkel). The `ID` property is + reserved for internal use by Org-mode and should not be used. + The `CUSTOM_ID` property is to be used instead, it is converted to the + `ID` property for certain export format. + + * LaTeX writer: + + + Ignore `--incremental` unless output format is beamer (#2843). + + Fix polyglossia to babel env mapping (Mauro Bieg, #2728). + Allow for optional argument in square brackets. + + Recognize `la-x-classic` as Classical Latin (Andrew Dunning). + This allows one to access the hyphenation patterns in CTAN's + hyph-utf8. + + Add missing languages from hyph-utf8 (Andrew Dunning). + + Improve use of `\strut` with `\minipage` inside tables + (Jose Luis Duran). This improves spacing in multiline + tables. + + Use `{}` around options containing special chars (#2892). + + Avoid lazy `foldl`. + + Don't escape underscore in labels (#2921). Previously they were + escaped as `ux5f`. + + brazilian -> brazil for polyglossia (#2953). + + * HTML writer: Ensure mathjax link is added when math appears in footnote + (#2881). Previously if a document only had math in a footnote, the + MathJax link would not be added. + + * EPUB writer: set `navpage` variable on nav page. + This allows templates to treat it differently. + + * DocBook writer: + + + Use docbook5 if `writerDocbook5` is set (Ivo Clarysse). + + Properly handle `ulink`/`link` (Ivo Clarysse). + + * EPUB reader: + + + Unescape URIs in spine (#2924). + + EPUB reader: normalise link id (Mauro Bieg). + + * Docx Reader: + + + Parse `moveTo` and `moveFrom` (Jesse Rosenthal). + `moveTo` and `moveFrom` are track-changes tags that are used when a + block of text is moved in the document. We now recognize these tags and + treat them the same as `insert` and `delete`, respectively. So, + `--track-changes=accept` will show the moved version, while + `--track-changes=reject` will show the original version. + + Tests for track-changes moving (Jesse Rosenthal). + + * ODT, EPUB, Docx readers: throw `PandocError` on unzip failure + (Jesse Rosenthal) Previously, `readDocx`, `readEPUB`, and `readOdt` + would error out if zip-archive failed. We change the archive extraction + step from `toArchive` to `toArchiveOrFail`, which returns an Either value. + + * Markdown, HTML readers: be more forgiving about unescaped `&` in + HTML (#2410). We are now more forgiving about parsing invalid HTML with + unescaped `&` as raw HTML. (Previously any unescaped `&` + would cause pandoc not to recognize the string as raw HTML.) + + * Markdown reader: + + + Added bracket syntax for native spans (#168). + + Fix pandoc title blocks with lines ending in 2 spaces (#2799). + + Added `-s` to markdown-reader-more test. + + * HTML reader: fixed bug in `pClose`. This caused exponential parsing + behavior in documnets with unclosed tags in `dl`, `dd`, `dt`. + + * MediaWiki reader: Allow spaces before `!` in MediaWiki table header + (roblabla). + + * RST reader: Support `:class:` option for code block in RST reader + (Sidharth Kapur). + + * Org reader (all Albert Krewinkel, except where noted otherwise): + + + Stop padding short table rows. + Emacs Org-mode doesn't add any padding to table rows. The first + row (header or first body row) is used to determine the column count, + no other magic is performed. + + Refactor rows-to-table conversion. This refactors + the codes conversing a list table lines to an org table ADT. + The old code was simplified and is now slightly less ugly. + + Fix handling of empty table cells, rows (Albert Krewinkel, #2616). + This fixes Org mode parsing of some corner cases regarding empty cells + and rows. Empty cells weren't parsed correctly, e.g. `|||` should be + two empty cells, but would be parsed as a single cell containing a pipe + character. Empty rows where parsed as alignment rows and dropped from + the output. + + Fix spacing after LaTeX-style symbols. + The org-reader was droping space after unescaped LaTeX-style symbol + commands: `\ForAll \Auml` resulted in `∀Ä` but should give `∀ Ä` + instead. This seems to be because the LaTeX-reader treats the + command-terminating space as part of the command. Dropping the trailing + space from the symbol-command fixes this issue. + + Print empty table rows. Empty table rows should not + be dropped from the output, so row-height is always set to be at least 1. + + Move parser state into separate module. + The org reader code has become large and confusing. Extracting smaller + parts into submodules should help to clean things up. + + Add support for sub/superscript export options. + Org-mode allows to specify export settings via `#+OPTIONS` lines. + Disabling simple sub- and superscripts is one of these export options, + this options is now supported. + + Support special strings export option Parsing of special strings + (like `...` as ellipsis or `--` as en dash) can be toggled using the `-` + option. + + Support emphasized text export option. Parsing of emphasized text can + be toggled using the `*` option. This influences parsing of text marked + as emphasized, strong, strikeout, and underline. Parsing of inline math, + code, and verbatim text is not affected by this option. + + Support smart quotes export option. Reading of smart quotes can be + toggled using the `'` option. + + Parse but ignore export options. All known export options are parsed + but ignored. + + Refactor block attribute handling. A parser state attribute was used + to keep track of block attributes defined in meta-lines. Global state + is undesirable, so block attributes are no longer saved as part of the + parser state. Old functions and the respective part of the parser state + are removed. + + Use custom `anyLine`. Additional state changes need to be made after + a newline is parsed, otherwise markup may not be recognized correctly. + This fixes a bug where markup after certain block-types would not be + recognized. + + Add support for `ATTR_HTML` attributes (#1906). + Arbitrary key-value pairs can be added to some block types using a + `#+ATTR_HTML` line before the block. Emacs Org-mode only includes these + when exporting to HTML, but since we cannot make this distinction here, + the attributes are always added. The functionality is now supported + for figures. + + Add `:PROPERTIES:` drawer support (#1877). + Headers can have optional `:PROPERTIES:` drawers associated with them. + These drawers contain key/value pairs like the header's `id`. The + reader adds all listed pairs to the header's attributes; `id` and + `class` attributes are handled specially to match the way `Attr` are + defined. This also changes behavior of how drawers of unknown type + are handled. Instead of including all unknown drawers, those are not + read/exported, thereby matching current Emacs behavior. + + Use `CUSTOM_ID` in properties. See above on Org writer changes. + + Respect drawer export setting. The `d` export option can be used + to control which drawers are exported and which are discarded. + Basic support for this option is added here. + + Ignore leading space in org code blocks (Emanuel Evans, #2862). + Also fix up tab handling for leading whitespace in code blocks. + + Support new syntax for export blocks. Org-mode version 9 + uses a new syntax for export blocks. Instead of `#+BEGIN_`, + where `` is the format of the block's content, the new + format uses `#+BEGIN_export ` instead. Both types are + supported. + + Refactor `BEGIN...END` block parsing. + + Fix handling of whitespace in blocks, allowing content to be indented + less then the block header. + + Support org-ref style citations. The *org-ref* package is an + org-mode extension commonly used to manage citations in org + documents. Basic support for the `cite:citeKey` and + `[[cite:citeKey][prefix text::suffix text]]` syntax is added. + + Split code into separate modules, making for cleaner code and + better decoupling. + + * Added `docbook5` template. + + * `--mathjax` improvements: + + + Use new CommonHTML output for MathJax (updated default MathJax URL, + #2858). + + Change default mathjax setup to use `TeX-AMS_CHTML` configuration. + This is designed for cases where the input is always TeX and maximal + conformity with TeX is desired. It seems to be smaller and load faster + than what we used before. See #2858. + + Load the full MathJax config to maximize loading speed (KolenCheung). + + * Bumped upper version bounds to allow use of latest packages + and compilation with ghc 8. + + * Require texmath 0.8.6.2. Closes several texmath-related bugs (#2775, + #2310, #2310, #2824). This fixes behavior of roots, e.g. + `\sqrt[3]{x}`, and issues with sub/superscript positioning + and matrix column alignment in docx. + + * README: + + + Clarified documentation of `implicit_header_references` (#2904). + + Improved documentation of `--columns` option. + + * Added appveyor setup, with artefacts (Jan Schulz). + + * stack.yaml versions: Use proper flags used for texmath, pandoc-citeproc. + + * LaTeX template: support for custom font families (vladipus). + Needed for correct polyglossia operation with Cyrillic fonts and perhaps + can find some other usages. Example usage in YAML metadata: + + fontfamilies: + - name: \cyrillicfont + font: Liberation Serif + - name: \cyrillicfonttt + options: Scale=MatchLowercase + font: Liberation + + * Create unsigned msi as build artifact in appveyor build. + + * On travis, test with ghc 8.0.1; drop testing for ghc 7.4.1. + +pandoc (1.17.0.3) + + * LaTeX writer: Fixed position of label in figures (#2813). + Previously the label wasn't in the right place, and `\ref` + wouldn't work properly. + * Added .tei test files to pandoc.cabal so they'll be included + in tarball (#2811). + * Updated copyright dates. + +pandoc (1.17.0.2) + + * Fixed serious regression in `htmlInBalanced`, which caused + newlines to be omitted in some raw HTML blocks in Markdown + (#2804). + +pandoc (1.17.0.1) + + * File scope is no longer used when there are no input files (i.e., + when input comes from stdin). Previously file scope was triggered + when the `json` reader was specified and input came from `stdin`, + and this caused no output to be produced. (Fix due to Jesse Rosenthal; + thanks to Fedor Sheremetyev for calling the bug to our attention.) + * Improved documentation of templates (#2797). + +pandoc (1.17) + + * Added `--file-scope` option (Jesse Rosenthal). + By default pandoc operates on multiple files by first concatenating + them (around extra line breaks) and then processing the joined file. So + it only parses a multi-file document at the document scope. This has the + benefit that footnotes and links can be in different files, but for + some purposes it is useful to parse the individual files first + and then combine their outputs (e.g. when the files use footnotes + or links with the same labels). The `--file-scope` option causes + pandoc to parse the files first, and then combine the parsed output, + instead of combining before parsing. `--file-scope` is selected + automatically for binary input files (which cannot be concatenated) + and for pandoc json. + + * Add TEI Writer (Chris Forster) and `tei` output format. + + * Added a general `ByteStringReader` with warnings, used by the docx + reader (API change, Jesse Rosenthal). + + * Add `readDocxWithWarnings` (API change, Jesse Rosenthal). + + * Changed type of `Shared.uniqueIdent`'s argument from `[String]` + to `Set String.` This avoids performance problems in documents with + many identically named headers (API change, #2671). + + * Removed `tex_math_single_backslash` from `markdown_github` options + (#2707). + + * Make language extensions as well as full language names + trigger syntax highlighting. For example, `py` will now work as + well as `python` (jgm/highlighting-kate#83). + + * Added `institute` variable to latex, beamer templates (Fraser + Tweedale, Josef Svenningsson). + + * Docx reader (Jesse Rosenthal): + + + Handle alternate content. Some word functions (especially graphics) + give various choices for content so there can be backwards compatibility. + + Don't turn numbered headers into lists. + + Docx Reader: Add state to the parser, for warnings + + Update feature checklist in source code. + + Get rid of `Modifiable` typeclass. + + Add tests for adjacent hyperlinks. + + Add a "Link" modifier to `Reducible`. We want to make sure that + links have their spaces removed, and are appropriately smushed + together (#2689). + + * HTML reader: + + + Fixed behavior of base tag (#2777). + If the base path does not end with slash, the last component + will be replaced. E.g. base = `http://example.com/foo` + combines with `bar.html` to give `http://example.com/bar.html`. + If the href begins with a slash, the whole path of the base + is replaced. E.g. base = `http://example.com/foo/` combines + with `/bar.html` to give `http://example.com/bar.html`. + + Rewrote `htmlInBalanced`. This version avoids an exponential + performance problem with ` in a comment or string. + + More lenient non-quoted attribute values. + Now we accept anything but a space character, quote, or <>. + This helps in parsing e.g. www.google.com! + + Bare & signs are now parsed as a string. This is a common + HTML mistake. + + Skip a bare < in malformed HTML. + + * Removed html2markdown and hsmarkdown. + + html2markdown is no longer needed, since you can now pass URI + arguments to pandoc and directly convert web pages. (Note, + however, that pandoc assumes the pages are UTF8. html2markdown + made an attempt to guess the encoding and convert them.) + + hsmarkdown is pointless -- a large executable that could be + replaced by 'pandoc --strict'. + + * In most writers, an image in a paragraph by itself is now rendered + as a figure, with the alt text as the caption. (Texinfo, HTML, RST, + MediaWiki, Docbook, LaTeX, ConTeXt, HTML.) Other images are + rendered inline. + + * Depend on extensible-exceptions. This allows pandoc to be compiled + on GHC 6.8. + + * Added --base-header-level option. For example, --base-header-level=2 + will change level 1 headers to level 2, level 2 to level 3, etc. + Closes Debian #563416. + + * Incomplete support for RST tables (simple and grid). + Thanks to Eric Kow. Colspans and rowspans not yet supported. + + * Added accessors (docTitle, docAuthors, docDate) to Meta type. + + * MediaWiki writer: format links with relative URLs as wikilinks. + The new rule: If the link target is an absolute URL, an external + link is created. Otherwise, a wikilink is created. + + * Text.Pandoc.Shared: Export uniqueIdent, and don't allow tilde in + identifier. Note: This may break links to sections that involve + tildes. + + * Markdown(+lhs) reader: handle "inverse bird tracks." + Inverse bird tracks (<) are used for haskell example code that is not + part of the literate Haskell program. Resolves Issue #211. + + * LaTeX reader: + + Recognize '\ ' (interword space). + + Recognize nonbreaking space '~'. + + Ignore \section, \pdfannot, \pdfstringdef. Ignore alt title in + section headers. Don't treat \section as inline LaTeX. + Resolves Issue #202. + + LaTeX reader: allow any special character to be escaped. + Resolves Issue #221. + + LaTeX reader: treat \paragraph and \subparagraph as level 4, 5 + headers. Resolves Issue #207. + + * Use template variables for include-before/after. + + These options now imply -s; previously they worked also in fragment + mode. + + Users can now adjust position of include-before and include-after + text in the templates. + + Default position of include-before moved back (as it was before 1.4) + before table of contents. + + Resolves Issue #217. + + * Don't print an empty table header: (all writers). + Resolves Issue #210. + + * HTML, Docbook writer: Use tbody, thead, and cols in tables. + + * HTML writer: Don't include TOC div if table of contents is empty. + + * Markdown writer: Fixed citations. + Previously the markdown writer printed raw citation codes, e.g. + [geach1970], rather than the expanded citations provided by + citeproc, e.g. (Geach 1970). Now it prints the expanded citations. + This means that the document produced can be processed as a markdown + document without citeproc. Thanks to dsanson for reporting, and + Andrea Rossato for the patch. + + * Improved and simplified title block in context template. + Previously it caused an error if there was no title. + This method should also be easier for users to customize. + + * Markdown reader: + + Treat p., pp., sec., ch., as abbreviations in smart mode. + + Disallow blank lines in inline code span. + + Allow footnotes to be indented < 4 spaces. + This fixes a regression. A test case has been added. + + Escape spaces in URLs as %20. Previously they were incorrectly + escaped as +, which is appropriate only for the query part of + a URL. Resolves Issue #220. + + Require two spaces after capital letter + period for list item. + Otherwise "E. coli" starts a list. This might change the semantics + of some existing documents, since previously the two-space + requirement was only enforced when the second word started + with a capital letter. But it is consistent with the existing + documentation and follows the principle of least surprise. + Resolves Issue #212. + + * LaTeX template: redefine labelwidth when using enumerate package. + Otherwise the list labels (numbers) often extend past the left + margin, which looks bad. + + * Mediawiki writer: Don't print a "== Notes ==" header before + references. This is too English-centric. Writers can provide their + own header at the end of the document. + + * Promoted mediawiki headers. '= head =' is now level 1, '== head ==' + level 2, etc. This seems to be correct; it's only by convention + that wikipedia articles have level 2 headers at most. + Patch due to Eric Kow. + + * RunTests.hs: Set LANG to a UTF-8 locale. Use 'pandoc --data-dir=' so + data files don't need to have been installed. This removes the need to + set HOME. + + * HTML reader: + + Handle spaces before . Resolves Issue #216. + + Be forgiving in parsing a bare list within a list. + The following is not valid xhtml, but the intent is clear: +
    +
  1. one
  2. +
    1. sub
    +
  3. two
  4. +
+ We'll treat the
    as if it's in a
  1. . Resolves Issue #215. + + * Updated INSTALL instructions. cabal method is now promoted. + + * Updated markdown2pdf man page. It no longer says all pandoc options + are accepted. + + * README/man pages: Removed advice to pipe through tidy before HTML + reader. This is obsolete, now that we have a forgiving HTML parser. + + * LaTeX writer: set numbersections template variable, so + the section numbering options work again. + + * Removed obsolete Makefile. + + * Website: renamed index.txt.in -> index.txt. + + * New batch file to make-windows-installer. + + Removed old Makefile.windows + + Added make-windows-installer.bat + + Modified default installer name in pandoc-setup.iss + + * Removed freebsd and macports directories. + They are no longer up to date. + + * Setup.hs: + + Made man page building sensitive to build verbosity. + + Improved detection of highlighting support in test hook. + + Install wrapper scripts into cabal bin directory. + + Also simplified installManpages. + + Setup.hs: install manpages to mandir. Code borrowed from darcs. + + * Changed default of writerXeTeX to False. + + * HTML writer: don't include empty UL if --toc but no sections. + Resolves Issue #199. + + * LaTeX writer: + + + If book, report, or memoir documentclass, use \chapter{} + for first-level headers. Otherwise use \section{}. + + Removed stLink, link template variable. Reason: we now always + include hyperref in the template. + + * LaTeX template: + + + Only show \author if there are some. + + Always include hyperref package. It is used not just for links but + for toc, section heading bookmarks, footnotes, etc. Also added + unicode=true on hyperref options. + + * markdown2pdf: always do at least two runs. hyperref bookmarks + require this. + + * cabal file: Removed unneeded dependency on template-haskell. + + * Windows installer - fixed bug in data file locations. + Resolves Issue #197. + + * Deprecated --custom-header in documentation. + Removed old "Custom Headers" section in README. + +pandoc (1.4) + + [ John MacFarlane ] + + * Pandoc will now compile with either GHC 6.10 or 6.12. + + Don't use System.IO.UTF8 when compiling with 6.12 + + Use -fno-warn-unused-do-bind option when compiling with 6.12 + + * Replaced old headers with templates. Now users have much more + control over the way documents appear in --standalone mode, + and writer code is simplified. Resolves Issues #59, 147. + Every effort has been made to retain backwards compatibilty. + So, the --custom-header option should still work as before. + + + Added Text.Pandoc.Templates. This provides functions for + retrieving default templates and for rendering templates. + + System templates (in the pandoc data directory) can be + overridden by user templates in $HOME/.pandoc/templates. + + Removed Text.Pandoc.DefaultHeaders. + + Removed data/headers directory. + + Added templates directory. + + Added writerTemplate and writerVariables fields to WriterOptions. + + Removed writerTitlePrefix, writerHeader fields from WriterOptions. + + Changed --print-default-header to --print-default-template. + + Added --template option. + + Added -V/--variable option to set custom template variables. + + * Pandoc no longer requires Template Haskell. Resolves Issue #186. + + + Removed need for TH in ODT module. Instead get reference.odt from + data file at run time. + + Removed TH dependency from S5 module. S5 module now exports + s5HeaderIncludes, which pandoc.hs includes if writer is s5 and + standalone. + + Refactored LaTeXMathML not to use TH. + + * Meta is now Meta [Inline] [[Inline]] [Inline] rather than + Meta [Inline] [String] String. Authors and date in Meta are now lists + of Inline elements rather than raw strings. This means that they can + be formatted and can include footnotes. NOTE: This may be a breaking + change for those using pandoc as a library. + + * Added readDataFile to Text.Pandoc.Shared. This retrieves + a data file from the user pandoc data directory (~/.pandoc + on unix), or, if not found there, from the system data + directory ($CABALDIR/shared/pandoc-VERSION/). All data + files, including templates, LaTeXMathML.js, s5 styles, + and reference.odt, can be overridden by the user. + + * s5 files moved from data/ui/default to s5/default. + + * Use unicode instead of entities in HTML and XML output. Resolves + Issue #163. + + * Prettier HTML footnote references: put anchor inside sup, + instead of other way. Resolves Issue #191. Thanks to + infinity0x. + + * Added --xetex option to pandoc and markdown2pdf. + If --xetex is specified, pandoc produces latex suitable for + processing by xelatex, and markdown2pdf uses xelatex to create + the PDF. Resolves Issue #185. + + * RTF writer: multiple authors now occupy multiple paragraphs rather + than using a line break. + + * Man writer: now the "--after-body" will come after the "AUTHORS" + section, whereas before it would come before it. This is a + slight break from backwards compatibility. + + * Added --reference-odt option, so users may customize the styles + used in pandoc-generated ODT files. Users may also place a + default reference.odt in the ~\.pandoc directory. + + * ODT writer: + + Indented and line-broke styles.xml so it can be modified more easily. + + Omitted some unnecessary style declarations. + + Don't wrap text in OpenDocument writer. The tags are too long, making + wrapping ugly and pointless. + + * LaTeX reader: use \\ to separate multiple authors. + + * Markdown reader: use ; as separator between authors. + This allows you to use ',' within author names: e.g. "John Jones, Jr." + + * S5 writer: use linebreak to separate authors in title page. + + * RST reader: Allow :: before lhs code block. The RST spec requires the + :: before verbatim blocks. This :: should not be treated as literal + colons. Resolves Issue #189. + + * Documented pandoc 1.3's new definition list syntax in README. + (An oversight in the last release.) + + * markdown2pdf.hs: + + interpret ! in a log as an error line. + + --toc now works properly. + + * Changes in RunTests.hs: + + Use the Diff library rather than a local copy of Diff.hs. + (This vastly increases performance.) This change means that 'cabal + test' presupposes that the Diff library is installed. + + Removed tests/Diff.hs from cabal file. + + Changed RunTests to use local environment. We need at least HOME, so + pandoc can find its data directory. + + * Updated windows installer to install data files in the app directory. + + * Windows installer now installs portable wrappers hsmarkdown and + markdown2pdf. + +pandoc (1.3) + + [ John MacFarlane ] + + * Added --id-prefix option (Issue #41). This adds a prefix to all + automatically generated HTML identifiers, which helps prevent + duplicate identifiers when you're generating a fragment (say a blog + post). + + * Added --indented-code-classes option. This specifies classes + to use for indented code blocks. (Patch due to buttock; Issue #87.) + + * --number-sections now affects HTML output as well as ConTeXt and LaTeX + (Issue #150). + + * Improved syntax for markdown definition lists (Issue #24). + Definition lists are now more compatible with PHP Markdown Extra. + + You can have multiple definitions for a term (but still not + multiple terms). + + Multi-block definitions no longer need a column before each block + (indeed, this will now cause multiple definitions). + + The marker no longer needs to be flush with the left margin, + but can be indented at or two spaces. Also, ~ as well as : + can be used as the marker (this suggestion due to David + Wheeler.) + + There can now be a blank line between the term and the + definitions. + + * Better looking simple tables. Resolves Issue #180. + + Markdown reader: simple tables are now given column widths of 0. + + Column width of 0 is interpreted as meaning: use default column width. + + Writers now include explicit column width information only + for multiline tables. (Exception: RTF writer, which requires + column widths. In this case, columns are given equal widths, + adding up to the text width.) + + Simple tables should now look better in most output formats. + + * Allow markdown tables without headers (Issue #50). + The new syntax is described in README. Also allow optional line of + dashes at bottom of simple tables. + + * Compensate for width of final table column (Issue #144). + + * Treat a backslash followed by a newline as a hard line break + in markdown. Resolves Issue #154. This is a nice alternative + to markdown's "invisible" way of indicating hardline breaks + using lines that end with two spaces. + + * Improved performance of markdown reader by ~10% by eliminating the + need for a separate parsing pass for notes. Raw notes are now stored + on the first pass (which parses references), then parsed when the + note is inserted into the AST. The stateNotes field in ParserState + is now a list of [(String, String)] pairs instead of [(String, + [Block])]. + + * In markdown reader, treat 4 or more * or _ in a row as literal + text. (Trying to parse long strings of * or _ as strong or emph + leads to exponential performance problems.) + + * Markdown reader: Use + rather than %20 for spaces in URLs. + + * Fixed htmlComment parser, adding a needed 'try'. + + * Don't print raw HTML in man output. + + * Allow . _ and ~ in header identifiers. + + * Specially mark code blocks that were "literate" in the input. + They can then be treated differently in the writers. This allows + authors to distinguish bits of the literate program they are writing + from source code examples, even if the examples are marked as + Haskell for highlighting. (Issue #174.) + + * Modified html+lhs output to use "haskell" highlighter instead + of "literateHaskell". The highlighting module now adds bird tracks + after highlighting (for HTML output), if the code block has the + "literate" class. This gives better results, because kate's + haskell highlighter is much better than the literateHaskell + highlighter. + + * Fixed handling of footnotes in titles (HTML) and headers (LaTeX). + (Issue #137.) + + * Support for "..code-block" directive in RST reader. Not core + RST, but used in Sphinx for code blocks annotated with syntax + information. Thanks to Luke Plant for the patch. + + * Added "head" to list of block-level HTML tags. Resolves + Issue #108. + + * Added stripTags to Text.Pandoc.XML. This is used in the HTML writer. + + * Set utf-8 encoding in texinfo headers. + + * Docbook writer: add ids to sections. Use link for internal links. + (Issue #60.) + + * Blank lines after lists in MediaWiki writer. + + * Properly handle commented-out list items in markdown. + Resolves Issue #142. Example: + + - a + + - c + + * Changed heuristic in compactify. compactify has to decide whether a + Para that ends a list is a Para intentionally, or just because of + the blank lines at the end of every list. In the latter case the + Para is turned to a Plain. The old heuristic was: change final Para + to Plain iff the other items all end in Plain. This produces bad + results when, for example, an item contains just a Plain and an HTML + comment, as it does in the list above. The new heuristic: change + final Para to Plain iff the other items don't contain a Para. + + * Added % as an rst underline character. Resolves Issue #173. + + * Fix inline math parser so that \$ is allowed in math. + Resolves Issue #169. + + * Translate \int (integral) into unicode when using unicode math + method. Resolves Issue #177. + + * markdown2pdf.hs improvements: + + Use System.IO.UTF8. + + Print error messages on last attempt. + + Do not create a backup when overwriting a PDF (Issue #166). + + Accept --longopt=val options. + + Added man/man1/markdown2pdf.1 to extra-tmp-files in cabal, so that + it is properly cleaned. + + * Added haddock comments warning that readers assume \n line endings. + + * Updated COPYRIGHT file. + + * Makefile: Changed EXECSBASE so it doesn't pull in hsmarkdown & + markdown2pdf. Otherwise strip tries to strip shell scripts when you + install using 'make'. + + * Changed Makefile so it doesn't build Haskell wrappers. + + * Fixed Makefile so it doesn't try to build man pages in build-doc. + + * Install pcre3.dll in Windows install script; this allows us to + package a version of pandoc with highlighting support. + +pandoc (1.2.1) + + [ John MacFarlane ] + + * Fixed regression with --preserveTabs. Brought back optPreserveTabs. + The trick of setting tabStop to 0 to mean "preserve tabs" had a bad + side effect: strings of 0 spaces were interpreted as indentation. + So, with --preserve-tabs, unindented paragraphs were treated as + code. Resolves Issue #138. + + * HTML writer: wrap sections in divs. Resolves Issue #70. + + + hierarchicalize has been rationalized; it builds a hierarchical + representation of the document from the headers, and simultaneously + gives each section a unique identifier based on the heading title. + + Identifiers are now attached to the divs rather than + to the headers themselves. + + Table of content backlinks go to the beginning of the table, rather + than to the section reference that was clicked. + + Code for constructing identifiers has been moved to Text.Pandoc.Shared + from the HTML writer, since it is now consumed only by + hierarchicalize. + + In --strict mode, pandoc just prints bare headings, as before + (unless --toc has been specified). + + In s5 output, it does not wrap sections in divs, as that seems to + confuse the s5 javascript. + + * Man writer: break lines at end of each sentence. groff expects this + and treats '.' and '?' differently when followed by line ending as + opposed to ordinary space. Also, don't escape periods. Instead, use + zero-width character \& to avoid unwanted interpretation of periods + at start of line. Resolves Issue #148. + + * Markdown writer: Added '#' and '>' to list of characters to be + escaped in markdown output. Removed '<', as it is not an officially + escapable character. This partially resolves Issue #96. + + * Make --smart the default for man output format. Otherwise we have + trouble dividing lists of endlines into sentences. + + * DocBook writer: Use language attribute to indicate source language + in code blocks. + + * RST reader: + + + Allow # to continue list, even if the list was started with an + explicit marker. For example: + + A. my list + #. continued + + Resolves Issue #140. + + Allow continuation lines in line blocks. Also added test cases for + line blocks for RST reader. Resolves Issue #149. + + Allow explicit links with spaces in URL: `link `_ + + * Improved LaTeX reader's coverage of math modes. Remove displaymath* + (which is not in LaTeX) and recognize all the amsmath environments + that are alternatives to eqnarray, namely equation, equation*, + gather, gather*, gathered, multline, multline*, align, align*, + alignat, alignat*, aligned, alignedat, split. Resolves Issue #103. + Thanks to shreevatsa.public for the patch. + + * Markdown reader: + + + Allow -, _, :, . in markdown attribute names. These are legal in + XML attribute names. + + Use non-breaking spaces in abbreviations. + + Markdown reader: improved efficiency of abbreviation parsing. + Instead of a separate abbrev parser, we just check for + abbreviations each time we parse a string. This gives a huge + performance boost with -S. Resolves Issue #141. + + * Improved efficiency of shared parsers: hexNum, htmlComment, + whitespace, indentSpaces. + + * Export HTMLMathMethod in Text.Pandoc. + + * Export languagesByExtension in Text.Pandoc.Highlighting. + + * Added new Haskell version of markdown2pdf, due to + Paulo Tanimoto. This should be more portable than the old + shell script. + + * Made 'pandoc -v' more explicit about compiler options. + Resolves Issue #139. + + * pandoc.hs: Made --strict compatible with --standalone, --toc. + + * Use Paths_pandoc to get version number, instead of hard-coding it + into Text/Pandoc.hs. + +pandoc (1.2) + + [ John MacFarlane ] + + * Added support for literate Haskell. lhs support is triggered by + '+lhs' suffixes in formats. For example, 'latex+lhs' is literate + Haskell LaTeX. '.lhs' files are treated by default as literate + markdown. + + + Added stateLiterateHaskell to parser state. + + Added parser for lhsCodeBlock to Markdown, RST, LaTeX readers. + + Added parser for |inline lhs| to LaTeX reader. + + Added writerLiterateHaskell to WriterOptions. + + Added lhs support to Markdown, RST, LaTeX, HTML writers. + + Added definition of code environment to LaTeX header. + + Added tests (run only if highlighting support compiled in). + + Documented lhs features in man page and README. + + * In Text.Pandoc.Definition, added processWith, processWithM, + and queryWith, and deprecated processPandoc and queryPandoc + for these more general functions. + + * Fixed bug in mediawiki writer: improper closing tags in tables. + Thanks to Benct Philip Jonsson for reporting the bug. + + * Added --email-obfuscation option. + + + Added writer option for email obfuscation. + + Implemented email obfuscation options in HTML writer. + + Added option to option parser. + + Documented in README and pandoc man page. + + Resolves Issue #97. + + * LaTeX writer: fixed bug with empty table cells. + Resolves Issue #107. Thanks to rodja.trappe for the patch. + + * Fixed bug with header spacing in Markdown and RST writers. + A null header (Meta [] [] []) should not cause a blank line + at the beginning of output. But a blank line is needed between + a non-null header and the main text. + + * Markdown reader: Relax spacing rules for $$ in display math. Now + space and newlines are allowed after the opening $$ and before the + closing $$. However, the display math cannot contain an entirely + blank line. Resolves Issue #105. + + * Markdown reader: Gobble space after Plain blocks containing only + raw html inline. Otherwise following header blocks are not parsed + correctly, since the parser sees blank space before them. Resolves + Issue #124. + + * Markdown reader: Allow " as well as '' to end a latex double-quote. + + * Conditionally depend on syb and base >= 4 if ghc >= 6.10. + Resolves Issue #109. + + * Fixed problems in RST and markdown output due to bug in pretty-1.0.1.0 + + + Added hang' function to Text.Pandoc.Shared; this will be used instead + of hang, which doesn't work properly in pretty-1.0.1.0. When pretty + is upgraded, we can go back to hang. + See http://article.gmane.org/gmane.comp.lang.haskell.general/16687 + + Use hang' (and some different techniques) in RST and markdown writers. + Some output is now a bit different. + + * Brought citeproc support up to date for citeproc-hs-0.2. + (Patch by Andrea Rossato.) + + * Moved all haskell source to src subdirectory. Renamed Main.hs to + pandoc.hs. + + * Rewrote hsmarkdown in Haskell for portability (src/hsmarkdown.hs). + For now, keeping the old shell script too. + + * Added TemplateHaskell to Extensions for executable, removed + -threaded for library. Thanks to duncan.coutts for the bug report. + Resolves Issue #121. + + * Moved some Extra-Source-Files to Data-Files. + + * Moved tabFilter to Shared. + + * In pandoc.hs, removed optPreserveTabs; instead, tabstop of 0 means + preserve tabs. + + * Minor code cleanup based on hlint suggestions. + +pandoc (1.1) + + [ John MacFarlane ] + + * Main.hs: + + + Changed date on copyright message in Main.hs. + + Have the '-v' option print syntax highlighting languages + separated by commas, and wrapped in lines, instead of in five + columns as before. + + * Added --jsmath option. Resolves Issue #68. + + + Added --jsmath option to Main.hs + + Added JsMath to HTMLMathMethod in Text.Pandoc.Shared. + + Handle math appropriately in HTML writer when JsMath selected. + + Documented the option in README and man page. + + * Text.Pandoc.Shared: Changed compactify to use a better heuristic + for tight and loose lists. Final Para is changed to Plain if all + other list items *end* with a Plain block. Addresses Issue #99. + + * HTML reader: + + + Added colons to protocols in unsanitaryURI. Closes Issue #88. + + HTML reader: Don't interpret contents of
     blocks as markdown.
    +      Added rawVerbatimBlock parser.  Resolves Issue #94.
    +
    +  * Markdown reader:
    +
    +    + Allow URLs with spaces in them in links and references, but escape
    +      them as "%20".
    +    + Allow blank space at the end of horizontal rules.
    +
    +  * RST reader: Modified 'unknownDirective' parser to handle comment
    +    blocks correctly, and added tests for comment blocks. Resolves Issue
    +    #86. Closes Debian Bug #500662.
    +
    +  * HTML writer:
    +
    +    + Include classes on tr elements in HTML output:
    +      "header", "odd", "even".  This allows tables to be styled with
    +      lines in alternating colors.  Resolves Issue #91.
    +    + Enclose all LaTeXMathML bits in .
    +      This prevents parts of the document that are not math from being
    +      interpreted as math by LaTeXMathML.js.
    +
    +  * OpenDocument and ODT writers:  Added support for HorizontalRule elements,
    +    which were formerly ignored.  Resolves Issue #95.
    +
    +  * Text.Pandoc.Shared:  Modified wrappedTeX to eliminate the line break
    +    between a footnote and immediately following nonspace characters in
    +    LaTeX and ConTeXt output. (This gets interpreted as a space, which
    +    is not desired in cases like `text^[note]---`.)  Resolves Issue #93.
    +
    +  * Windows installer: Don't require admin privileges to run
    +    installer.  Modified pandoc-setup.iss, and changed modpath.iss to
    +    modify HKCU path if user lacks admin privileges.  Also fixed case
    +    where oldpath is empty (previously this led to the new path
    +    beginning with a semicolon).
    +
    +  * Updated INSTALL instructions for Arch packages and OS X install using
    +    cabal-install.
    +
    +  * Removed the (now unneeded) debian directory.
    +    Removed empty Codec and System directories.
    +
    +  * Moved odt-styles/ to data/.  Removed unneeded variable in Makefile.
    +
    +  * Modified Setup.hs so that the "test" target returns an error status
    +    when tests fail, and "build" returns a success status if
    +    the build succeeds.  Resolves Issue #100.
    +
    +  * Added BUGS to files in tarball.
    +
    +
    +pandoc (1.0.0.1)
    +
    +  [ John MacFarlane ]
    +
    +  * Removed spurious reference to pdf output format from pandoc(1) man page.
    +
    +pandoc (1.0)
    +
    +  [ Andrea Rossato ]
    +
    +  * Added new OpenDocument writer.
    +
    +  * Added support for SmallCaps inline element.
    +
    +  * Added support for integrating pandoc with citeproc-hs.
    +
    +    + Added Cite element to definition and writers.
    +    + Added Text.Pandoc.Biblio module
    +    + Note: This support is included only if the 'citeproc'
    +      Cabal configuration flag is set.
    +
    +  * Made Pandoc data structure an instance of Typeable.
    +    Added new processPandoc and queryPandoc functions, to query
    +    or transform matching elements in a Pandoc structure.
    +
    +  [ Peter Wang ]
    +
    +  * Added new Texinfo writer.
    +
    +  [ John MacFarlane ]
    +
    +  * Changes to Texinfo writer:
    +
    +    + No space between paragraph and following @verbatim (provides more
    +      pleasing appearance in text formats)
    +    + Blank line consistently after list environments.
    +    + Removed deVerb.
    +    + Use @code instead of @verb for inline code (this solves the character
    +      escaping problem for texi2dvi and texi2pdf).
    +    + Added news of Texinfo writer to README.
    +    + Added Texinfo to list of formats in man page, and removed extra 'groff'.
    +    + Added texi & texinfo extensions to Main.hs, and fixed bug in determining
    +      default output extension.
    +    + Modified disallowedInNode in Texinfo writer to correct list of disallowed characters.
    +
    +  * Added tests for OpenDocument writer.
    +
    +  * Added ODT writer (using zip-archive library to package output of
    +    OpenDocument writer).  Added odt-styles directory with default ODT styles.
    +
    +  * Added new mediawiki writer and tests.
    +
    +  * Markdown reader: Added support for delimited code blocks, with optional
    +    syntax highlighting using highlighting-kate (if the 'highlighting'
    +    configuration option is selected).
    +
    +    + Currently highlighting is supported only in the HTML writer.
    +    + Delimited code blocks can have attributes; using the language name as
    +      class triggers highlighting.
    +    + New Attributes parameter in CodeBlock structure.
    +    + --version now indicates whether syntax highlighting support is compiled
    +      in, and prints a list of supported languages
    +
    +  * Removed debian directory. Pandoc is no longer a native debian package.
    +
    +  * Changes to build process:  pandoc can now be built from the repository
    +    using Cabal.  No unix tools are needed (so, pandoc can be built on Windows
    +    without Cygwin).
    +
    +    + Include shell scripts themselves in repo, rather than generating from wrappers.
    +      Removed wrappers directory and wrappers Makefile target.
    +    + Text/Pandoc/ASCIIMathML.hs, Text/Pandoc/DefaultHeaders.hs,
    +      and Text/Pandoc/Writers/S5.hs are no longer built in Makefile
    +      from templates in the templates/ directory. Instead, they use template
    +      haskell to read data at compile time from the relevant files in data/.
    +      Template haskell functions go in a new module, Text.Pandoc.TH.
    +    + man pages are now generated in Setup.hs hook, not by Makefile
    +    + Makefile 'tarball' target now calls Cabal's 'sdist'
    +    + Added "Extra-Source-Files" to pandoc.cabal, so sdist contains everything needed
    +    + Added "Build-Type" field to pandoc.cabal to avoid warning.
    +    + Added to "Extra-source-files" and "Extra-tmp-files" in pandoc.cabal,
    +      so 'sdist' and 'clean' will work properly.
    +    + Setup.hs now generates man pages in a postbuild hook.
    +    + Added dependency-checking to Setup.hs, so it only rebuilds things
    +      that need rebuilding.
    +    + Added 'library' and 'executable' configuration flags.
    +      Cabal can now be told to build just the library or just the executable.
    +    + CABALOPTS may now be specified with 'make' to pass Cabal configuration flags.
    +      For example:  CABALOPTS=-fhighlighting make
    +
    +  * Rewrote test suite so it doesn't depend on perl or unix tools.
    +
    +    + Replaced old runtests.pl with a Haskell script RunTests.hs.
    +    + Added Diff.hs module to be used by RunTests.hs instead of unix 'diff'.
    +    + Added test hook to Setup.hs, so tests may be run from cabal.
    +    + Changed Makefile's 'test' target to run tests via cabal.
    +    + Removed old generate.sh.
    +    + Since we no longer have 'sed' to filter out raw HTML sections
    +      from the docbook writer test, or raw LaTeX sections from the
    +      context writer test, we now just include these sections.
    +      They can be taken out if it is necessary to process the files.
    +    + Updated latex and context writer tests to remove extra spaces
    +      after '\\item'
    +    + Added a markdown table reader test.
    +    + Added markdown-reader-more.txt to test suite, for additional test cases
    +      for raw ConTeXt environments and more.
    +
    +  * Compatibility fixes for CPP, Cabal, and haddock:
    +
    +    + Use CPP in "Extensions" field in pandoc.cabal.
    +    + Removed use of backslash string continuations in source files.
    +
    +  * Removed pandoc.cabal.ghc66.  We now require Cabal >= 1.2, GHC >= 6.8,
    +    base >= 3.
    +
    +  * Require parsec < 3.
    +    The compatibility module in parsec 3.0.0 gives far worse performance than
    +    parsec 2.1.  Eventually pandoc will be upgraded to use the new bytestring
    +    version of parsec, and then we'll go to parsec 3.0.0.
    +
    +  * Removed Text.Regex dependencies by rewriting using plain Haskell
    +    (Text.Pandoc.Writers.RTF, Text.Pandoc.Writers.HTML, Main.hs)
    +
    +  * Moved Text.Pandoc.Writers.DefaultHeaders -> Text.Pandoc.DefaultHeaders.
    +
    +  * Makefile:
    +
    +    + Added 'configure' as dependency of 'uninstall-all'.
    +      (It uses the Cabal build program.)
    +    + Makefile:  only use --with-hc-pkg if GHC_PKG is defined.
    +      Note that Cabal will automatically choose the ghc-pkg appropriate
    +      for the compiler selected, so normally specifying GHC by itself
    +      is sufficient.
    +
    +  * Removed Text.Pandoc.UTF8 module; instead, depend on utf8-string and use
    +    its IO and conversion functions.
    +
    +  * Added -Wall to ghc-options in pandoc.cabal.  Cleaned up modules so that
    +    everything is -Wall clean.
    +
    +    + Added pragma to HTML writer to avoid deprecation warning for use of "start" attribute.
    +    + Added pragma to Text/Pandoc/Shared.hs to get rid of "orphan instance" warnings.
    +      (These are caused by the Lift instance for ByteString.)
    +
    +  * Changed the comment used to replace unsafe HTML if sanitize-html option
    +    selected.
    +
    +  * Made -c/--css option repeatable on the command line (like -H, -A, -B).
    +
    +  * Moved XML-formatting functions to new unexported module Text.Pandoc.XML.
    +
    +  * Escape '\160' as " ", not " " in XML.
    +    "nbsp" isn't a predefined XML entity.
    +
    +  * Fixed bug in RST reader, which would choke on: "p. one\ntwo\n".
    +    Added some try's in ordered list parsers.
    +
    +  * Man writer:  don't escape " as \".
    +
    +  * Allow newline before URL in markdown link references.  Resolves Issue #81.
    +    Added tests for this issue in new "markdown-reader-more" tests.
    +    Changed RunTests.hs to run these tests.
    +
    +  * Support for display math.  Resolves Issue #47.
    +
    +    + Added a DisplayMath/InlineMath selector to Math inlines.
    +    + Markdown parser yields DisplayMath for $$...$$.
    +    + LaTeX parser yields DisplayMath when appropriate.  Removed
    +      mathBlock parsers, since the same effect is achieved by the math
    +      inline parsers, now that they handle display math.
    +    + Writers handle DisplayMath as appropriate for the format.
    +    + Modified tests accordingly; added new tests for display math.
    +
    +  * Use LaTeXMathML instead of ASCIIMathML.  LaTeXMathML is closer
    +    to LaTeX in its display of math, and supports many non-math LaTeX environments.
    +
    +    + Changed -m option to use LaTeXMathML rather than ASCIIMathML.
    +    + Modified HTML writer to print raw TeX when LaTeXMathML is
    +      being used instead of suppressing it.
    +    + Removed ASCIIMathML files from data/ and added LaTeXMathML.
    +    + Replaced ASCIIMathML with LaTeXMathML in source files.
    +    + Modified README and pandoc man page source.
    +    + Added --latexmathml option (kept --asciimathml as a synonym
    +      for backwards compatibility)
    +
    +  * Markdown reader: Parse setext headers before atx headers.
    +    Test case:
    +       # hi
    +       ====
    +    parsed by Markdown.pl as an H1 header with contents "# hi".
    +
    +  * Markdown reader: Treat "mixed" lists the same way as Markdown.pl does.
    +    The marker on the first list item determines the type of the whole
    +    list.  Thus, a list like
    +       1. one
    +       -  two
    +       *  three
    +    gets parsed as a single ordered list.  (Previous versions of pandoc
    +    treated this as an ordered list with an unordered sublist.)
    +
    +  * Markdown smart typography:
    +
    +    + Em dashes no longer eat surrounding whitespace.  Resolves Issue #69.
    +    + Use nonbreaking spaces after known abbreviations in markdown parser.
    +      Thus, for example, "Mr. Brown" comes out as "Mr.~Brown" in LaTeX, and does
    +      not produce a sentence-separating space.  Resolves Issue #75.
    +
    +  * Markdown writer: Print unicode \160 literally, rather than as  .
    +
    +  * Treat '\ ' in (extended) markdown as nonbreaking space.
    +    Print nonbreaking space appropriately in each writer (e.g. ~ in LaTeX).
    +
    +  * The '--sanitize-html' option now examines URIs in markdown links
    +    and images, and in HTML href and src attributes.  If the URI scheme
    +    is not on a whitelist of safe schemes, it is rejected.  The main point
    +    is to prevent cross-site scripting attacks using 'javascript:' URIs.
    +    See http://www.mail-archive.com/markdown-discuss@six.pairlist.net/msg01186.html
    +    and http://ha.ckers.org/xss.html.  Resolves Issue #62.
    +
    +  * HTML writer:
    +
    +    + Override Text.XHtml's stringToHtml function,
    +      so that characters below 0xff are not converted to numerical entity
    +      references. Also convert '\160' to " ". This should aid readability
    +      and editability of the HTML source. It does presuppose that the HTML
    +      will be served as UTF-8.
    +    + In code blocks, change leading newlines to 
    tags. + (Some browsers ignore them.) Resolves Issue #71. + See http://six.pairlist.net/pipermail/markdown-discuss/2008-May/001297.html + + Use style attributes rather than css classes for strikethrough + and ordered list styles. This works better when fragments, rather than + standalone documents, are generated. + + * HTML reader: Count anything that isn't a known block (HTML) tag as an + inline tag (rather than the other way around). Added "html", "head", and + "body" to list of block tags. Resolves Issue #66, allowing + to count as an inline tag. + + * RTF writer: Fixed bug. Extra spaces were being printed after emphasized, + boldface, and other inline elements. Resolves Issue #64. + + * LaTeX reader: improvements in raw LaTeX parsing. + + + "loose punctuation" (like {}) parsed as Space + + Para elements must contain more than Str "" and Space elements + + Added parser for "\ignore" command used in literate haskell. + + Reworked unknownCommand and rawLaTeXInline: when not in "parse raw" + mode, these parsers simply strip off the command part and allow + the arguments to be parsed normally. So, for example, + \blorg{\emph{hi}} will be parsed as Emph "hi" rather than + Str "{\\emph{hi}}". + + Parse lhs "code" environments as verbatim. + Refactored parsers for verbatim environments. + + Removed specialEnvironment parser. + + parse '{}', if present, after \textless, \textgreater, + \textbar, \textbackslash, \ldots. + + Parse unescaped special characters verbatim rather than + changing them to spaces. This way arguments of unknown + commands will appear in braces. + + * Parse raw ConTeXt environments as TeX in markdown reader. + Resolves Issue #73. + + * Moved BlockWrapper and wrappedBlocksToDoc from ConTeXt writer to Shared. + + * Made some structural changes to parsing of raw LaTeX environments. + Previously there was a special block parser for LaTeX environments. + It returned a Para element containing the raw TeX inline. This has + been removed, and the raw LaTeX environment parser is now used in the + rawLaTeXInline parser. The effect is exactly the same, except that we + can now handle consecutive LaTeX and ConTeXt environments not separated + by spaces. This new flexibility is required by the example in + Issue #73: + + \placeformula \startformula + L_{1} = L_{2} + \stopformula + + API change: The LaTeX reader now exports rawLaTeXEnvironment' (which + returns a string) rather than rawLaTeXEnvironment (which returns a block + element). This is more likely to be useful in other applications. + + * Use \textsubscr instead of \textsubscript for LaTeX subscript macro. + \textsubscript conflicts with a definition in the memoir class. + Resolves Issue #65. + + * Removed unneeded space after "\\item" in LaTeX and ConTeXt output. + + * Added amsmath package to default LaTeX header. Resolves Issue #48. + + * Added \setupitemize[autointro] to ConTeXt header, to prevent orphaned + list introduction lines. + + * Changed Float to Double in definition of Table element. + (Double is more efficient in GHC.) + + * Fixed bug in Markdown parser: regular $s triggering math mode. + For example: "shoes ($20) and socks ($5)." + The fix consists in two new restrictions: + + + the $ that ends a math span may not be directly followed by a digit. + + no blank lines may be included within a math span. + + Thanks to Joseph Reagle for noticing the bug. + + * Use Data.List's 'intercalate' instead of custom 'joinWithSep'. + Removed 'joinWithSep' from Text.Pandoc.Shared. + + * Updated README and man pages. Acknowledge contributors in README. + Added paragraph to README about producing S5 with separate CSS/javascript. + + * Updated INSTALL to reflect new build system (including configuration + options) and document new dependencies. Added note to INSTALL that + Cabal >= 1.2 is required for build. Resolves Issue #74. + + * Fixed some haddock documentation errors. + + * Small fix to markdown2pdf man page: only input needs to be piped through iconv. + +pandoc (0.46) unstable; urgency=low + + [ John MacFarlane ] + + * Made -H, -A, and -B options cumulative: if they are specified + multiple times, multiple files will be included. + + * Added optional HTML sanitization using a whitelist. + When this option is specified (--sanitize-html on the command line), + unsafe HTML tags will be replaced by HTML comments, and unsafe HTML + attributes will be removed. This option should be especially useful + for those who want to use pandoc libraries in web applications, where + users will provide the input. + + + Main.hs: Added --sanitize-html option. + + + Text.Pandoc.Shared: Added stateSanitizeHTML to ParserState. + + + Text.Pandoc.Readers.HTML: + - Added whitelists of sanitaryTags and sanitaryAttributes. + - Added parsers to check these lists (and state) to see if a given + tag or attribute should be counted unsafe. + - Modified anyHtmlTag and anyHtmlEndTag to replace unsafe tags + with comments. + - Modified htmlAttribute to remove unsafe attributes. + - Modified htmlScript and htmlStyle to remove these elements if + unsafe. + + + Modified README and man pages to document new option. + + * Improved handling of email addresses in markdown and reStructuredText. + Consolidated uri and email address parsers. (Resolves Issue #37.) + + + New emailAddress and uri parsers in Text.Pandoc.Shared. + - uri parser uses parseURI from Network.URI. + - emailAddress parser properly handles email addresses with periods + in them. + + + Removed uri and emailAddress parsers from Text.Pandoc.Readers.RST + and Text.Pandoc.Readers.Markdown. + + * Markdown reader: + + + Fixed emph parser so that "*hi **there***" is parsed as a Strong + nested in an Emph. (A '*' is only recognized as the end of the + emphasis if it's not the beginning of a strong emphasis.) + + + Moved blockQuote parser before list parsers for performance. + + + Modified 'source' parser to allow backslash-escapes in URLs. + So, for example, [my](/url\(1\)) yields a link to /url(1). + Resolves Issue #34. + + + Disallowed links within links. (Resolves Issue #35.) + - Replaced inlinesInBalanced with inlinesInBalancedBrackets, which + instead of hard-coding the inline parser takes an inline parser + as a parameter. + - Modified reference and inlineNote to use inlinesInBalancedBrackets. + - Removed unneeded inlineString function. + - Added inlineNonLink parser, which is now used in the definition of + reference. + - Added inlineParsers list and redefined inline and inlineNonLink parsers + in terms of it. + - Added failIfLink parser. + + + Better handling of parentheses in URLs and quotation marks in titles. + - 'source' parser first tries to parse URL with balanced parentheses; + if that doesn't work, it tries to parse everything beginning with + '(' and ending with ')'. + - source parser now uses an auxiliary function source'. + - linkTitle parser simplified and improved, under assumption that it + will be called in context of source'. + + + Make 'block' conditional on strictness state, instead of using + failIfStrict in block parsers. Use a different ordering of parsers + in strict mode (raw HTML block before paragraph) for performance. + In non-strict mode use rawHtmlBlocks instead of htmlBlock. + Simplified htmlBlock, since we know it's only called in strict + mode. + + + Improved handling of raw HTML. (Resolves Issue #36.) + - Tags that can be either block or inline (e.g. ) should + be treated as block when appropriate and as inline when + appropriate. Thus, for example, + hi + should be treated as a paragraph with inline tags, while + + hi + + should be treated as a paragraph within tags. + - Moved htmlBlock after para in list of block parsers. This ensures + that tags that can be either block or inline get parsed as inline + when appropriate. + - Modified rawHtmlInline' so that block elements aren't treated as + inline. + - Modified para parser so that paragraphs containing only HTML tags and + blank space are not allowed. Treat these as raw HTML blocks instead. + + + Fixed bug wherein HTML preceding a code block could cause it to + be parsed as a paragraph. The problem is that the HTML parser + used to eat all blank space after an HTML block, including the + indentation of the code block. (Resolves Issue #39.) + - In Text.Pandoc.Readers.HTML, removed parsing of following space + from rawHtmlBlock. + - In Text.Pandoc.Readers.Markdown, modified rawHtmlBlocks so that + indentation is eaten *only* on the first line after the HTML + block. This means that in +
    + foo +
    + the foo won't be treated as a code block, but in +
    + + foo + +
    + it will. This seems the right approach for least surprise. + + * RST reader: + + + Fixed bug in parsing explicit links (resolves Issue #44). + The problem was that we were looking for inlines until a '<' character + signaled the start of the URL; so, if you hit a reference-style link, + it would keep looking til the end of the document. Fix: change + inline => (notFollowedBy (char '`') >> inline). Note that this won't + allow code inlines in links, but these aren't allowed in resT anyway. + + + Cleaned up parsing of reference names in key blocks and links. + Allow nonquoted reference links to contain isolated '.', '-', '_', so + so that strings like 'a_b_' count as links. + + + Removed unnecessary check for following link in str. + This is unnecessary now that link is above str in the definition of + 'inline'. + + * HTML reader: + + + Modified rawHtmlBlock so it parses and tags. + This allows these tags to be handled correctly in Markdown. + HTML reader now uses rawHtmlBlock', which excludes and , + since these are handled in parseHtml. (Resolves Issue #38.) + + + Fixed bug (emph parser was looking for `` tag, not ``). + + + Don't interpret contents of style tags as markdown. + (Resolves Issue #40.) + - Added htmlStyle, analagous to htmlScript. + - Use htmlStyle in htmlBlockElement and rawHtmlInline. + - Moved "script" from the list of tags that can be either block or + inline to the list of block tags. + + + Modified rawHtmlBlock to use anyHtmlBlockTag instead of anyHtmlTag + and anyHtmlEndTag. This fixes a bug in markdown parsing, where + inline tags would be included in raw HTML blocks. + + + Modified anyHtmlBlockTag to test for (not inline) rather than + directly for block. This allows us to handle e.g. docbook in + the markdown reader. + + * LaTeX reader: Properly recognize --parse-raw in rawLaTeXInline. + Updated LaTeX reader test to use --parse-raw. + + * HTML writer: + + + Modified rules for automatic HTML header identifiers to + ensure that identifiers begin with an alphabetic character. + The new rules are described in README. (Resolves Issue #33.) + + + Changed handling of titles in HTML writer so you don't get + "titleprefix - " followed by nothing. + + * ConTeXt writer: Use wrappers around Doc elements to ensure proper + spacing. Each block element is wrapped with either Pad or Reg. + Pad'ed elements are guaranteed to have a blank line in between. + + * RST writer: + + + Refactored RST writer to use a record instead of a tuple for state, + and to include options in state so it doesn't need to be passed as + a parameter. + + + Use an interpreted text role to render math in restructuredText. + See http://www.american.edu/econ/itex2mml/mathhack.rst for the + strategy. + + [ Recai Oktaş ] + + * Debian packaging changes: + + + Remove the empty 'include' directory in -dev package, which lintian + complains about. + + Bump Standarts-Version to 3.7.3. + + Use new 'Homepage:' field to specify the upstream URL on suggestion of + lintian. + + -- Recai Oktaş Tue, 08 Jan 2008 05:13:31 +0200 + +pandoc (0.45) unstable; urgency=low + + [ John MacFarlane ] + + * Simplified parsing of reference keys and notes in markdown and RST + readers: The Reference data structure from Text.Pandoc.Shared is no + longer needed, since referenceKey and noteBlock parses return strings + (as many blank lines as were occupied by the key or note) and update + state themselves. getPosition and setPosition are now used to ensure + that error messages will give the correct line number. This yields + cleaner (and slightly faster) code, with more accurate parsing error + messages. + + * Added new Math inline element: + + + Markdown and LaTeX readers now convert TeX math into Math elements, + not TeX. + + This allows math to be treated differently from raw TeX in output. + TeX elements are no longer printed in output formats other than + Markdown, LaTeX, and ConTeXt. But Math elements are always printed. + + * New default handling of math in writers: + + + New module Text.Pandoc.Readers.TeXMath exports readTeXMath, which + parses raw TeX math and outputs a string of Pandoc inlines that + tries to render it as far as possible using unicode characters, + lapsing into literal TeX when needed. + + readTeXMath is now used for default HTML output in HTML, S5, RTF, + and Docbook, if no other method for displaying math in HTML is + specified. Enclosing $'s are no longer printed by default. + + By default, math is put inside ``. This way it can be + distinguished from the surrounding text, e.g. put in a different + font. + + * New --gladtex and --mimetex options for display of math in HTML: + + + If --gladtex is specified, math is output between `` tags, so + it can be processed by gladTeX. + + If --mimetex is specified, math is put in `` tags with a link + to the mimetex CGI script (or any other script that takes TeX math + as input and outputs an image). The URL of the script may be + specified, but defaults to /cgi-bin/mimetex.cgi. + + HTMLMathMethod structure in WriterOptions keeps track of how to + display math in HTML output. + + Updated README with a description of the four options for displaying + math in HTML. + + * HTML reader: + + + Fixed bug: parser for minimized attributes should not swallow + trailing spaces. + + Simplified HTML attribute parsing. + + Changed parsing of code blocks in HTML reader: `` tag is no + longer needed. `
    ` suffices. All HTML tags in the code block
    +      (e.g. for syntax highlighting) are skipped, because they are not
    +      portable to other output formats. A `...` block not
    +      surrounded by `
    ` now counts as inline HTML, not a code block.
    +    + Remove just one leading and one trailing newline from contents of
    +      `
    ...
    ` in codeBlock parser. + + * Markdown reader: + + + Removed support for box-style block quotes. + + Require space before title in links and references. + This fixes a bug in parsing URLs like http://silly/url(withparen). + + Improved and simplified setextHeader parser. + + Fixed logic in smart quote parsing, adding some needed 'try' + statements. + + Fixed smart quote parsing so that unicode characters 8216 and 8217 + are recognized as single quotes, and 8220 and 8221 as double quotes. + + * RST reader: + + + Fixed bug in parsing of code blocks. Previously a full tab indent + was required, but RST allows code to be indented any amount. + Resolves Issue #27. + + Allow field lists to be indented. + + Parse the contents of field lists instead of treating as a raw string. + + Represent field lists as definition lists instead of blockquotes. + + Fixed bug in which metadata would be overridden if the document + contained multiple field lists. + + Parse fields associated with '.. image::' blocks, and use 'alt' + field, if given, for image alt and title attributes. + + * LaTeX reader: + + + Modified specialChar so that '"' characters are parsed. + + Fixed a bug in parsing of \[ \] math blocks (thanks to Mark Kalderon). + + * HTML writer: + + + Changes in handling of math (see above). + + Don't produce HTML for table of contents if there are + no headers. (This would be an empty list, which is invalid XHTML.) + + * Markdown writer: + + + Don't print title attribute if title is empty. (This differs from + the behavior of Markdown.pl, and agrees with PHP Markdown. But John + Gruber has indicated that he prefers this behavior.) Adjusted test + suite accordingly. + + Fixed incorrect line wrapping in paragraphs including hard line + breaks. Resolves Issue #25. + + Fixed bug in markdown writer: If an ordered list item began with + a marker greater than 3 characters in width, and the item took more + than one line, it would appear on the line after the list marker, + e.g.: + + (12) + My list item. + Multiline. + + Now it works as follows: + + (12) My list item. + Multiline. + + * RST writer + + + Fixed bug in RST writer's handling of ordered lists. Previously, + list items with multiple lines would not always line up with + single-line list items. Now, list items are nested the length of + the list marker + 1. This looks better and ensures that list items + all line up. (Note that list markers are padded to the length of + the longest list marker in the series.) + + Use 3-space indent for unordered lists. + + If label for a link reference contains a colon, surround it by ` + signs so it won't be interpreted as the end of the link label. + + * LaTeX writer: + + + Cleaner output for footnotes. Footnotes now always begin on a new + line, and the final } is on a line by itself only when it needs to + be (i.e. only when the note ends with a Verbatim environment). + + Added writer options to state, so state doesn't need to be passed as + a parameter. + + Text wrapping now provided, using wrapTeXIfNeeded. + + * ConTeXt writer: many improvements for more idiomatic ConTeXt output + (thanks to Idris Samawi Hamid for suggestions). + + + PrettyPrint module now used for output. + + Writer options are now in state, so they don't have to be passed as + a parameter. + + Text wrapping now provided, using wrapTeXIfNeeded. + + Better treatment of footnotes: footnotes are always on lines by + themselves, and the final } is on a line by itself only when + it needs to be (after \stoptyping). + + Use \subject, \subsubject, ... or \section, \subsection, ... for headings, + depending on whether --number-sections option is selected. + + Extra blank line inserted after \stopitemize + + Use new, "official" definition of blockquote environment. Also, use + blank line after \startblockquote to balance blank line at the end. + + Both itemized and enumerated lists are now generated using + \start-stopitemize, with appropriate options. Removed definitions + of ltxenum and ltxitem, which are no longer needed. Provided + defaults for itemized lists in the preamble. State keeps track of + ordered list level, so that when default numbering is specified, + the appropriate scheme can be used. + + Changed \useurl to \useURL. + + Changed link color from red to blue. + + Use \subsubsubsubsection etc., since these are supported + (up to at least sub x 5). + + * Text.Pandoc.Shared: + + + Save and restore position in parseFromString, so that accurate + error messages can be given. + + Improved efficiency of romanNumeral parser. + + Added wrappedTeX and wrapTeXIfNeeded functions. These ensure + that footnotes occur on lines by themselves (to make them + easier to see and move) and do not screw up line wrapping. + + * Text.Pandoc.UTF8: modified fromUTF8 to strip out the BOM + if present. Windows Notepad and other applications insert a + BOM at the beginning of a UTF8 file. + + * Main.hs (tabFilter): Treat '\r' at end of line as newline (in + addition to "\r\n" and '\n'). + + * Added a writer option for wrapped text and a command-line option + '--no-wrap', which disables text wrapping and minimizes whitespace + in HTML. (Resolves Issue #26.) + + + Added support for '--no-wrap' to Main.hs. + + Added wrapIfNeeded function to Text.Pandoc.Shared. + + Use wrapIfNeeded instead of wrapped in the RST, Man, Docbook, and + Markdown writers. + + Added render and renderFragment helpers to HTML writer. + + * Modified html2markdown to run tidy only if the HTML cannot be + parsed. Previously html2markdown piped all input through tidy + before passing it to pandoc. This caused problems on certain pages + (e.g. http://daringfireball.com/markdown) which have well-formed + XHTML that causes tidy to choke. The solution is to pipe through + tidy only if pandoc cannot parse the input by itself. This means + that a temp file is now always used, even when input comes from a + local file or standard input. + + * Removed 'version' constant from Main.hs; added 'pandocVersion' to + Text.Pandoc library. + + * pandoc.cabal: + + + Modified to work with GHC 6.8 and Cabal configurations. (For GHC + 6.8, pretty and containers must be added to Build-Depends, and it + is desirable to use the -O2 compiler option.) Cabal configurations + allows one to select options depending on the compiler version. + For GHC 6.6, the splitBase option can be disabled. + + pandoc.cabal.ghc66 is provided for users with older versions of + Cabal, which do not support configurations. + + Use Ghc-Prof-Options to ensure that '-auto-all' is used when + '--enable-(executable|library)-profiling' is specified. Updated + PROFILING instructions accordingly. + + * Makefile: + + + Makefile now checks GHC version. If GHC is 6.6, pandoc.cabal.ghc66 + is copied to pandoc.cabal, and the old pandoc.cabal is copied + to pandoc.cabal.orig. Otherwise, pandoc.cabal is copied to + pandoc.cabal.orig but otherwise unmodified. This way, the Makefile + will work properly with either GHC 6.6 or 6.8. + + Changed BUILDCONF to point to dist/setup-config, not .setup-config. + This is where current versions of Cabal put it. + + Added $(BUILDCMD) target, so setup doesn't get compiled every time. + + Removed dependency of templates on ./templates, which is circular + now that templates is a subdirectory of the top-level. + + * MacPorts Portfile: + + + Modified to install the pandoc library in addition to programs. + + Installation must be done manually rather than using Makefile's + install-all. + + Note that the library must be registered in the activate phase, + after the library files have been copied out of the destroot. + Cabal generates a 'register.sh' script that will do this. + + * debian/control: Added libghc6-network-dev, libghc6-xhtml-dev, and + libghc6-mtl-dev as dependencies for libghc6-pandoc-dev. + Closes: #445235 + + * debian/rules: Converted to UTF-8. + + * Changed pandoc home page to http://johnmacfarlane.net/pandoc/. + + * Updated ASCIIMathML.js to latest version. + + * Directory structure: + + + Moved everything from src into the top-level directory. + + Changed references to source directory in Makefile and + pandoc.cabal.*. + + Moved ASCIIMathML.js, headers, and ui into templates directory. + + Modified fillTemplates.pl to reflect new paths. + + [ Recai Oktaş ] + + * Makefile: Fixed the issue of having two copies of the library + documentation under some usage scenarios. + + * Replaced 'ghc' with '$(GHC)' in Makefile, and made GHC + and GHC_PKG configurable through the environment, to support + unusual ghc installations. For example: + GHC=/opt/ghc/bin/ghc GHC_PKG=/opt/ghc/bin/ghc-pkg make + + -- Recai Oktaş Sun, 07 Oct 2007 20:51:43 +0300 + +pandoc (0.44) unstable; urgency=low + + [ John MacFarlane ] + + * Fixed bug in HTML writer: when --toc was used, anchors were put around + headers, which is invalid XHTML (block content within inline element). + Now the anchors are put inside the header tags. Resolves Issue #23. + + * Added xmlns attribute to html element in html writer tests. + This attribute is added by more recent versions of the + xhtml library (>= 3000), and is required for valid XHTML. + + [ Recai Oktaş ] + + * On configure, compile 'Setup.hs' to 'setup' and use 'setup' as the build + command instead of 'runhaskell', which, on some platforms (such as s390, + alpha, m68k), throws the following error: + + runhaskell Setup.hs configure --prefix=/usr + ghc-6.6.1: not built for interactive use + + This causes a serious FTBFS bug. Closes: #440668. + + -- Recai Oktaş Mon, 03 Sep 2007 18:24:02 +0300 + +pandoc (0.43) unstable; urgency=low + + [ John MacFarlane ] + + * The focus of this release is performance. The markdown parser + is about five times faster than in 0.42, based on benchmarks + with the TextMate manual. + + * Main.hs: Replaced CRFilter and tabFilter with single function + tabFilter, which operates on the whole string rather than breaking + it into lines, and handles dos-style line-endings as well as tabs. + + * Added separate LaTeX reader and native reader tests; removed + round-trip tests. + + * Text.Pandoc.Shared: + + + Removed tabsToSpaces and tabsInLine (they were used only in Main.hs.) + + General code cleanup (to elimante warnings when compiling with -Wall.) + + Added 'wrapped' function, which helps wrap text into paragraphs, + using the prettyprinting library. + + Rewrote charsInBalanced and charsInBalanced'. + - Documented restriction: open and close must be distinct characters. + - Rearranged options for greater efficiency. + - Bug fix: Changed inner call to charsInBalanced inside + charsInBalanced' to charsInBalanced'. + + anyLine now requires that the line end with a newline (not eof). + This is a harmless assumption, since we always add newlines to the + end of a block before parsing with anyLine, and it yields a 10% speed + boost. + + Removed unnecessary 'try' in anyLine. + + Removed unneeded 'try' from romanNumeral parser. + + Use notFollowedBy instead of notFollowedBy' in charsInBalanced. + + Removed unneeded 'try' in parseFromString. + + Removed unneeded 'try' from stringAnyCase. (Now it behaves + like 'string'.) + + Changed definition of 'enclosed' in Text.Pandoc.Shared so that + 'try' is not automatically applied to the 'end' parser. Added + 'try' in calls to 'enclosed' where needed. Slight speed increase. + + * Writers: + + + Replaced individual wrapping routines in RST, Man, and Markdown + writers with 'wrapped' from Text.Pandoc.Shared. + + Rewrote LaTeX writer to use the prettyprinting library, + so we get word wrapping, etc. + + Modified latex writer tests for new latex writer using prettyprinter. + + Fixed bug in LaTeX writer: autolinks would not cause + '\usepackage{url}' to be put in the document header. Also, changes + to state in enumerated list items would be overwritten. + + In Markdown writer, escape paragraphs that begin with ordered list + markers, so they don't get interpreted as ordered lists. + + * Text.Pandoc.Reades.LaTeX: + + + Fixed bug in LaTeX reader, which wrongly assumed that the roman + numeral after "enum" in "setcounter" would consist entirely of + "i"s. 'enumiv' is legitimate. + + LaTeX command and environment names can't contain numbers. + + Rearranged order of parsers in inline for slight speed improvement. + + Added '`' to special characters and 'unescapedChar'. + + * Text.Pandoc.Readers.RST: + + + Removed unneeded try's in RST reader; also minor code cleanup. + + Removed tabchar. + + Rearranged parsers in inline (doubled speed). + + * Text.Pandoc.Readers.Markdown: + + + Skip notes parsing if running in strict mode. (This yields a nice + speed improvement in strict mode.) + + Simplify autolink parsing code, using Network.URI to test for + URIs. Added dependency on network library to debian/control and + pandoc.cabal. + + More perspicuous definition of nonindentSpaces. + + Removed unneeded 'try' in 'rawLine'. + + Combined linebreak and whitespace into a new whitespace parser, to + avoid unnecessary reparsing of space characters. + + Removed unnecessary 'try' in 'codeBlock', 'ellipses', 'noteMarker', + 'multilineRow', 'dashedLine', 'rawHtmlBlocks'. + + Use lookAhead in parsers for setext headers and definition lists + to see if the next line begins appropriately; if not, don't waste + any more time parsing. + + Don't require blank lines after code block. (It's sufficient to + end code block with a nonindented line.) + + Changed definition of 'emph': italics with '_' must not + be followed by an alphanumeric character. This is to help + prevent interpretation of e.g. `[LC_TYPE]: my_type` as + `[LCTYPE]:mytype`. + + Improved Markdown.pl-compatibility in referenceLink: the two parts + of a reference-style link may be separated by one space, but not + more... [a] [link], [not] [a link]. + + Fixed markdown inline code parsing so it better accords with + Markdown.pl: the marker for the end of the code section is a clump + of the same number of `'s with which the section began, followed + by a non-` character. So, for example, + ` h ``` i ` -> `h ``` i`. + + Split 'title' into 'linkTitle' and 'referenceTitle', since the + rules are slightly different. + + Rewrote 'para' for greater efficiency. + + Rewrote link parsers for greater efficiency. + + Removed redundant 'referenceLink' in definition of inline (it's + already in 'link'). + + Refactored escapeChar so it doesn't need 'try'. + + Refactored hrule for performance in Markdown reader. + + More intelligent rearranging of 'inline' so that most frequently + used parsers are tried first. + + Removed tabchar parser, as whitespace handles tabs anyway. + + * Text.Pandoc.CharacterReferences: + + + Refactored. + + Removed unnecessary 'try's for a speed improvement. + + Removed unnecessary '&' and ';' from the entity table. + + * Build process: + + + Makefile: Get VERSION from cabal file, not Main.hs. + + Modified MacPorts Portfile: + - Depend on haddock + - Build and install libraries and library documentation in + addition to pandoc executable + - Added template item for md5 sum in Portfile.in. + - Incorporated changes from MacPorts repository (r28278). + + FreeBSD port: Don't try to generate distinfo in Makefile. + It can be made using 'make makesum' in FreeBSD. + + Make both freebsd and macports targets depend on tarball. + + * Website and documentation: + + + Updated INSTALL instructions. + + Added pandocwiki demo to website. + + Removed local references to Portfile, since pandoc is now in the + MacPorts repository. + + -- Recai Oktaş Sun, 02 Sep 2007 15:50:11 +0300 + +pandoc (0.42) unstable; urgency=low + + [ John MacFarlane ] + + * Main.hs: Use utf8 conversion on the extra files loaded with + the -H, -C, -B, and -A options. This fixes problems with unicode + characters in these files. + + * Exposed Text.Pandoc.ASCIIMathML, since it is imported in + Text.Pandoc.Readers.HTML and without it we get a linking error when + using the library. + + * Markdown reader: + + + Added new rule for enhanced markdown ordered lists: if the list + marker is a capital letter followed by a period (including a + single-letter capital roman numeral), then it must be followed by + at least two spaces. The point of this is to avoid accidentally + treating people's initials as list markers: a paragraph might begin, + "B. Russell was an English philosopher," and this shouldn't be + treated as a list. Documented change in README. + + Blocks that start with "p. " and a digit are no longer treated + as ordered lists (it's a page number). + + Added a needed 'try' to listItem. + + Removed check for a following setext header in endline. + A full test is too inefficient (doubles benchmark time), and the + substitute we had before is not 100% accurate. + + Don't use Code elements for autolinks if --strict specified. + + * LaTeX writer: When a footnote ends with a Verbatim environment, the + close } of the footnote cannot occur on the same line or an error occurs. + Fixed this by adding a newline before the closing } of every footnote. + + * HTML writer: + + Removed incorrect "{}" around style information in HTML tables. + Column widths now work properly in HTML. + + If --strict option is specified (and --toc is not), don't include + identifiers in headers, for better Markdown compatibility. + + * Build process: + + + Separated $(web_dest) and website targets. + + In website, index.txt is now constructed from template index.txt.in. + + Added freebsd target to Markefile. This creates the freebsd Makefile + from Makefile.in, and creates distinfo. Removed Makefile and distinfo + from the repository. + + Added macport target to Makefile. Portfile is built from template + Portfile.in. + + Removed OSX package targets. (Too many difficulties involving + dependencies on dynamic libraries.) + + More complete INSTALL instructions for all architectures. + + * Website: + + Added a programming demo, pandocwiki. + + [ Recai Oktaş ] + + * Do not forget to close pandoc's ITP. Closes: #391666 + + -- Recai Oktaş Sun, 26 Aug 2007 22:51:32 +0300 + +pandoc (0.41) unstable; urgency=low + + [ John MacFarlane ] + + * Fixed bugs in HTML reader: + + Skip material at end *only if* `` is present (previously, + only part of the document would be parsed if an error was + found; now a proper error message is given). + + Added new constant eitherBlockOrInline with elements that may + count either as block-level or as inline. Modified isInline and + isBlock to take this into account. + + Modified rawHtmlBlock to accept any tag (even an inline tag): + this is innocuous, because rawHtmlBlock is tried only if a regular + inline element can't be parsed. + + Added a necessary 'try' in definition of 'para'. + + * Fixed bug in markdown ordered list parsing. The problem was that + anyOrderedListStart did not check for a space following the + ordered list marker. So in 'A.B. 2007' the parser would be + expecting a list item, but would not find one, causing an error. + Fixed a similar bug in the RST reader. Resolves Issue #22. + + * Refactored RST and Markdown readers using parseFromString. + + * LaTeX reader will now skip anything after \end{document}. + + * Fixed blockquote output in markdown writer: previously, block + quotes in indented contexts would be indented only in the first + line. + + * Added note to INSTALL about variations in versions of the xhtml + library that can lead to failed tests (thanks to Leif LeBaron). + + -- Recai Oktaş Sun, 19 Aug 2007 23:26:07 +0300 + +pandoc (0.4) unstable; urgency=low + + [ John MacFarlane ] + + * Added two new output formats: groff man pages and ConTeXt. By + default, output files with extensions ".ctx" and ".context" are + assumed to be ConTeXt, and output files with single-digit extensions + are assumed to be man pages. + + * Enhanced ordered lists (documented in README, under Lists): + + The OrderedList block element now stores information about + list number style, list number delimiter, and starting number. + + The readers parse this information when possible. + + The writers use this information to style ordered lists. + + The enhancement can be disabled using the --strict option. + + * Added support for tables (with a new Table block element). Two kinds + of tables are supported: a simple table with one-line rows, and a + more complex variety with multiline rows. All output formats are + supported, but only markdown tables are parsed at the moment. The + syntax is documented in README. + + * Added support for definition lists (with a new DefinitionList block + element). All output and input formats are supported. The syntax is + documented in README. + + * Added support for superscripts and subscripts (with new Superscript + and Subscript inline elements). All input and output + formats. The syntax is documented in README. + + * Added support for strikeout (with a new Strikeout inline element). + All input and output formats are supported. Thanks to Bradley Kuhn, + who contributed a patch. The syntax is documented in README. Resolves + Issue #18. + + * Added a --toc|--table-of-contents option. This causes an automatically + generated table of contents (or an instruction that creates one) to + be inserted at the beginning of the document. Not supported in S5, + DocBook, or man page writers. + + * Modified the -m|--asciimathml option: + + + If an optional URL argument is provided, a link is inserted + instead of the contents of the ASCIIMathML.js script. + + Nothing is inserted unless the document actually contains + LaTeX math. + + * Removed Blank block element as unnecessary. + + * Removed Key and Note blocks from the Pandoc data structure. All + links are now stored as explicit links, and note contents are + stored with the (inline) notes. + + + All link Targets are now explicit (URL, title) pairs; there + is no longer a 'Ref' target. + + Markdown and RST parsers now need to extract data from key and + note blocks and insert them into the relevant inline elements. + Other parsers have been simplified, since there is no longer any need + to construct separate key and note blocks. + + Markdown, RST, and HTML writers need to construct lists of + notes; Markdown and RST writers need to construct lists of link + references (when the --reference-links option is specified); and + the RST writer needs to construct a list of image substitution + references. All writers have been rewritten to use the State monad + when state is required. + + Several functions (generateReference, keyTable, + replaceReferenceLinks, replaceRefLinksBlockList, and some auxiliaries + used by them) have been removed from Text.Pandoc.Shared, since + they are no longer needed. New functions and data structures + (Reference, isNoteBlock, isKeyBlock, isLineClump) have been + added. The functions inTags, selfClosingTag, inTagsSimple, and + inTagsIndented have been moved to the DocBook writer, since that + is now the only module that uses them. NoteTable is now exported + in Text.Pandoc.Shared. + + Added stateKeys and stateNotes to ParserState; removed stateKeyBlocks, + stateKeysUsed, stateNoteBlocks, stateNoteIdentifiers, stateInlineLinks. + + Added writerNotes and writerReferenceLinks to WriterOptions. + + * Added Text.Pandoc module that exports basic readers, writers, + definitions, and utility functions. This should export everything + needed for most uses of Pandoc libraries. The haddock documentation + includes a short example program. + + * Text.Pandoc.ASCIIMathML is no longer an exported module. + + * Added Text.Pandoc.Blocks module to help in printing markdown + and RST tables. This module provides functions for working with + fixed-width blocks of text--e.g., placing them side by side, as + in a table row. + + * Refactored to avoid reliance on Haskell's Text.Regex library, which + (a) is slow, and (b) does not properly handle unicode. This fixed + some strange bugs, e.g. in parsing S-cedilla, and improved performance. + + + Replaced 'gsub' with a general list function 'substitute' + that does not rely on Text.Regex. + + Rewrote extractTagType in HTML reader so that it doesn't use + regexs. + + In Markdown reader, replaced email regex test with a custom email + autolink parser (autoLinkEmail). Also replaced selfClosingTag regex + with a custom function isSelfClosingTag. + + Modified Docbook writer so that it doesn't rely on Text.Regex for + detecting 'mailto' links. + + Removed escapePreservingRegex and reamped entity-handling + functions in Text.Pandoc.Shared and Text.Pandoc.CharacterReferences to + avoid reliance on Text.Regex (see below on character reference + handling changes). + + * Renamed Text.Pandoc.Entities as Text.Pandoc.CharacterReferences. + + * Changed handling of XML entities. Entities are now parsed (and unicode + characters returned) in the Markdown and HTML readers, rather than being + handled in the writers. In HTML and Docbook writers, UTF-8 is now used + instead of entities for characters above 128. This makes the HTML and + DocBook output much more readable and more easily editable. + + + Removed sgmlHexEntity, sgmlDecimalEntity, sgmlNamedEntity, and + sgmlCharacterEntity regexes from Text.Pandoc.Shared. + + Renamed escapeSGMLChar to escapeCharForXML. Added escapeStringForXML. + Moved both functions to Text.Pandoc.Writers.Docbook. + + Added characterReference parser to Text.Pandoc.CharacterReferences. + This parses a string and return a unicode character. + + Rewrote decodeCharacterReferences to use the new parser instead of + Text.Regex. + + Added new charRef parser for Markdown and HTML, which replaces the + old 'entity' parser. Added '&' as a special character in Markdown reader. + + Modified HTML and Markdown readers to call decodeEntities on all raw + strings (e.g. authors, dates, link titles), to ensure that no + unprocessed entities are included in the native representation of + the document. (In the HTML reader, most of this work is done by a + change in extractAttributeName.) + + In XML and Markdown output, escape unicode nonbreaking space as ' ', + since a unicode non-breaking space is impossible to distinguish visually + from a regular space. (Resolves Issue #3.) + + Removed encodeEntitiesNumerical. + + Use Data.Map for entityTable and (new) reverseEntityTable, for a + slight performance boost over the old association list. + + Removed unneeded decodeEntities from 'str' parser in HTML and + Markdown readers. + + * Text.Pandoc.UTF8: Renamed encodeUTF8 to toUTF8, decodeUTF8 to + fromUTF8, for clarity. + + * Replaced old haskell98 module names replaced by hierarchical module + names, e.g. List by Data.List. Removed haskell98 from dependencies + in pandoc.cabal, and added mtl (needed for state monad). Substituted + xhtml for html. + + * Refactored and cleaned up character escaping in writers, using + backslashEscapes and escapeStringUsing functions. + + * Instead of adding "\n\n" to the end of an input string in Main.hs, + this is now done in the readers. This makes the libraries behave + the way you'd expect from the pandoc program. Resolves Issue #10. + + * URLs and email addresses in autolinks are now typeset as Code. + + * In Main.hs, changed putStr to putStrLn -- mainly because MacOS X + doesn't display the whole output unless there's a line ending. + + * Major code cleanup in all modules, for greater consistency, concision, + and readability. + + * HTML reader: + + + Fixed several bugs (extractTagType, attribute parsing). + + Remove Null blocks in lists of blocks when possible. + + Allow HTML comments as raw HTML inline. + + * Markdown reader: + + + Ordered list items may no longer begin with uppercase letters, or + letters greater than 'n'. (This prevents first initials and page + reference, e.g. 'p. 400', from being parsed as beginning lists.) + Also, numbers beginning list items may no longer end with ')', + which is now allowed only after letters. Note: These changes + may cause documents to be parsed differently. Users should take + care in upgrading. + + Changed autoLink parsing to conform better to Markdown.pl's + behavior. `` is not treated as a link, but + ``, ``, and + `` are. + + Cleaned up handling of embedded quotes in link titles. Now these are + stored as a '"' character, not as '"'. + + Use lookAhead parser for the 'first pass' (looking for reference keys), + instead of parsing normally, then using setInput to reset input. This + yields a slight performance boost. + + Fixed several bugs in smart quote recognition. + + Fixed bug in indentSpaces (which didn't properly handle + cases with mixed spaces and tabs). + + Consolidated 'text', 'special', and 'inline' into 'inline'. + + Fixed bug which allowed URL and title to be separated by multiple blank + lines in links and reference keys. They can be on separate lines but + can't have blank lines between them. + + Correctly handle bracketed text inside inline footnotes and links,using + new function inlinesInBalanced. Resolves Issue #14. + + Fixed bug in footnotes: links in footnotes were not being + processed. Solution: three-stage parse. First, get all the + reference keys and add information to state. Next, get all the + notes and add information to state. (Reference keys may be needed + at this stage.) Finally, parse everything else. + + Replaced named constants like 'emphStart' with literals. + + Removed an extra occurance of escapedChar in definition of inline. + + * RST reader: + + + Allow the URI in a RST hyperlink target to start on the line + after the reference key. + + Added 'try' in front of 'string', where needed, or used a different + parser. This fixes a bug where ````` would not be correctly parsed as + a verbatim `. + + Fixed slow performance in parsing inline literals in RST reader. The + problem was that ``#`` was seen by 'inline' as a potential link or image. + Fix: inserted 'notFollowedBy (char '`')' in link parsers. + Resolves Issue #8. + + Use lookAhead instead of getInput/setInput in RST reader. Removed + unneeded getState call, since lookAhead automatically saves and + restores the parser state. + + Allow hyperlink target URIs to be split over multiple lines, and + to start on the line after the reference. Resolves Issue #7. + + Fixed handling of autolinks. + + * LaTeX reader: + + + Replaced 'choice [(try (string ...), ...]' idiom with 'oneOfStrings', + for clarity. + + Added clauses for tilde and caret. Tilde is \ensuremath{\sim}, and + caret is \^{}, not \^ as before. + + Added parsing for \url. + + Parse \texttt{} as code, provided there's nothing fancy inside. + + * HTML writer: + + + Modified HTML writer to use the Text.XHtml library. This results + in cleaner, faster code, and it makes it easier to use Pandoc in + other projects, like wikis, which use Text.XHtml. Two functions are + now provided, writeHtml and writeHtmlString: the former outputs an + Html structure, the latter a rendered string. The S5 writer is also + changed, in parallel ways (writeS5, writeS5String). + + The Html header is now written programmatically, so it has been + removed from the 'headers' directory. The S5 header is still + needed, but the doctype and some of the meta declarations have + been removed, since they are written programatically. This change + introduces a new dependency on the xhtml package. + + Fixed two bugs in email obfuscation involving improper escaping + of '&' in the `
  2. ') + -- return the footnote reference, linked to the note. + return '' .. num .. '' +end + +function Span(s, attr) + return "" .. s .. "" +end + +function RawInline(format, str) + if format == "html" then + return str + else + return '' + end +end + +function Cite(s, cs) + local ids = {} + for _,cit in ipairs(cs) do + table.insert(ids, cit.citationId) + end + return "" .. s .. "" +end + +function Plain(s) + return s +end + +function Para(s) + return "

    " .. s .. "

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

    ' .. caption .. '

    \n
    ' +end + +-- Caption is a string, aligns is an array of strings, +-- widths is an array of floats, headers is an array of +-- strings, rows is an array of arrays of strings. +function Table(caption, aligns, widths, headers, rows) + local buffer = {} + local function add(s) + table.insert(buffer, s) + end + add("") + if caption ~= "" then + add("") + end + if widths and widths[1] ~= 0 then + for _, w in pairs(widths) do + add('') + end + end + local header_row = {} + local empty_header = true + for i, h in pairs(headers) do + local align = html_align(aligns[i]) + table.insert(header_row,'') + empty_header = empty_header and h == "" + end + if empty_header then + head = "" + else + add('') + for _,h in pairs(header_row) do + add(h) + end + add('') + end + local class = "even" + for _, row in pairs(rows) do + class = (class == "even" and "odd") or "even" + add('') + for i,c in pairs(row) do + add('') + end + add('') + end + add('\n" .. s .. "" +end + +-- The following code will produce runtime warnings when you haven't defined +-- all of the functions you need for the custom writer, so it's useful +-- to include when you're working on a writer. +local meta = {} +meta.__index = + function(_, key) + io.stderr:write(string.format("WARNING: Undefined function '%s'\n",key)) + return function() return "" end + end +setmetatable(_G, meta) + diff --git a/data/templates/default.asciidoc b/data/templates/default.asciidoc new file mode 100644 index 0000000..2721546 --- /dev/null +++ b/data/templates/default.asciidoc @@ -0,0 +1,35 @@ +$if(titleblock)$ +$title$ +$if(author)$ +$for(author)$$author$$sep$; $endfor$ +$endif$ +$if(date)$ +$date$ +$endif$ +$if(keywords)$ +:keywords: $for(keywords)$$keywords$$sep$, $endfor$ +$endif$ +$if(toc)$ +:toc: +$endif$ + +$endif$ +$if(abstract)$ +[abstract] +== Abstract +$abstract$ + +$endif$ +$for(header-includes)$ +$header-includes$ + +$endfor$ +$for(include-before)$ +$include-before$ + +$endfor$ +$body$ +$for(include-after)$ + +$include-after$ +$endfor$ diff --git a/data/templates/default.commonmark b/data/templates/default.commonmark new file mode 100644 index 0000000..9f6ca96 --- /dev/null +++ b/data/templates/default.commonmark @@ -0,0 +1,21 @@ +$if(titleblock)$ +$titleblock$ + +$endif$ +$for(header-includes)$ +$header-includes$ + +$endfor$ +$for(include-before)$ +$include-before$ + +$endfor$ +$if(toc)$ +$table-of-contents$ + +$endif$ +$body$ +$for(include-after)$ + +$include-after$ +$endfor$ diff --git a/data/templates/default.context b/data/templates/default.context new file mode 100644 index 0000000..e17d85b --- /dev/null +++ b/data/templates/default.context @@ -0,0 +1,143 @@ +$if(context-lang)$ +\mainlanguage[$context-lang$] +$endif$ +$if(context-dir)$ +\setupalign[$context-dir$] +\setupdirections[bidi=on,method=two] +$endif$ +% Enable hyperlinks +\setupinteraction + [state=start, +$if(title)$ + title={$title$}, +$endif$ +$if(subtitle)$ + subtitle={$subtitle$}, +$endif$ +$if(author)$ + author={$for(author)$$author$$sep$; $endfor$}, +$endif$ +$if(keywords)$ + keyword={$for(keywords)$$keywords$$sep$; $endfor$}, +$endif$ + style=$linkstyle$, + color=$linkcolor$, + contrastcolor=$linkcontrastcolor$] + +% make chapter, section bookmarks visible when opening document +\placebookmarks[chapter, section, subsection, subsubsection, subsubsubsection, subsubsubsubsection][chapter, section] +\setupinteractionscreen[option=bookmark] +\setuptagging[state=start] + +$if(papersize)$ +\setuppapersize[$for(papersize)$$papersize$$sep$,$endfor$] +$endif$ +$if(layout)$ +\setuplayout[$for(layout)$$layout$$sep$,$endfor$] +$endif$ +$if(pagenumbering)$ +\setuppagenumbering[$for(pagenumbering)$$pagenumbering$$sep$,$endfor$] +$endif$ + +% use microtypography +\definefontfeature[default][default][script=latn, protrusion=quality, expansion=quality, itlc=yes, textitalics=yes, onum=yes, pnum=yes] +\definefontfeature[smallcaps][script=latn, protrusion=quality, expansion=quality, smcp=yes, onum=yes, pnum=yes] +\setupalign[hz,hanging] +\setupitaliccorrection[global, always] + +\setupbodyfontenvironment[default][em=italic] % use italic as em, not slanted + +\definefallbackfamily[mainface][rm][DejaVu Serif][preset=range:greek, force=yes] +\definefontfamily[mainface][rm][$if(mainfont)$$mainfont$$else$Latin Modern Roman$endif$] +\definefontfamily[mainface][mm][$if(mathfont)$$mathfont$$else$Latin Modern Math$endif$] +\definefontfamily[mainface][ss][$if(sansfont)$$sansfont$$else$Latin Modern Sans$endif$] +\definefontfamily[mainface][tt][$if(monofont)$$monofont$$else$Latin Modern Typewriter$endif$][features=none] +\setupbodyfont[mainface$if(fontsize)$,$fontsize$$endif$] + +\setupwhitespace[$if(whitespace)$$whitespace$$else$medium$endif$] +$if(indenting)$ +\setupindenting[$for(indenting)$$indenting$$sep$,$endfor$] +$endif$ +$if(interlinespace)$ +\setupinterlinespace[$for(interlinespace)$$interlinespace$$sep$,$endfor$] +$endif$ + +\setuphead[chapter] [style=\tfd,header=empty] +\setuphead[section] [style=\tfc] +\setuphead[subsection] [style=\tfb] +\setuphead[subsubsection] [style=\bf] +\setuphead[subsubsubsection] [style=\sc] +\setuphead[subsubsubsubsection][style=\it] + +$if(headertext)$ +\setupheadertexts$for(headertext)$[$headertext$]$endfor$ +$endif$ +$if(footertext)$ +\setupfootertexts$for(footertext)$[$footertext$]$endfor$ +$endif$ +$if(number-sections)$ +$else$ +\setuphead[chapter, section, subsection, subsubsection, subsubsubsection, subsubsubsubsection][number=no] +$endif$ + +\definedescription + [description] + [headstyle=bold, style=normal, location=hanging, width=broad, margin=1cm, alternative=hanging] + +\setupitemize[autointro] % prevent orphan list intro +\setupitemize[indentnext=no] + +\setupfloat[figure][default={here,nonumber}] +\setupfloat[table][default={here,nonumber}] + +\setupthinrules[width=15em] % width of horizontal rules + +$for(header-includes)$ +$header-includes$ +$endfor$ + +\starttext +$if(title)$ +\startalignment[middle] + {\tfd $title$} +$if(subtitle)$ + \smallskip + {\tfa $subtitle$} +$endif$ +$if(author)$ + \smallskip + {\tfa $for(author)$$author$$sep$\crlf $endfor$} +$endif$ +$if(date)$ + \smallskip + {\tfa $date$} +$endif$ + \bigskip +\stopalignment +$endif$ +$if(abstract)$ +\midaligned{\it Abstract} +\startnarrower[2*middle] +$abstract$ +\stopnarrower +\blank[big] +$endif$ +$for(include-before)$ +$include-before$ +$endfor$ +$if(toc)$ +\completecontent +$endif$ +$if(lot)$ +\completelistoftables +$endif$ +$if(lof)$ +\completelistoffigures +$endif$ + +$body$ + +$for(include-after)$ +$include-after$ +$endfor$ +\stoptext diff --git a/data/templates/default.docbook4 b/data/templates/default.docbook4 new file mode 100644 index 0000000..5313c40 --- /dev/null +++ b/data/templates/default.docbook4 @@ -0,0 +1,32 @@ + +$if(mathml)$ + +$else$ + +$endif$ +
    + + $title$ +$if(author)$ + +$for(author)$ + + $author$ + +$endfor$ + +$endif$ +$if(date)$ + $date$ +$endif$ + +$for(include-before)$ +$include-before$ +$endfor$ +$body$ +$for(include-after)$ +$include-after$ +$endfor$ +
    diff --git a/data/templates/default.docbook5 b/data/templates/default.docbook5 new file mode 100644 index 0000000..b2c4079 --- /dev/null +++ b/data/templates/default.docbook5 @@ -0,0 +1,37 @@ + + +
    + + $title$ +$if(subtitle)$ + $subtitle$ +$endif$ +$if(author)$ + +$for(author)$ + + $author$ + +$endfor$ + +$endif$ +$if(date)$ + $date$ +$endif$ + +$for(include-before)$ +$include-before$ +$endfor$ +$body$ +$for(include-after)$ +$include-after$ +$endfor$ +
    diff --git a/data/templates/default.dokuwiki b/data/templates/default.dokuwiki new file mode 100644 index 0000000..5d210fa --- /dev/null +++ b/data/templates/default.dokuwiki @@ -0,0 +1,13 @@ +$for(include-before)$ +$include-before$ + +$endfor$ +$if(toc)$ +__TOC__ + +$endif$ +$body$ +$for(include-after)$ + +$include-after$ +$endfor$ diff --git a/data/templates/default.dzslides b/data/templates/default.dzslides new file mode 100644 index 0000000..892a434 --- /dev/null +++ b/data/templates/default.dzslides @@ -0,0 +1,203 @@ + + + + +$for(author-meta)$ + +$endfor$ +$if(date-meta)$ + +$endif$ +$if(keywords)$ + +$endif$ + $if(title-prefix)$$title-prefix$ – $endif$$pagetitle$ + +$if(highlighting-css)$ + +$endif$ +$if(css)$ +$for(css)$ + +$endfor$ +$else$ + + + +$endif$ +$if(math)$ + $math$ +$endif$ +$for(header-includes)$ + $header-includes$ +$endfor$ + + +$if(title)$ +
    +

    $title$

    +$if(subtitle)$ +

    $subtitle$

    +$endif$ +
    + $if(author)$$for(author)$$author$$sep$, $endfor$$endif$ · $if(date)$$date$$endif$ +
    +
    +$endif$ +$if(toc)$ +
    +$table-of-contents$ +
    +$endif$ +$for(include-before)$ +$include-before$ +$endfor$ +$body$ +$for(include-after)$ +$include-after$ +$endfor$ +$dzslides-core$ + + diff --git a/data/templates/default.epub2 b/data/templates/default.epub2 new file mode 100644 index 0000000..cca9fcf --- /dev/null +++ b/data/templates/default.epub2 @@ -0,0 +1,68 @@ + + + + + + + + $pagetitle$ + +$if(highlighting-css)$ + +$endif$ +$for(css)$ + +$endfor$ +$for(header-includes)$ + $header-includes$ +$endfor$ + + +$if(titlepage)$ +$for(title)$ +$if(title.text)$ +

    $title.text$

    +$else$ +

    $title$

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

    $subtitle$

    +$endif$ +$for(author)$ +

    $author$

    +$endfor$ +$for(creator)$ +

    $creator.text$

    +$endfor$ +$if(publisher)$ +

    $publisher$

    +$endif$ +$if(date)$ +

    $date$

    +$endif$ +$if(rights)$ +
    $rights$
    +$endif$ +$else$ +$for(include-before)$ +$include-before$ +$endfor$ +$body$ +$for(include-after)$ +$include-after$ +$endfor$ +$endif$ + + + diff --git a/data/templates/default.epub3 b/data/templates/default.epub3 new file mode 100644 index 0000000..b227149 --- /dev/null +++ b/data/templates/default.epub3 @@ -0,0 +1,69 @@ + + + + + + + $pagetitle$ + +$if(highlighting-css)$ + +$endif$ +$for(css)$ + +$endfor$ +$for(header-includes)$ + $header-includes$ +$endfor$ + + +$if(titlepage)$ +
    +$for(title)$ +$if(title.type)$ +

    $title.text$

    +$else$ +

    $title$

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

    $subtitle$

    +$endif$ +$for(author)$ +

    $author$

    +$endfor$ +$for(creator)$ +

    $creator.text$

    +$endfor$ +$if(publisher)$ +

    $publisher$

    +$endif$ +$if(date)$ +

    $date$

    +$endif$ +$if(rights)$ +
    $rights$
    +$endif$ +
    +$else$ +$for(include-before)$ +$include-before$ +$endfor$ +$body$ +$for(include-after)$ +$include-after$ +$endfor$ +$endif$ + + + diff --git a/data/templates/default.haddock b/data/templates/default.haddock new file mode 100644 index 0000000..36d66c2 --- /dev/null +++ b/data/templates/default.haddock @@ -0,0 +1 @@ +$body$ diff --git a/data/templates/default.html4 b/data/templates/default.html4 new file mode 100644 index 0000000..714b3ff --- /dev/null +++ b/data/templates/default.html4 @@ -0,0 +1,69 @@ + + + + + + +$for(author-meta)$ + +$endfor$ +$if(date-meta)$ + +$endif$ +$if(keywords)$ + +$endif$ + $if(title-prefix)$$title-prefix$ – $endif$$pagetitle$ + +$if(highlighting-css)$ + +$endif$ +$for(css)$ + +$endfor$ +$if(math)$ + $math$ +$endif$ +$for(header-includes)$ + $header-includes$ +$endfor$ + + +$for(include-before)$ +$include-before$ +$endfor$ +$if(title)$ +
    +

    $title$

    +$if(subtitle)$ +

    $subtitle$

    +$endif$ +$for(author)$ +

    $author$

    +$endfor$ +$if(date)$ +

    $date$

    +$endif$ +
    +$endif$ +$if(toc)$ +
    +$table-of-contents$ +
    +$endif$ +$body$ +$for(include-after)$ +$include-after$ +$endfor$ + + diff --git a/data/templates/default.html5 b/data/templates/default.html5 new file mode 100644 index 0000000..5c484f3 --- /dev/null +++ b/data/templates/default.html5 @@ -0,0 +1,72 @@ + + + + + + +$for(author-meta)$ + +$endfor$ +$if(date-meta)$ + +$endif$ +$if(keywords)$ + +$endif$ + $if(title-prefix)$$title-prefix$ – $endif$$pagetitle$ + +$if(highlighting-css)$ + +$endif$ +$for(css)$ + +$endfor$ +$if(math)$ + $math$ +$endif$ + +$for(header-includes)$ + $header-includes$ +$endfor$ + + +$for(include-before)$ +$include-before$ +$endfor$ +$if(title)$ +
    +

    $title$

    +$if(subtitle)$ +

    $subtitle$

    +$endif$ +$for(author)$ +

    $author$

    +$endfor$ +$if(date)$ +

    $date$

    +$endif$ +
    +$endif$ +$if(toc)$ + +$endif$ +$body$ +$for(include-after)$ +$include-after$ +$endfor$ + + diff --git a/data/templates/default.icml b/data/templates/default.icml new file mode 100644 index 0000000..b93fa87 --- /dev/null +++ b/data/templates/default.icml @@ -0,0 +1,43 @@ + + + + + + + $charStyles$ + + + + + + + LeftAlign + . + + 10 + + + + + $parStyles$ + + + + + + + + + + + +$body$ + + + $hyperlinks$ + diff --git a/data/templates/default.jats b/data/templates/default.jats new file mode 100644 index 0000000..228a063 --- /dev/null +++ b/data/templates/default.jats @@ -0,0 +1,203 @@ + +$if(xml-stylesheet)$ + +$endif$ + +$if(article.type)$ +
    +$else$ +
    +$endif$ + + +$if(journal.publisher-id)$ +$journal.publisher-id$ +$endif$ +$if(journal.nlm-ta)$ +$journal.nlm-ta$ +$endif$ +$if(journal.pmc)$ +$journal.pmc$ +$endif$ + +$if(journal.title)$ +$journal.title$ +$endif$ +$if(journal.abbrev-title)$ +$journal.abbrev-title$ +$endif$ + +$if(journal.pissn)$ +$journal.pissn$ +$endif$ +$if(journal.eissn)$ +$journal.eissn$ +$endif$ + +$journal.publisher-name$ +$if(journal.publisher-loc)$ +$journal.publisher-loc$ +$endif$ + + + +$if(article.publisher-id)$ +$article.publisher-id$ +$endif$ +$if(article.doi)$ +$article.doi$ +$endif$ +$if(article.pmid)$ +$article.pmid$ +$endif$ +$if(article.pmcid)$ +$article.pmcid$ +$endif$ +$if(article.art-access-id)$ +$article.art-access-id$ +$endif$ +$if(article.heading)$ + + +$article.heading$ + +$if(article.categories)$ + +$for(article.categories)$ +$article.categories$ +$endfor$ + +$endif$ + +$endif$ +$if(title)$ + +$title$ + +$endif$ +$if(author)$ + +$for(author)$ + +$if(author.orcid)$ +$author.orcid$ +$endif$ + +$if(author.surname)$ +$author.surname$ +$author.given-names$ +$else$ +$author$ +$endif$ + +$if(author.email)$ +$author.email$ +$endif$ +$if(author.aff-id)$ + +$endif$ +$if(author.cor-id)$ +* +$endif$ + +$endfor$ + +$endif$ +$if(article.author-notes)$ + +$if(article.author-notes.corresp)$ +$for(article.author-notes.corresp)$ +* E-mail: $article.author-notes.corresp.email$ +$endfor$ +$endif$ +$if(article.author-notes.conflict)$ +

    $article.author-notes.conflict$

    +$endif$ +$if(article.author-notes.con)$ +

    $article.author-notes.con$

    +$endif$ +
    +$endif$ +$if(date)$ +$if(date.iso-8601)$ + +$else$ + +$endif$ +$if(date.day)$ +$pub-date.day$ +$endif$ +$if(date.month)$ +$pub-date.month$ +$endif$ +$if(date.year)$ +$pub-date.year$ +$else$ +$date$ +$endif$ + +$endif$ +$if(article.volume)$ +$article.volume$ +$endif$ +$if(article.issue)$ +$article.issue$ +$endif$ +$if(article.fpage)$ +$article.fpage$ +$endif$ +$if(article.lpage)$ +$article.lpage$ +$endif$ +$if(article.elocation-id)$ +$article.elocation-id$ +$endif$ +$if(history)$ + + +$endif$ +$if(copyright)$ + +$if(copyright.statement)$ +$copyright.statement$ +$endif$ +$if(copyright.year)$ +$copyright.year$ +$endif$ +$if(copyright.holder)$ +$copyright.holder$ +$endif$ +$if(copyright.text)$ + +$copyright.text$ + + +$endif$ +$endif$ +$if(tags)$ + +$for(tags)$ +$tags$ +$endfor$ + +$endif$ +$if(article.funding-statement)$ + +$article.funding-statement$ + +$endif$ +
    +$if(notes)$ +$notes$ +$endif$ +
    + +$body$ + + +$if(back)$ +$back$ +$endif$ + +
    diff --git a/data/templates/default.latex b/data/templates/default.latex new file mode 100644 index 0000000..c36bf85 --- /dev/null +++ b/data/templates/default.latex @@ -0,0 +1,415 @@ +\PassOptionsToPackage{unicode=true}{hyperref} % options for packages loaded elsewhere +\PassOptionsToPackage{hyphens}{url} +$if(colorlinks)$ +\PassOptionsToPackage{dvipsnames,svgnames*,x11names*}{xcolor} +$endif$ +% +\documentclass[$if(fontsize)$$fontsize$,$endif$$if(lang)$$babel-lang$,$endif$$if(papersize)$$papersize$paper,$endif$$if(beamer)$ignorenonframetext,$if(handout)$handout,$endif$$if(aspectratio)$aspectratio=$aspectratio$,$endif$$endif$$for(classoption)$$classoption$$sep$,$endfor$]{$documentclass$} +$if(beamer)$ +\setbeamertemplate{caption}[numbered] +\setbeamertemplate{caption label separator}{: } +\setbeamercolor{caption name}{fg=normal text.fg} +\beamertemplatenavigationsymbols$if(navigation)$$navigation$$else$empty$endif$ +$endif$ +$if(beamerarticle)$ +\usepackage{beamerarticle} % needs to be loaded first +$endif$ +$if(fontfamily)$ +\usepackage[$for(fontfamilyoptions)$$fontfamilyoptions$$sep$,$endfor$]{$fontfamily$} +$else$ +\usepackage{lmodern} +$endif$ +$if(linestretch)$ +\usepackage{setspace} +\setstretch{$linestretch$} +$endif$ +\usepackage{amssymb,amsmath} +\usepackage{ifxetex,ifluatex} +\usepackage{fixltx2e} % provides \textsubscript +\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex + \usepackage[$if(fontenc)$$fontenc$$else$T1$endif$]{fontenc} + \usepackage[utf8]{inputenc} + \usepackage{textcomp} % provides euro and other symbols +\else % if luatex or xelatex +$if(mathspec)$ + \ifxetex + \usepackage{mathspec} + \else + \usepackage{unicode-math} + \fi +$else$ + \usepackage{unicode-math} +$endif$ + \defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase} +$for(fontfamilies)$ + \newfontfamily{$fontfamilies.name$}[$fontfamilies.options$]{$fontfamilies.font$} +$endfor$ +$if(mainfont)$ + \setmainfont[$for(mainfontoptions)$$mainfontoptions$$sep$,$endfor$]{$mainfont$} +$endif$ +$if(sansfont)$ + \setsansfont[$for(sansfontoptions)$$sansfontoptions$$sep$,$endfor$]{$sansfont$} +$endif$ +$if(monofont)$ + \setmonofont[Mapping=tex-ansi$if(monofontoptions)$,$for(monofontoptions)$$monofontoptions$$sep$,$endfor$$endif$]{$monofont$} +$endif$ +$if(mathfont)$ +$if(mathspec)$ + \ifxetex + \setmathfont(Digits,Latin,Greek)[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$} + \else + \setmathfont[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$} + \fi +$else$ + \setmathfont[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$} +$endif$ +$endif$ +$if(CJKmainfont)$ + \ifxetex + \usepackage{xeCJK} + \setCJKmainfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmainfont$} + \fi +$endif$ +$if(luatexjapresetoptions)$ + \ifluatex + \usepackage[$for(luatexjapresetoptions)$$luatexjapresetoptions$$sep$,$endfor$]{luatexja-preset} + \fi +$endif$ +$if(CJKmainfont)$ + \ifluatex + \usepackage[$for(luatexjafontspecoptions)$$luatexjafontspecoptions$$sep$,$endfor$]{luatexja-fontspec} + \setmainjfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmainfont$} + \fi +$endif$ +\fi +$if(beamer)$ +$if(theme)$ +\usetheme[$for(themeoptions)$$themeoptions$$sep$,$endfor$]{$theme$} +$endif$ +$if(colortheme)$ +\usecolortheme{$colortheme$} +$endif$ +$if(fonttheme)$ +\usefonttheme{$fonttheme$} +$endif$ +$if(mainfont)$ +\usefonttheme{serif} % use mainfont rather than sansfont for slide text +$endif$ +$if(innertheme)$ +\useinnertheme{$innertheme$} +$endif$ +$if(outertheme)$ +\useoutertheme{$outertheme$} +$endif$ +$endif$ +% use upquote if available, for straight quotes in verbatim environments +\IfFileExists{upquote.sty}{\usepackage{upquote}}{} +% use microtype if available +\IfFileExists{microtype.sty}{% +\usepackage[$for(microtypeoptions)$$microtypeoptions$$sep$,$endfor$]{microtype} +\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts +}{} +$if(indent)$ +$else$ +\IfFileExists{parskip.sty}{% +\usepackage{parskip} +}{% else +\setlength{\parindent}{0pt} +\setlength{\parskip}{6pt plus 2pt minus 1pt} +} +$endif$ +$if(verbatim-in-note)$ +\usepackage{fancyvrb} +$endif$ +$if(colorlinks)$ +\usepackage{xcolor} +$endif$ +\usepackage{hyperref} +\hypersetup{ +$if(title-meta)$ + pdftitle={$title-meta$}, +$endif$ +$if(author-meta)$ + pdfauthor={$author-meta$}, +$endif$ +$if(keywords)$ + pdfkeywords={$for(keywords)$$keywords$$sep$, $endfor$}, +$endif$ +$if(colorlinks)$ + colorlinks=true, + linkcolor=$if(linkcolor)$$linkcolor$$else$Maroon$endif$, + citecolor=$if(citecolor)$$citecolor$$else$Blue$endif$, + urlcolor=$if(urlcolor)$$urlcolor$$else$Blue$endif$, +$else$ + pdfborder={0 0 0}, +$endif$ + breaklinks=true} +\urlstyle{same} % don't use monospace font for urls +$if(verbatim-in-note)$ +\VerbatimFootnotes % allows verbatim text in footnotes +$endif$ +$if(geometry)$ +\usepackage[$for(geometry)$$geometry$$sep$,$endfor$]{geometry} +$endif$ +$if(beamer)$ +\newif\ifbibliography +$endif$ +$if(listings)$ +\usepackage{listings} +\newcommand{\passthrough}[1]{#1} +$endif$ +$if(lhs)$ +\lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{} +$endif$ +$if(highlighting-macros)$ +$highlighting-macros$ +$endif$ +$if(tables)$ +\usepackage{longtable,booktabs} +$if(beamer)$ +\usepackage{caption} +% These lines are needed to make table captions work with longtable: +\makeatletter +\def\fnum@table{\tablename~\thetable} +\makeatother +$else$ +% Fix footnotes in tables (requires footnote package) +\IfFileExists{footnote.sty}{\usepackage{footnote}\makesavenoteenv{longtable}}{} +$endif$ +$endif$ +$if(graphics)$ +\usepackage{graphicx,grffile} +\makeatletter +\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi} +\def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi} +\makeatother +% Scale images if necessary, so that they will not overflow the page +% margins by default, and it is still possible to overwrite the defaults +% using explicit options in \includegraphics[width, height, ...]{} +\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio} +$endif$ +$if(beamer)$ +% Prevent slide breaks in the middle of a paragraph: +\widowpenalties 1 10000 +\raggedbottom +$if(section-titles)$ +\setbeamertemplate{part page}{ +\centering +\begin{beamercolorbox}[sep=16pt,center]{part title} + \usebeamerfont{part title}\insertpart\par +\end{beamercolorbox} +} +\setbeamertemplate{section page}{ +\centering +\begin{beamercolorbox}[sep=12pt,center]{part title} + \usebeamerfont{section title}\insertsection\par +\end{beamercolorbox} +} +\setbeamertemplate{subsection page}{ +\centering +\begin{beamercolorbox}[sep=8pt,center]{part title} + \usebeamerfont{subsection title}\insertsubsection\par +\end{beamercolorbox} +} +\AtBeginPart{ + \frame{\partpage} +} +\AtBeginSection{ + \ifbibliography + \else + \frame{\sectionpage} + \fi +} +\AtBeginSubsection{ + \frame{\subsectionpage} +} +$endif$ +$endif$ +$if(links-as-notes)$ +% Make links footnotes instead of hotlinks: +\DeclareRobustCommand{\href}[2]{#2\footnote{\url{#1}}} +$endif$ +$if(strikeout)$ +\usepackage[normalem]{ulem} +% avoid problems with \sout in headers with hyperref: +\pdfstringdefDisableCommands{\renewcommand{\sout}{}} +$endif$ +\setlength{\emergencystretch}{3em} % prevent overfull lines +\providecommand{\tightlist}{% + \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} +$if(numbersections)$ +\setcounter{secnumdepth}{$if(secnumdepth)$$secnumdepth$$else$5$endif$} +$else$ +\setcounter{secnumdepth}{0} +$endif$ +$if(beamer)$ +$else$ +$if(subparagraph)$ +$else$ +% Redefines (sub)paragraphs to behave more like sections +\ifx\paragraph\undefined\else +\let\oldparagraph\paragraph +\renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}} +\fi +\ifx\subparagraph\undefined\else +\let\oldsubparagraph\subparagraph +\renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}} +\fi +$endif$ +$endif$ +$if(pagestyle)$ +\pagestyle{$pagestyle$} +$endif$ + +% set default figure placement to htbp +\makeatletter +\def\fps@figure{htbp} +\makeatother + +$for(header-includes)$ +$header-includes$ +$endfor$ +$if(lang)$ +\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex + \usepackage[shorthands=off,$for(babel-otherlangs)$$babel-otherlangs$,$endfor$main=$babel-lang$]{babel} +$if(babel-newcommands)$ + $babel-newcommands$ +$endif$ +\else + % load polyglossia as late as possible as it *could* call bidi if RTL lang (e.g. Hebrew or Arabic) + \usepackage{polyglossia} + \setmainlanguage[$polyglossia-lang.options$]{$polyglossia-lang.name$} +$for(polyglossia-otherlangs)$ + \setotherlanguage[$polyglossia-otherlangs.options$]{$polyglossia-otherlangs.name$} +$endfor$ +\fi +$endif$ +$if(dir)$ +\ifxetex + % load bidi as late as possible as it modifies e.g. graphicx + $if(latex-dir-rtl)$ + \usepackage[RTLdocument]{bidi} + $else$ + \usepackage{bidi} + $endif$ +\fi +\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex + \TeXXeTstate=1 + \newcommand{\RL}[1]{\beginR #1\endR} + \newcommand{\LR}[1]{\beginL #1\endL} + \newenvironment{RTL}{\beginR}{\endR} + \newenvironment{LTR}{\beginL}{\endL} +\fi +$endif$ +$if(natbib)$ +\usepackage[$natbiboptions$]{natbib} +\bibliographystyle{$if(biblio-style)$$biblio-style$$else$plainnat$endif$} +$endif$ +$if(biblatex)$ +\usepackage[$if(biblio-style)$style=$biblio-style$,$endif$$for(biblatexoptions)$$biblatexoptions$$sep$,$endfor$]{biblatex} +$for(bibliography)$ +\addbibresource{$bibliography$} +$endfor$ +$endif$ + +$if(title)$ +\title{$title$$if(thanks)$\thanks{$thanks$}$endif$} +$endif$ +$if(subtitle)$ +\providecommand{\subtitle}[1]{} +\subtitle{$subtitle$} +$endif$ +$if(author)$ +\author{$for(author)$$author$$sep$ \and $endfor$} +$endif$ +$if(institute)$ +\providecommand{\institute}[1]{} +\institute{$for(institute)$$institute$$sep$ \and $endfor$} +$endif$ +\date{$date$} +$if(beamer)$ +$if(titlegraphic)$ +\titlegraphic{\includegraphics{$titlegraphic$}} +$endif$ +$if(logo)$ +\logo{\includegraphics{$logo$}} +$endif$ +$endif$ + +\begin{document} +$if(title)$ +$if(beamer)$ +\frame{\titlepage} +$else$ +\maketitle +$endif$ +$if(abstract)$ +\begin{abstract} +$abstract$ +\end{abstract} +$endif$ +$endif$ + +$for(include-before)$ +$include-before$ + +$endfor$ +$if(toc)$ +$if(beamer)$ +\begin{frame} +\tableofcontents[hideallsubsections] +\end{frame} +$else$ +{ +$if(colorlinks)$ +\hypersetup{linkcolor=$if(toccolor)$$toccolor$$else$$endif$} +$endif$ +\setcounter{tocdepth}{$toc-depth$} +\tableofcontents +} +$endif$ +$endif$ +$if(lot)$ +\listoftables +$endif$ +$if(lof)$ +\listoffigures +$endif$ +$body$ + +$if(natbib)$ +$if(bibliography)$ +$if(biblio-title)$ +$if(book-class)$ +\renewcommand\bibname{$biblio-title$} +$else$ +\renewcommand\refname{$biblio-title$} +$endif$ +$endif$ +$if(beamer)$ +\begin{frame}[allowframebreaks]{$biblio-title$} +\bibliographytrue +$endif$ +\bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$} +$if(beamer)$ +\end{frame} +$endif$ + +$endif$ +$endif$ +$if(biblatex)$ +$if(beamer)$ +\begin{frame}[allowframebreaks]{$biblio-title$} +\bibliographytrue +\printbibliography[heading=none] +\end{frame} +$else$ +\printbibliography$if(biblio-title)$[title=$biblio-title$]$endif$ +$endif$ + +$endif$ +$for(include-after)$ +$include-after$ + +$endfor$ +\end{document} diff --git a/data/templates/default.man b/data/templates/default.man new file mode 100644 index 0000000..44b5919 --- /dev/null +++ b/data/templates/default.man @@ -0,0 +1,30 @@ +$if(has-tables)$ +.\"t +$endif$ +$if(pandoc-version)$ +.\" Automatically generated by Pandoc $pandoc-version$ +.\" +$endif$ +$if(adjusting)$ +.ad $adjusting$ +$endif$ +.TH "$title$" "$section$" "$date$" "$footer$" "$header$" +$if(hyphenate)$ +.hy +$else$ +.nh \" Turn off hyphenation by default. +$endif$ +$for(header-includes)$ +$header-includes$ +$endfor$ +$for(include-before)$ +$include-before$ +$endfor$ +$body$ +$for(include-after)$ +$include-after$ +$endfor$ +$if(author)$ +.SH AUTHORS +$for(author)$$author$$sep$; $endfor$. +$endif$ diff --git a/data/templates/default.markdown b/data/templates/default.markdown new file mode 100644 index 0000000..9f6ca96 --- /dev/null +++ b/data/templates/default.markdown @@ -0,0 +1,21 @@ +$if(titleblock)$ +$titleblock$ + +$endif$ +$for(header-includes)$ +$header-includes$ + +$endfor$ +$for(include-before)$ +$include-before$ + +$endfor$ +$if(toc)$ +$table-of-contents$ + +$endif$ +$body$ +$for(include-after)$ + +$include-after$ +$endfor$ diff --git a/data/templates/default.mediawiki b/data/templates/default.mediawiki new file mode 100644 index 0000000..5d210fa --- /dev/null +++ b/data/templates/default.mediawiki @@ -0,0 +1,13 @@ +$for(include-before)$ +$include-before$ + +$endfor$ +$if(toc)$ +__TOC__ + +$endif$ +$body$ +$for(include-after)$ + +$include-after$ +$endfor$ diff --git a/data/templates/default.ms b/data/templates/default.ms new file mode 100644 index 0000000..c136843 --- /dev/null +++ b/data/templates/default.ms @@ -0,0 +1,108 @@ +.\" **** Custom macro definitions ********************************* +.\" * Super/subscript +.\" (https://lists.gnu.org/archive/html/groff/2012-07/msg00046.html) +.ds { \v'-0.3m'\\s[\\n[.s]*9u/12u] +.ds } \s0\v'0.3m' +.ds < \v'0.3m'\s[\\n[.s]*9u/12u] +.ds > \s0\v'-0.3m' +.\" * Horizontal line +.de HLINE +.LP +.ce +\l'20' +.. +$if(highlighting-macros)$ +.\" * Syntax highlighting macros +$highlighting-macros$ +$endif$ +.\" **** Settings ************************************************* +.\" text width +.nr LL 5.5i +.\" left margin +.nr PO 1.25i +.\" top margin +.nr HM 1.25i +.\" bottom margin +.nr FM 1.25i +.\" header/footer width +.nr LT \n[LL] +.\" point size +.nr PS $if(pointsize)$$pointsize$$else$10p$endif$ +.\" line height +.nr VS $if(lineheight)$$lineheight$$else$12p$endif$ +.\" font family: A, BM, H, HN, N, P, T, ZCM +.fam $if(fontfamily)$$fontfamily$$else$T$endif$ +.\" paragraph indent +.nr PI $if(indent)$$indent$$else$2m$endif$ +.\" interparagraph space +.nr PD 0.33v +.\" footnote width +.nr FL \n[LL] +.\" footnote point size +.nr FPS (\n[PS] - 2000) +.\" color used for strikeout +.defcolor strikecolor rgb 0.7 0.7 0.7 +.\" color for links (rgb) +.ds PDFHREF.COLOUR 0.35 0.00 0.60 +.\" border for links (default none) +.ds PDFHREF.BORDER 0 0 0 +.\" point size difference between heading levels +.nr PSINCR 1p +.\" heading level above which point size no longer changes +.nr GROWPS 2 +.\" comment these out if you want a dot after section numbers: +.als SN SN-NO-DOT +.als SN-STYLE SN-NO-DOT +.\" pdf outline fold level +.nr PDFOUTLINE.FOLDLEVEL 3 +.\" start out in outline view +.pdfview /PageMode /UseOutlines +.\" *************************************************************** +.\" PDF metadata +.pdfinfo /Title "$title-meta$" +.pdfinfo /Author "$author-meta$" +$if(adjusting)$ +.ad $adjusting$ +$endif$ +$if(hyphenate)$ +.hy +$else$ +.nh \" Turn off hyphenation by default. +$endif$ +$if(has-inline-math)$ +.EQ +delim @@ +.EN +$endif$ +$for(header-includes)$ +$header-includes$ +$endfor$ +$if(title)$ +.TL +$title$ +$endif$ +$for(author)$ +.AU +$author$ +$endfor$ +$if(date)$ +.ND "$date$" +$endif$ +$if(abstract)$ +.AB +$abstract$ +.AE +$endif$ +.\" 1 column (use .2C for two column) +.1C +$for(include-before)$ +$include-before$ +$endfor$ +$body$ +$if(toc)$ +.TC +$endif$ +$for(include-after)$ +$include-after$ +$endfor$ +.pdfsync diff --git a/data/templates/default.muse b/data/templates/default.muse new file mode 100644 index 0000000..05534ad --- /dev/null +++ b/data/templates/default.muse @@ -0,0 +1,44 @@ +$if(author)$ +#author $author$ +$endif$ +$if(title)$ +#title $title$ +$endif$ +$if(lang)$ +#lang $lang$ +$endif$ +$if(LISTtitle)$ +#LISTtitle $LISTtitle$ +$endif$ +$if(subtitle)$ +#subtitle $subtitle$ +$endif$ +$if(SORTauthors)$ +#SORTauthors $SORTauthors$ +$endif$ +$if(SORTtopics)$ +#SORTtopics $SORTtopics$ +$endif$ +$if(date)$ +#date $date$ +$endif$ +$if(notes)$ +#notes $notes$ +$endif$ +$if(source)$ +#source $source$ +$endif$ + +$for(header-includes)$ +$header-includes$ + +$endfor$ +$for(include-before)$ +$include-before$ + +$endfor$ +$body$ +$for(include-after)$ + +$include-after$ +$endfor$ diff --git a/data/templates/default.opendocument b/data/templates/default.opendocument new file mode 100644 index 0000000..e0bc5c1 --- /dev/null +++ b/data/templates/default.opendocument @@ -0,0 +1,161 @@ + + + + + + + $automatic-styles$ + +$for(header-includes)$ + $header-includes$ +$endfor$ + + +$if(title)$ +$title$ +$endif$ +$for(author)$ +$author$ +$endfor$ +$if(date)$ +$date$ +$endif$ +$for(include-before)$ +$include-before$ +$endfor$ +$if(toc)$ + + + + $toc-title$ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +$endif$ +$body$ +$for(include-after)$ +$include-after$ +$endfor$ + + + diff --git a/data/templates/default.opml b/data/templates/default.opml new file mode 100644 index 0000000..c3566d3 --- /dev/null +++ b/data/templates/default.opml @@ -0,0 +1,11 @@ + + + + $title$ + $date$ + $for(author)$$author$$sep$; $endfor$ + + +$body$ + + diff --git a/data/templates/default.org b/data/templates/default.org new file mode 100644 index 0000000..860342e --- /dev/null +++ b/data/templates/default.org @@ -0,0 +1,24 @@ +$if(title)$ +#+TITLE: $title$ + +$endif$ +$if(author)$ +#+AUTHOR: $for(author)$$author$$sep$; $endfor$ +$endif$ +$if(date)$ +#+DATE: $date$ + +$endif$ +$for(header-includes)$ +$header-includes$ + +$endfor$ +$for(include-before)$ +$include-before$ + +$endfor$ +$body$ +$for(include-after)$ + +$include-after$ +$endfor$ diff --git a/data/templates/default.plain b/data/templates/default.plain new file mode 100644 index 0000000..9f6ca96 --- /dev/null +++ b/data/templates/default.plain @@ -0,0 +1,21 @@ +$if(titleblock)$ +$titleblock$ + +$endif$ +$for(header-includes)$ +$header-includes$ + +$endfor$ +$for(include-before)$ +$include-before$ + +$endfor$ +$if(toc)$ +$table-of-contents$ + +$endif$ +$body$ +$for(include-after)$ + +$include-after$ +$endfor$ diff --git a/data/templates/default.revealjs b/data/templates/default.revealjs new file mode 100644 index 0000000..65ab090 --- /dev/null +++ b/data/templates/default.revealjs @@ -0,0 +1,271 @@ + + + + + +$for(author-meta)$ + +$endfor$ +$if(date-meta)$ + +$endif$ +$if(keywords)$ + +$endif$ + $if(title-prefix)$$title-prefix$ – $endif$$pagetitle$ + + + + + +$if(highlighting-css)$ + +$endif$ +$if(theme)$ + +$else$ + +$endif$ +$for(css)$ + +$endfor$ + + + +$if(math)$ + $math$ +$endif$ +$for(header-includes)$ + $header-includes$ +$endfor$ + + +$for(include-before)$ +$include-before$ +$endfor$ +
    +
    + +$if(title)$ +
    +

    $title$

    +$if(subtitle)$ +

    $subtitle$

    +$endif$ +$for(author)$ +

    $author$

    +$endfor$ +$if(date)$ +

    $date$

    +$endif$ +
    +$endif$ +$if(toc)$ +
    +$table-of-contents$ +
    +$endif$ + +$body$ +
    +
    + + + + + + $for(include-after)$ + $include-after$ + $endfor$ + + diff --git a/data/templates/default.rst b/data/templates/default.rst new file mode 100644 index 0000000..30005d1 --- /dev/null +++ b/data/templates/default.rst @@ -0,0 +1,48 @@ +$if(title)$ +$title$ + +$endif$ +$for(author)$ +:Author: $author$ +$endfor$ +$if(date)$ +:Date: $date$ +$endif$ +$if(author)$ + +$else$ +$if(date)$ + +$endif$ +$endif$ +$if(math)$ +.. role:: math(raw) + :format: html latex +.. + +$endif$ +$if(rawtex)$ +.. role:: raw-latex(raw) + :format: latex +.. + +$endif$ +$for(include-before)$ +$include-before$ + +$endfor$ +$if(toc)$ +.. contents:: + :depth: $toc-depth$ +.. + +$endif$ +$for(header-includes)$ +$header-includes$ + +$endfor$ +$body$ +$for(include-after)$ + +$include-after$ +$endfor$ diff --git a/data/templates/default.rtf b/data/templates/default.rtf new file mode 100644 index 0000000..a7f7937 --- /dev/null +++ b/data/templates/default.rtf @@ -0,0 +1,30 @@ +{\rtf1\ansi\deff0{\fonttbl{\f0 \fswiss Helvetica;}{\f1 Courier;}} +{\colortbl;\red255\green0\blue0;\red0\green0\blue255;} +\widowctrl\hyphauto +$for(header-includes)$ +$header-includes$ +$endfor$ + +$if(title)$ +{\pard \qc \f0 \sa180 \li0 \fi0 \b \fs36 $title$\par} +$endif$ +$for(author)$ +{\pard \qc \f0 \sa180 \li0 \fi0 $author$\par} +$endfor$ +$if(date)$ +{\pard \qc \f0 \sa180 \li0 \fi0 $date$\par} +$endif$ +$if(spacer)$ +{\pard \ql \f0 \sa180 \li0 \fi0 \par} +$endif$ +$if(toc)$ +$table-of-contents$ +$endif$ +$for(include-before)$ +$include-before$ +$endfor$ +$body$ +$for(include-after)$ +$include-after$ +$endfor$ +} diff --git a/data/templates/default.s5 b/data/templates/default.s5 new file mode 100644 index 0000000..e9c36b4 --- /dev/null +++ b/data/templates/default.s5 @@ -0,0 +1,91 @@ + + + + + + +$for(author-meta)$ + + +$endfor$ +$if(date-meta)$ + +$endif$ +$if(keywords)$ + +$endif$ + $if(title-prefix)$$title-prefix$ – $endif$$pagetitle$ + + + + +$if(highlighting-css)$ + +$endif$ +$for(css)$ + +$endfor$ + + + + + + + +$if(math)$ + $math$ +$endif$ +$for(header-includes)$ + $header-includes$ +$endfor$ + + +$for(include-before)$ +$include-before$ +$endfor$ +
    +
    +
    + + +
    +
    +$if(title)$ +
    +

    $title$

    +$if(subtitle)$ +

    $subtitle$

    +$endif$ +$if(author)$ +

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

    +$endif$ +$if(date)$ +

    $date$

    +$endif$ +
    +$endif$ +$if(toc)$ +
    +$table-of-contents$ +
    +$endif$ +$body$ +$for(include-after)$ +$include-after$ +$endfor$ +
    + + diff --git a/data/templates/default.slideous b/data/templates/default.slideous new file mode 100644 index 0000000..ad58272 --- /dev/null +++ b/data/templates/default.slideous @@ -0,0 +1,95 @@ + + + + + + + +$for(author-meta)$ + +$endfor$ +$if(date-meta)$ + +$endif$ +$if(keywords)$ + +$endif$ + $if(title-prefix)$$title-prefix$ – $endif$$pagetitle$ + +$if(highlighting-css)$ + +$endif$ + +$for(css)$ + +$endfor$ +$if(math)$ + $math$ +$endif$ +$for(header-includes)$ + $header-includes$ +$endfor$ + +$if(duration)$ + +$endif$ + + +$for(include-before)$ +$include-before$ +$endfor$ +
    + + of {$$slidecount} + + + + + + + + + + +½ +{$$title}, {$$author} +
    +$if(title)$ +
    +

    $title$

    +$if(subtitle)$ +

    $subtitle$

    +$endif$ +

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

    +$if(date)$ +

    $date$

    +$endif$ +
    +$endif$ +$if(toc)$ +
    +$table-of-contents$ +
    +$endif$ +$body$ +$for(include-after)$ +$include-after$ +$endfor$ + + diff --git a/data/templates/default.slidy b/data/templates/default.slidy new file mode 100644 index 0000000..98b8d66 --- /dev/null +++ b/data/templates/default.slidy @@ -0,0 +1,81 @@ + + + + + + + +$for(author-meta)$ + +$endfor$ +$if(date-meta)$ + +$endif$ +$if(keywords)$ + +$endif$ + $if(title-prefix)$$title-prefix$ – $endif$$pagetitle$ + +$if(highlighting-css)$ + +$endif$ + +$for(css)$ + +$endfor$ +$if(math)$ + $math$ +$endif$ +$for(header-includes)$ + $header-includes$ +$endfor$ + +$if(duration)$ + +$endif$ + + +$for(include-before)$ +$include-before$ +$endfor$ +$if(title)$ +
    +

    $title$

    +$if(subtitle)$ +

    $subtitle$

    +$endif$ +$if(author)$ +

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

    +$endif$ +$if(date)$ +

    $date$

    +$endif$ +
    +$endif$ +$if(toc)$ +
    +$table-of-contents$ +
    +$endif$ +$body$ +$for(include-after)$ +$include-after$ +$endfor$ + + diff --git a/data/templates/default.tei b/data/templates/default.tei new file mode 100644 index 0000000..3778dcc --- /dev/null +++ b/data/templates/default.tei @@ -0,0 +1,39 @@ + + + + + +$if(title)$ + $title$ +$endif$ +$for(author)$ + $author$ +$endfor$ + + +

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

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

    Produced by pandoc.

    +$endif$ +
    +
    +
    + +$for(include-before)$ +$include-before$ +$endfor$ + +$body$ + +$for(include-after)$ +$include-after$ +$endfor$ + +
    diff --git a/data/templates/default.texinfo b/data/templates/default.texinfo new file mode 100644 index 0000000..458d4fd --- /dev/null +++ b/data/templates/default.texinfo @@ -0,0 +1,64 @@ +\input texinfo +@documentencoding UTF-8 +$for(header-includes)$ +$header-includes$ +$endfor$ + +$if(strikeout)$ +@macro textstrikeout{text} +~~\text\~~ +@end macro + +$endif$ +$if(subscript)$ +@macro textsubscript{text} +@iftex +@textsubscript{\text\} +@end iftex +@ifnottex +_@{\text\@} +@end ifnottex +@end macro + +$endif$ +$if(superscript)$ +@macro textsuperscript{text} +@iftex +@textsuperscript{\text\} +@end iftex +@ifnottex +^@{\text\@} +@end ifnottex +@end macro + +$endif$ +@ifnottex +@paragraphindent 0 +@end ifnottex +$if(titlepage)$ +@titlepage +@title $title$ +$for(author)$ +@author $author$ +$endfor$ +$if(date)$ +$date$ +$endif$ +@end titlepage + +$endif$ +$for(include-before)$ +$include-before$ + +$endfor$ +$if(toc)$ +@contents + +$endif$ +$body$ +$for(include-after)$ + +$include-after$ +$endfor$ + +@bye diff --git a/data/templates/default.textile b/data/templates/default.textile new file mode 100644 index 0000000..69bd05b --- /dev/null +++ b/data/templates/default.textile @@ -0,0 +1,9 @@ +$for(include-before)$ +$include-before$ + +$endfor$ +$body$ +$for(include-after)$ + +$include-after$ +$endfor$ diff --git a/data/templates/default.zimwiki b/data/templates/default.zimwiki new file mode 100644 index 0000000..30824bd --- /dev/null +++ b/data/templates/default.zimwiki @@ -0,0 +1,16 @@ +Content-Type: text/x-zim-wiki +Wiki-Format: zim 0.4 + +$for(include-before)$ +$include-before$ + +$endfor$ +$if(toc)$ +__TOC__ + +$endif$ +$body$ +$for(include-after)$ + +$include-after$ +$endfor$ diff --git a/data/translations/am.yaml b/data/translations/am.yaml new file mode 100644 index 0000000..4c81693 --- /dev/null +++ b/data/translations/am.yaml @@ -0,0 +1,20 @@ +Abstract: አኅጽተሮ ጽሁፍ +Appendix: መድበል +Bibliography: ቢዋ መጽሃፍት +Cc: ግልባጭ +Chapter: ክፍል +Contents: ይዘት +Encl: አባሪዎች +Figure: ሥዕል +Index: ምህጻር ቃል +ListOfFigures: የሥዕችሎ ማውጫ +ListOfTables: የሰንጠዥረ ማውጫ +Page: ገጽ +Part: ንዑስ ክፍል +Preface: መቅድም +Proof: ማረጋገጫ +References: የነሥ ጹሁፍ ምንጭ +See: ይመልከቱ +SeeAlso: ይህምን ይመልከቱ +Table: ሰንጠረዥ +To: ለ diff --git a/data/translations/ar.yaml b/data/translations/ar.yaml new file mode 100644 index 0000000..6b9110a --- /dev/null +++ b/data/translations/ar.yaml @@ -0,0 +1,20 @@ +Preface: ﻡﺪﺨﻟ +References: ﺎﻠﻣﺭﺎﺠﻋ +Abstract: ﻢﻠﺨﺻ +Bibliography: ﺎﻠﻤﺻﺍﺩﺭ +Chapter: ﺏﺎﺑ +Appendix: ﺎﻠﻣﻼﺤﻗ +Contents: ﺎﻠﻤﺤﺗﻮﻳﺎﺗ +ListOfFigures: ﻕﺎﺌﻣﺓ ﺍﻸﺸﻛﺎﻟ +ListOfTables: ﻕﺎﺌﻣﺓ ﺎﻠﺟﺩﺍﻮﻟ +Index: ﺎﻠﻔﻫﺮﺳ +Figure: ﺶﻜﻟ +Table: ﺝﺩﻮﻟ +Part: ﺎﻠﻘﺴﻣ +Encl: ﺎﻠﻣﺮﻔﻗﺎﺗ +To: ﺈﻟﻯ +Page: ﺺﻔﺣﺓ +See: ﺭﺎﺠﻋ +SeeAlso: ﺭﺎﺠﻋ ﺄﻴﺿًﺍ +Proof: ﺏﺮﻫﺎﻧ +Glossary: ﻕﺎﻣﻮﺳ diff --git a/data/translations/bg.yaml b/data/translations/bg.yaml new file mode 100644 index 0000000..7851caa --- /dev/null +++ b/data/translations/bg.yaml @@ -0,0 +1,19 @@ +Abstract: Абстракт +Appendix: Приложение +Bibliography: Библиография +Cc: копия +Chapter: Глава +Contents: Съдържание +Encl: Приложения +Figure: Фигура +Glossary: Glossary +Index: Азбучен указател +ListOfFigures: Списък на фигурите +ListOfTables: Списък на таблиците +Page: Стр. +Preface: Предговор +Proof: Proof +References: Литература +See: вж. +SeeAlso: вж. също и +Table: Таблица diff --git a/data/translations/bn.yaml b/data/translations/bn.yaml new file mode 100644 index 0000000..5f66be8 --- /dev/null +++ b/data/translations/bn.yaml @@ -0,0 +1,21 @@ +Abstract: সারসংক্ষেপ +Appendix: পরিশিষ্ট +Bibliography: তথ্যবিবরণ +Cc: অনুলিপি +Chapter: অধ্যায় +Contents: সূচীপত্র +Encl: সংযুক্তি +Figure: ছবি/নকশা +Glossary: পরিভাষার শব্দসম্ভার +Index: সূচক/নির্দেশক +ListOfFigures: ছবি/নকশা সমূহের তালিকা +ListOfTables: তালিকাসারণী +Page: পৃষ্ঠা +Part: খন্ড +Preface: পূর্বকথা +Proof: প্রমাণ +References: তথ্যসুত্রসমূহ +See: দেখুন +SeeAlso: আরও দেখুন +Table: সারনী +To: প্রতি diff --git a/data/translations/ca.yaml b/data/translations/ca.yaml new file mode 100644 index 0000000..b7a0c61 --- /dev/null +++ b/data/translations/ca.yaml @@ -0,0 +1,21 @@ +Abstract: Resum +Appendix: Apèndix +Bibliography: Bibliografia +Cc: Còpies a +Chapter: Capítol +Contents: Índex +Encl: Adjunt +Figure: Figura +Glossary: Glossari +Index: Índex alfabètic +ListOfFigures: Índex de figures +ListOfTables: Índex de taules +Page: Pàgina +Part: Part +Preface: Pròleg +Proof: Demostració +References: Referències +See: Vegeu +SeeAlso: Vegeu també +Table: Taula +To: A diff --git a/data/translations/cs.yaml b/data/translations/cs.yaml new file mode 100644 index 0000000..e691101 --- /dev/null +++ b/data/translations/cs.yaml @@ -0,0 +1,21 @@ +Abstract: Abstrakt +Appendix: Dodatek +Bibliography: Literatura +Cc: Na vědomí: +Chapter: Kapitola +Contents: Obsah +Encl: Příloha +Figure: Obrázek +Glossary: Slovník +Index: Index +ListOfFigures: Seznam obrázků +ListOfTables: Seznam tabulek +Page: Strana +Part: Část +Preface: Předmluva +Proof: Důkaz +References: Reference +See: viz +SeeAlso: viz +Table: Tabulka +To: Komu diff --git a/data/translations/da.yaml b/data/translations/da.yaml new file mode 100644 index 0000000..483670d --- /dev/null +++ b/data/translations/da.yaml @@ -0,0 +1,21 @@ +Abstract: Resumé +Appendix: Bilag +Bibliography: Litteratur +Cc: Kopi til} +Chapter: Kapitel +Contents: Indhold +Encl: Vedlagt +Figure: Figur +Glossary: Gloseliste +Index: Indeks +ListOfFigures: Figurer +ListOfTables: Tabeller +Page: Side +Part: Del +Preface: Forord +Proof: Bevis +References: Litteratur +See: Se +SeeAlso: Se også +Table: Tabel +To: Til} diff --git a/data/translations/de.yaml b/data/translations/de.yaml new file mode 100644 index 0000000..df519ef --- /dev/null +++ b/data/translations/de.yaml @@ -0,0 +1,21 @@ +Abstract: Zusammenfassung +Appendix: Anhang +Bibliography: Literaturverzeichnis +Cc: Verteiler +Chapter: Kapitel +Contents: Inhaltsverzeichnis +Encl: Anlage(n) +Figure: Abbildung +Glossary: Glossar +Index: Index +ListOfFigures: Abbildungsverzeichnis +ListOfTables: Tabellenverzeichnis +Page: Seite +Part: Teil +Preface: Vorwort +Proof: Beweis +References: Literatur +See: siehe +SeeAlso: siehe auch +Table: Tabelle +To: An diff --git a/data/translations/el.yaml b/data/translations/el.yaml new file mode 100644 index 0000000..4aa0468 --- /dev/null +++ b/data/translations/el.yaml @@ -0,0 +1,21 @@ +Abstract: Περίληψη +Appendix: Παράρτημα +Bibliography: Βιβλιογραφία +Cc: Κοινοποίηση +Chapter: Κεφάλαιο +Contents: Περιεχόμενα +Encl: Συνημμένα +Figure: Σχήμα +Glossary: Γλωσσάρι +Index: Ευρετήριο +ListOfFigures: Κατάλογος σχημάτων +ListOfTables: Κατάλογος πινάκων +Page: Σελίδα +Part: Μέρος +Preface: Πρόλογος +Proof: Απόδειξη +References: Αναφορές +See: βλέπε +SeeAlso: βλέπε επίσης +Table: Πίνακας +To: Προς diff --git a/data/translations/en.yaml b/data/translations/en.yaml new file mode 100644 index 0000000..bd2599e --- /dev/null +++ b/data/translations/en.yaml @@ -0,0 +1,22 @@ +Abstract: Abstract +Appendix: Appendix +Bibliography: Bibliography +Cc: cc +Chapter: Chapter +Contents: Contents +Encl: encl +Figure: Figure +Glossary: Glossary +Index: Index +ListOfFigures: ListOfFigures +ListOfTables: ListOfTables +Page: page +Part: Part +Preface: Preface +Proof: Proof +References: References +See: see +SeeAlso: see also +Table: Table +To: To +Listing: Listing diff --git a/data/translations/eo.yaml b/data/translations/eo.yaml new file mode 100644 index 0000000..3393f5a --- /dev/null +++ b/data/translations/eo.yaml @@ -0,0 +1,20 @@ +Abstract: Resumo +Appendix: Apendico +Bibliography: Bibliografio +Cc: Kopie al +Chapter: Ĉapitro +Contents: Enhavo +Encl: Aldono(j) +Figure: Figuro +Glossary: Glosaro +Index: Indekso +ListOfFigures: Listo de figuroj +ListOfTables: Listo de tabeloj +Page: Paĝo +Preface: Antaŭparolo +Proof: Pruvo +References: Citaĵoj +See: vidu +SeeAlso: Parto +Table: Tabelo +To: Al diff --git a/data/translations/es.yaml b/data/translations/es.yaml new file mode 100644 index 0000000..ad227b7 --- /dev/null +++ b/data/translations/es.yaml @@ -0,0 +1,21 @@ +Abstract: Resumen +Appendix: Apéndice +Bibliography: Bibliografía +Cc: Copia a +Chapter: Capítulo +Contents: Índice general +Encl: Adjunto(s) +Figure: Figura +Glossary: Glosario +Index: Índice alfabético +ListOfFigures: Índice de figuras +ListOfTables: Índice de cuadros +Page: Página +Part: Parte +Preface: Prefacio +Proof: Prueba +References: Referencias +See: véase +SeeAlso: véase también +Table: Cuadro +To: A diff --git a/data/translations/et.yaml b/data/translations/et.yaml new file mode 100644 index 0000000..0dde733 --- /dev/null +++ b/data/translations/et.yaml @@ -0,0 +1,20 @@ +Abstract: Kokkuvõte +Appendix: Lisa +Bibliography: Kirjandus +Cc: Koopia(d) +Chapter: Peatükk +Contents: Sisukord +Encl: Lisa(d) +Figure: Joonis +Glossary: Glossary +Index: Indeks +ListOfFigures: Joonised +ListOfTables: Tabelid +Page: Lk. +Part: Osa +Preface: Sissejuhatus +Proof: Korrektuur +References: Viited +See: vt. +SeeAlso: vt. ka +Table: Tabel diff --git a/data/translations/eu.yaml b/data/translations/eu.yaml new file mode 100644 index 0000000..901a64b --- /dev/null +++ b/data/translations/eu.yaml @@ -0,0 +1,21 @@ +Abstract: Laburpena +Appendix: Eranskina +Bibliography: Bibliografia +Cc: Kopia +Chapter: Kapitulua +Contents: Gaien Aurkibidea +Encl: Erantsia +Figure: Irudia +Glossary: Glosarioa +Index: Kontzeptuen Aurkibidea +ListOfFigures: Irudien Zerrenda +ListOfTables: Taulen Zerrenda +Page: Orria +Part: Atala +Preface: Hitzaurrea +Proof: Frogapena +References: Erreferentziak +See: Ikusi +SeeAlso: Ikusi, halaber +Table: Taula +To: Nori diff --git a/data/translations/fa.yaml b/data/translations/fa.yaml new file mode 100644 index 0000000..aa76618 --- /dev/null +++ b/data/translations/fa.yaml @@ -0,0 +1,21 @@ +Abstract: چکیﺪﻫ +Appendix: پیﻮﺴﺗ +Bibliography: کﺕﺎﺑc>ﻧﺎﻤﻫ +Cc: ﺭﻮﻧﻮﺸﺗ +Chapter: ﻒﺼﻟ +Contents: ﻒﻫﺮﺴﺗ ﻢﻃﺎﻠﺑ +Encl: پیﻮﺴﺗ +Figure: ﺶﻜﻟ +Glossary: ﺩﺎﻨﺷc>ﻧﺎﻤﻫ +Index: ﻦﻣﺍیﻩ +ListOfFigures: ﻝیﺲﺗ ﺖﺻﺍﻭیﺭ +ListOfTables: ﻝیﺲﺗ ﺝﺩﺍﻮﻟ +Page: ﺺﻔﺣﺓ +Part: ﺐﺨﺷ +Preface: پیﺵگﻒﺗﺍﺭ +Proof: ﺏﺮﻫﺎﻧ +References: ﻡﺭﺎﺠﻋ +See: ﺐﺑیﻥیﺩ +SeeAlso: ﻥیﺯ ﺐﺑیﻥیﺩ +Table: ﺝﺩﻮﻟ +To: ﺐﻫ diff --git a/data/translations/fi.yaml b/data/translations/fi.yaml new file mode 100644 index 0000000..37589a4 --- /dev/null +++ b/data/translations/fi.yaml @@ -0,0 +1,21 @@ +Abstract: Tiivistelmä +Appendix: Liite +Bibliography: Kirjallisuutta +Cc: Jakelu +Chapter: Luku +Contents: Sisältö +Encl: Liitteet +Figure: Kuva +Glossary: Sanasto +Index: Hakemisto +ListOfFigures: Kuvat +ListOfTables: Taulukot +Page: Sivu +Part: Osa +Preface: Esipuhe +Proof: Todistus +References: Viitteet +See: katso +SeeAlso: katso myös +Table: Taulukko +To: Vastaanottaja diff --git a/data/translations/fr.yaml b/data/translations/fr.yaml new file mode 100644 index 0000000..4b75da6 --- /dev/null +++ b/data/translations/fr.yaml @@ -0,0 +1,20 @@ +Abstract: Résumé +Appendix: Annexe +Bibliography: Bibliographie +Cc: Copie à +Chapter: Chaptire +Contents: Table des matières +Figure: Fig. +Glossary: +Index: Index +ListOfFigures: Table des figures +ListOfTables: Liste des tableaux +Page: page +Part: partie +Preface: Préface +Proof: Démonstration +References: Références +See: voir +SeeAlso: voir aussi +Table: Tab. +To: diff --git a/data/translations/he.yaml b/data/translations/he.yaml new file mode 100644 index 0000000..b301925 --- /dev/null +++ b/data/translations/he.yaml @@ -0,0 +1,22 @@ +Abstract: תקציר +Appendix: נספח +Bibliography: ביבליוגרפיה +Cc: העתקים +Chapter: פרק +Contents: תוכן העניינים +Encl: רצ"ב +Figure: איור +Glossary: מילון מונחים} +Index: מפתח +ListOfFigures: רשימת האיורים +ListOfTables: רשימת הטבלאות +Page: עמוד +Part: חלק +Preface: מבוא +Proof: הוכחה} +Ps: נ.ב. +References: מקורות +See: ראה +SeeAlso: ראה גם} +Table: טבלה +To: אל diff --git a/data/translations/hi.yaml b/data/translations/hi.yaml new file mode 100644 index 0000000..5dbf6e0 --- /dev/null +++ b/data/translations/hi.yaml @@ -0,0 +1,20 @@ +Abstract: सारांश +Appendix: परिशिष्ट +Bibliography: संदर ग्रन्थ} +Cc: +Chapter: अध्याय +Contents: विषय सूची +Encl: +Figure: चित्र} +Headpage: पृषठ +Index: सूची +ListOfFigures: चित्रों की सूची +ListOfTables: तालिकाओं की सूची +Page: पृषठ +Part: खणड +Preface: प्रस्तावना} +References: हवाले +See: देखिए +SeeAlso: और देखिए +Table: तालिका +To: diff --git a/data/translations/hr.yaml b/data/translations/hr.yaml new file mode 100644 index 0000000..3894335 --- /dev/null +++ b/data/translations/hr.yaml @@ -0,0 +1,21 @@ +Abstract: Sažetak +Appendix: Dodatak +Bibliography: Bibliografija +Cc: Kopija +Chapter: Poglavlje +Contents: Sadržaj +Encl: Prilozi +Figure: Slika +Glossary: Pojmovnik +Index: Kazalo +ListOfFigures: Popis slika +ListOfTables: Popis tablica +Page: Stranica +Part: Dio +Preface: Predgovor +Proof: Dokaz +References: Literatura +See: Vidjeti +SeeAlso: Također vidjeti +Table: Tablica +To: Prima diff --git a/data/translations/hu.yaml b/data/translations/hu.yaml new file mode 100644 index 0000000..93c0790 --- /dev/null +++ b/data/translations/hu.yaml @@ -0,0 +1,21 @@ +Abstract: Kivonat +Appendix: Függelék +Bibliography: Irodalomjegyzék +Cc: Körlevél–címzettek +Chapter: fejezet +Contents: Tartalomjegyzék +Encl: Melléklet +Figure: ábra +Glossary: Szójegyzék +Index: Tárgymutató +ListOfFigures: Ábrák jegyzéke +ListOfTables: Táblázatok jegyzéke +Page: oldal +Part: rész +Preface: Előszó +Proof: Bizonyítás +References: Hivatkozások +See: lásd +SeeAlso: lásd még +Table: táblázat +To: Címzett diff --git a/data/translations/is.yaml b/data/translations/is.yaml new file mode 100644 index 0000000..a64c46a --- /dev/null +++ b/data/translations/is.yaml @@ -0,0 +1,21 @@ +Abstract: Útdráttur +Appendix: Viðauki +Bibliography: Heimildir +Cc: Samrit +Chapter: Kafli +Contents: Efnisyfirlit +Encl: Hjálagt +Figure: Mynd +Glossary: Orðalisti +Index: Atriðisorðaskrá +ListOfFigures: Myndaskrá +ListOfTables: Töfluskrá +Page: Blaðsíða +Part: Hluti +Preface: Formáli +Proof: Sönnun +References: Heimildir +See: Sjá +SeeAlso: Sjá einnig +Table: Tafla +To: Til: diff --git a/data/translations/it.yaml b/data/translations/it.yaml new file mode 100644 index 0000000..70eca53 --- /dev/null +++ b/data/translations/it.yaml @@ -0,0 +1,21 @@ +Abstract: Sommario +Appendix: Appendice +Bibliography: Bibliografia +Cc: e p. c. +Chapter: Capitolo +Contents: Indice +Encl: Allegati +Figure: Figura +Glossary: Glossario +Index: Indice analitico +ListOfFigures: Elenco delle figure +ListOfTables: Elenco delle tabelle +Page: Pag. +Part: Parte +Preface: Prefazione +Proof: Dimostrazione +References: Riferimenti bibliografici +See: vedi +SeeAlso: vedi anche +Table: Tabella +To: Per diff --git a/data/translations/km.yaml b/data/translations/km.yaml new file mode 100644 index 0000000..8514373 --- /dev/null +++ b/data/translations/km.yaml @@ -0,0 +1,21 @@ +Abstract: សង្ខេប +Appendix: សេចក្ដីបន្ថែម +Bibliography: គន្ថនិទ្ទេស +Cc: ចម្លងជួន +Chapter: ជំពូក +Contents: មាតិការ +Encl: ឯកសារភ្ជាប់ +Figure: រូប +Glossary: សទានុក្រម +Index: សន្ទស្សន៍ +ListOfFigures: បញ្ជីរូបភាព +ListOfTables: បញ្ជីតារាង +Page: ទំព័រ +Part: ផ្នែក +Preface: អារម្ភកថា +Proof: សម្រាយ +References: ឯកសារយោង +See: មើល +SeeAlso: មើលបន្ថែម +Table: តារាង +To: ផ្ញើរទៅ diff --git a/data/translations/ko.yaml b/data/translations/ko.yaml new file mode 100644 index 0000000..15f0a79 --- /dev/null +++ b/data/translations/ko.yaml @@ -0,0 +1,17 @@ +Abstract: 요약 +Appendix: 부록 +Bibliography: 참고문헌 +Cc: 사본 +Chapter: 장 +Contents: 차례 +Encl: 동봉 +Figure: 그림 +Index: 찾아보기 +ListOfFigures: 그림 차례 +ListOfTables: 표 차례 +Page: 페이지 +Preface: 서문 +Proof: 증명 +References: 참고문헌 +Table: 표 +To: 수신: diff --git a/data/translations/lo.yaml b/data/translations/lo.yaml new file mode 100644 index 0000000..47b271e --- /dev/null +++ b/data/translations/lo.yaml @@ -0,0 +1,21 @@ +Abstract: ບົດຫຍໍ້ຄວາມ +Appendix: ພາກຄັດຕິດ +Bibliography: ເອກະສານອ້າງອີງ +Cc: ສໍາເນົາເຖິງ +Chapter: ບົດທີ +Contents: ສາລະບານ +Encl: ເອກະສານປະກອບ +Figure: ຮູບທີ +Glossary: ປະມວນສັບ +Index: ດັດຊະນີ +ListOfFigures: ສາລະບານຮູບ +ListOfTables: ສາລະບານຕາຕະລາງ +Page: ໜ້າ +Part: ພາກ +Preface: ຄໍານໍາ +Proof: ຂໍ້ພິສູດ +References: ໜັງສືອ້າງອີງ +See: ອ່ານ +SeeAlso: ອ່ານເພີ່ມ +Table: ຕາຕະລາງທີ +To: ຮຽນ diff --git a/data/translations/lt.yaml b/data/translations/lt.yaml new file mode 100644 index 0000000..3519075 --- /dev/null +++ b/data/translations/lt.yaml @@ -0,0 +1,21 @@ +Abstract: Santrauka +Appendix: Priedas +Bibliography: Literatūra +Cc: Kopijos +Chapter: Skyrius +Contents: Turinys +Encl: Įdėta +Figure: pav. +Glossary: Terminų žodynas +Index: Rodyklė +ListOfFigures: Iliustracijų sąrašas +ListOfTables: Lentelių sąrašas +Page: puslapis +Part: Dalis +Preface: Pratarmė +Proof: Įrodymas +References: Literatūra +See: žiūrėk +SeeAlso: taip pat +Table: lentelė +To: Kam diff --git a/data/translations/lv.yaml b/data/translations/lv.yaml new file mode 100644 index 0000000..3e22410 --- /dev/null +++ b/data/translations/lv.yaml @@ -0,0 +1,20 @@ +Abstract: Anotācija +Appendix: Pielikums +Bibliography: Literatūra +Cc: cc +Chapter: Nodaļa +Contents: Saturs +Encl: encl +Figure: Att. +Index: Index +ListOfFigures: Attēlu saraksts +ListOfTables: Tabulu saraksts +Page: lpp. +Part: Daļa +Preface: Priekšvārds +Proof: Pierādījums +References: Literatūras saraksts +See: sk. +SeeAlso: sk. arī +Table: Tabula +To: To diff --git a/data/translations/nl.yaml b/data/translations/nl.yaml new file mode 100644 index 0000000..2c21901 --- /dev/null +++ b/data/translations/nl.yaml @@ -0,0 +1,21 @@ +Abstract: Samenvatting +Appendix: Bijlage +Bibliography: Bibliografie +Cc: cc +Chapter: Hoofdstuk +Contents: Inhoudsopgave +Encl: Bijlage(n) +Figure: Figuur +Glossary: Verklarende woordenlijst +Index: Index +ListOfFigures: Lijst van figuren +ListOfTables: Lijst van tabellen +Page: Pagina +Part: Deel +Preface: Voorwoord +Proof: Bewijs +References: Referenties +See: zie +SeeAlso: zie ook +Table: Tabel +To: Aan diff --git a/data/translations/no.yaml b/data/translations/no.yaml new file mode 100644 index 0000000..bc715a0 --- /dev/null +++ b/data/translations/no.yaml @@ -0,0 +1,21 @@ +Abstract: Sammendrag +Appendix: Tillegg +Bibliography: Bibliografi +Cc: Kopi sendt +Chapter: Kapittel +Contents: Innhold +Encl: Vedlegg +Figure: Figur +Glossary: Ordliste +Index: Register +ListOfFigures: Figurer +ListOfTables: Tabeller +Page: Side +Part: Del +Preface: Forord +Proof: Bevis +References: Referanser +See: Se +SeeAlso: Se også +Table: Tabell +To: Til diff --git a/data/translations/pl.yaml b/data/translations/pl.yaml new file mode 100644 index 0000000..160e676 --- /dev/null +++ b/data/translations/pl.yaml @@ -0,0 +1,21 @@ +Abstract: Streszczenie +Appendix: Dodatek +Bibliography: Bibliografia +Cc: Kopie: +Chapter: Rozdział +Contents: Spis treści +Encl: Załącznik +Figure: Rysunek +Glossary: Glossary +Index: Indeks +ListOfFigures: Spis rysunków +ListOfTables: Spis tabel +Page: Strona +Part: Część +Preface: Przedmowa +Proof: Dowód +References: Literatura +See: Zobacz +SeeAlso: Zobacz też +Table: Tabela +To: Do diff --git a/data/translations/pt.yaml b/data/translations/pt.yaml new file mode 100644 index 0000000..eea2eea --- /dev/null +++ b/data/translations/pt.yaml @@ -0,0 +1,21 @@ +Abstract: Resumo +Appendix: Apêndice +Bibliography: Bibliografia +Cc: Com cópia a +Chapter: Capítulo +Contents: Conteúdo +Encl: Anexo +Figure: Figura +Glossary: Glossário +Index: Índice +ListOfFigures: Lista de Figuras +ListOfTables: Lista de Tabelas +Page: Página +Part: Parte +Preface: Prefácio +Proof: Demonstração +References: Referências +See: ver +SeeAlso: ver também +Table: Tabela +To: Para diff --git a/data/translations/rm.yaml b/data/translations/rm.yaml new file mode 100644 index 0000000..f7f5561 --- /dev/null +++ b/data/translations/rm.yaml @@ -0,0 +1,21 @@ +Abstract: Recapitulaziun +Appendix: Appendix +Bibliography: Index bibliografic +Cc: Copia a +Chapter: Chapitel +Contents: Tavla dal cuntegn +Encl: Agiunta(s) +Figure: Figura +Glossary: Glossari +Index: Register da materias +ListOfFigures: Tavla da las figuras +ListOfTables: Tavla da las tabellas +Page: pagina +Part: Part +Preface: Prefaziun +Proof: Demonstraziun +References: Bibliografia +See: vesair +SeeAlso: vesair era +Table: Tabella +To: A diff --git a/data/translations/ro.yaml b/data/translations/ro.yaml new file mode 100644 index 0000000..d4bb866 --- /dev/null +++ b/data/translations/ro.yaml @@ -0,0 +1,21 @@ +Abstract: Rezumat +Appendix: Anexa +Bibliography: Bibliografie +Cc: Copie +Chapter: Capitolul +Contents: Cuprins +Encl: Anexă +Figure: Figura +Glossary: Glosar +Index: Glosar +ListOfFigures: Listă de figuri +ListOfTables: Listă de tabele +Page: Pagina +Part: Partea +Preface: Prefață +Proof: Demonstrație +References: Bibliografie +See: Vezi +SeeAlso: Vezi de asemenea +Table: Tabela +To: Pentru diff --git a/data/translations/ru.yaml b/data/translations/ru.yaml new file mode 100644 index 0000000..6012c3e --- /dev/null +++ b/data/translations/ru.yaml @@ -0,0 +1,21 @@ +Abstract: Аннотація +Appendix: Приложеніе +Author: Именной указатель +Bibliography: Библіографія +Cc: исх. +Chapter: Глава +Contents: Оглавленіе +Encl: вкл. +Figure: Рис. +Index: Предмѣтный указатель +ListOfFigures: Списокъ иллюстрацій +ListOfTables: Списокъ таблицъ +Page: с. +Part: Часть +Preface: Предисловіе +Proof: Доказательство +References: Примѣчанія +See: см. +SeeAlso: см. также +Table: Таблица +To: вх. diff --git a/data/translations/sk.yaml b/data/translations/sk.yaml new file mode 100644 index 0000000..b07212f --- /dev/null +++ b/data/translations/sk.yaml @@ -0,0 +1,21 @@ +Abstract: Abstrakt +Appendix: Dodatok +Bibliography: Literatúra +Cc: cc. +Chapter: Kapitola +Contents: Obsah +Encl: Prílohy +Figure: Obrázok +Glossary: Slovník +Index: Index +ListOfFigures: Zoznam obrázkov +ListOfTables: Zoznam tabuliek +Page: Strana +Part: Časť +Preface: Úvod +Proof: Dôkaz +References: Referencie +See: viď +SeeAlso: viď tiež +Table: Tabuľka +To: Pre diff --git a/data/translations/sl.yaml b/data/translations/sl.yaml new file mode 100644 index 0000000..3e735df --- /dev/null +++ b/data/translations/sl.yaml @@ -0,0 +1,21 @@ +Abstract: Povzetek +Appendix: Dodatek +Bibliography: Literatura +Cc: Kopije +Chapter: Poglavje +Contents: Kazalo +Encl: Priloge +Figure: Slika +Glossary: Slovar +Index: Stvarno kazalo +ListOfFigures: Slike +ListOfTables: Tabele +Page: Stran +Part: Del +Preface: Predgovor +Proof: Dokaz +References: Literatura +See: glej +SeeAlso: glej tudi +Table: Tabela +To: Prejme diff --git a/data/translations/sq.yaml b/data/translations/sq.yaml new file mode 100644 index 0000000..e864748 --- /dev/null +++ b/data/translations/sq.yaml @@ -0,0 +1,18 @@ +Abstract: Përmbledhja +Appendix: Shtesa +Bibliography: Bibliografia +Chapter: Kapitulli +Contents: Përmbajta +Figure: Figura +Glossary: Përhasja e Fjalëve +Index: Indeksi +ListOfFigures: Figurat +ListOfTables: Tabelat +Page: Faqe +Part: Pjesa +Preface: Parathenia +Proof: Vërtetim +References: Referencat +See: shiko +SeeAlso: shiko dhe +Table: Tabela diff --git a/data/translations/sr-cyrl.yaml b/data/translations/sr-cyrl.yaml new file mode 100644 index 0000000..3ce57dd --- /dev/null +++ b/data/translations/sr-cyrl.yaml @@ -0,0 +1,21 @@ +Abstract: Сажетак +Appendix: Додатак +Bibliography: Литература +Cc: Копије +Chapter: Глава +Contents: Садржај +Encl: Прилози +Figure: Слика +Glossary: Речник непознатих речи +Index: Регистар +ListOfFigures: Списак слика +ListOfTables: Списак табела +Page: Страна +Part: Део +Preface: Предговор +Proof: Доказ +References: Библиографија +See: Види +SeeAlso: Види такође +Table: Табела +To: Прима diff --git a/data/translations/sr.yaml b/data/translations/sr.yaml new file mode 100644 index 0000000..461d463 --- /dev/null +++ b/data/translations/sr.yaml @@ -0,0 +1,21 @@ +Abstract: Sažetak +Appendix: Dodatak +Bibliography: Literatura +Cc: Kopije +Chapter: Glava +Contents: Sadržaj +Encl: Prilozi +Figure: Slika +Glossary: Rečnik nepoznatih reči +Index: Registar +ListOfFigures: Spisak slika +ListOfTables: Spisak tabela +Page: Strana +Part: Deo +Preface: Predgovor +Proof: Dokaz +References: Bibliografija +See: Vidi +SeeAlso: Vidi takođe +Table: Tabela +To: Prima diff --git a/data/translations/sv.yaml b/data/translations/sv.yaml new file mode 100644 index 0000000..af18346 --- /dev/null +++ b/data/translations/sv.yaml @@ -0,0 +1,21 @@ +Abstract: Sammanfattning +Appendix: Bilaga +Bibliography: Litteraturförteckning +Cc: Kopia för kännedom +Chapter: Kapitel +Contents: Innehåll +Encl: Bil. +Figure: Figur +Glossary: Ordlista +Index: Sakregister +ListOfFigures: Figurer +ListOfTables: Tabeller +Page: Sida +Part: Del +Preface: Förord +Proof: Bevis +References: Referenser +See: se +SeeAlso: se även +Table: Tabell +To: Till diff --git a/data/translations/th.yaml b/data/translations/th.yaml new file mode 100644 index 0000000..f8443f6 --- /dev/null +++ b/data/translations/th.yaml @@ -0,0 +1,20 @@ +Abstract: บทคัดย่อ +Appendix: ภาคผนวก +Bibliography: บรรณานุกรม +Cc: สำเนาถึง +Chapter: บทที่ +Contents: สารบัญ +Encl: สิ่งที่แนบมาด้วย +Figure: รูปที่ +Index: ดรรชนี +ListOfFigures: สารบัญรูป +ListOfTables: สารบัญตาราง +Page: หน้า +Part: ภาค +Preface: คำนำ +Proof: พิสูจน์ +References: หนังสืออ้างอิง +See: ดู +SeeAlso: ดูเพิ่มเติม +Table: ตารางที่ +To: เรียน diff --git a/data/translations/tr.yaml b/data/translations/tr.yaml new file mode 100644 index 0000000..6275a98 --- /dev/null +++ b/data/translations/tr.yaml @@ -0,0 +1,22 @@ +Abstract: Özet +Appendix: Ek +Bibliography: Kaynakça +Cc: Diğer Alıcılar +Chapter: Bölüm +Contents: İçindekiler +Encl: İlişik +Figure: Şekil +Glossary: Lügatçe +Index: Dizin +ListOfFigures: Şekil Listesi +ListOfTables: Tablo Listesi +Page: Sayfa +Part: Kısım +Preface: Önsöz +Proof: Kanıt +References: Kaynaklar +See: bkz. +SeeAlso: ayrıca bkz. +Subject: İlgili +Table: Tablo +To: Alıcı diff --git a/data/translations/uk.yaml b/data/translations/uk.yaml new file mode 100644 index 0000000..69b7b56 --- /dev/null +++ b/data/translations/uk.yaml @@ -0,0 +1,22 @@ +Abstract: Анотація +Appendix: Додаток +Author: Іменний покажчик}% babel has "Їменний покажчик" +Bibliography: Бібліоґрафія +Cc: копія +Chapter: Розділ +Contents: Зміст +Encl: вкладка +Figure: Рис. +Glossary: Словник термінів +Index: Покажчик +ListOfFigures: Перелік ілюстрацій +ListOfTables: Перелік таблиць +Page: с. +Part: Частина +Preface: Вступ +Proof: Доведення +References: Література +See: див. +SeeAlso: див. також +Table: Табл. +To: До diff --git a/data/translations/ur.yaml b/data/translations/ur.yaml new file mode 100644 index 0000000..991e69f --- /dev/null +++ b/data/translations/ur.yaml @@ -0,0 +1,22 @@ +Abstract: ﻢﻠﺨّﺻ +Appendix: ﺾﻣیﻡہ +Bibliography: کﺕﺎﺑیﺎﺗ +Cc: ﻦﻘﻟ +Chapter: ﺏﺎﺑ +Contents: ﻑہﺮﺴﺗ ﻊﻧﻭﺎﻧﺎﺗ +Encl: ﻢﻨﺴﻟک +Figure: ﺶﻜﻟ +Glossary: ﻞﻐﺗ +Index: ﺎﺷﺍﺭیہ +ListOfFigures: ﻑہﺮﺴﺗ ﺎﺷکﺎﻟ +ListOfTables: ﻑہﺮﺴﺗ ﺝﺩﺍﻮﻟ +Page: ﺺﻔﺣہ +Part: ﺢﺻّہ +Preface: ﺩیﺏﺍچہ +Proof: ﺚﺑﻮﺗ +References: ﺡﻭﺎﻟہ ﺝﺎﺗ +Section: ﻒﺼﻟ +See: ﻡﻼﺤﻇہ ہﻭ +SeeAlso: ﺍیﺽﺍً +Table: ﺝﺩﻮﻟ +To: ﺐﻣﻼﺤﻇہ diff --git a/data/translations/vi.yaml b/data/translations/vi.yaml new file mode 100644 index 0000000..ee8dfb7 --- /dev/null +++ b/data/translations/vi.yaml @@ -0,0 +1,21 @@ +Abstract: Tóm tắt nội dung +Also: Xem thêm +Appendix: Phụ lục +Bib: Tài liệu tham khảo +Cc: Cùng gửi +Chapter: Chương +Contents: Mục lục +Encl: Kèm theo +Figure: Hình +Glossary: Từ điển chú giải +Headto: Gửi +Index: Chỉ mục +Listfigure: Danh sách hình vẽ +Listtable: Danh sách bẳng +Page: Trang +Part: Phần +Preface: Lời nói đầu +Proof: Chứng minh +References: Tài liệu +See: Xem +Table: Bẳng diff --git a/man/manfilter.lua b/man/manfilter.lua new file mode 100644 index 0000000..c6bbd02 --- /dev/null +++ b/man/manfilter.lua @@ -0,0 +1,22 @@ +-- we use preloaded text to get a UTF-8 aware 'upper' function +local text = require('text') + +-- capitalize level 1 headers +function Header(el) + if el.level == 1 then + return pandoc.walk_block(el, { + Str = function(el) + return pandoc.Str(text.upper(el.text)) + end }) + end +end + +-- replace links with link text +function Link(el) + return el.content +end + +-- remove notes +function Note(el) + return {} +end diff --git a/man/pandoc.1 b/man/pandoc.1 new file mode 100644 index 0000000..ba809e7 --- /dev/null +++ b/man/pandoc.1 @@ -0,0 +1,5596 @@ +.\"t +.TH PANDOC 1 "December 27, 2017" "pandoc 2.0.6" +.SH NAME +pandoc - general markup converter +.SH SYNOPSIS +.PP +\f[C]pandoc\f[] [\f[I]options\f[]] [\f[I]input\-file\f[]]... +.SH DESCRIPTION +.PP +Pandoc is a Haskell library for converting from one markup format to +another, and a command\-line tool that uses this library. +It can read Markdown, CommonMark, PHP Markdown Extra, GitHub\-Flavored +Markdown, MultiMarkdown, and (subsets of) Textile, reStructuredText, +HTML, LaTeX, MediaWiki markup, TWiki markup, TikiWiki markup, Creole +1.0, Haddock markup, OPML, Emacs Org mode, DocBook, JATS, Muse, +txt2tags, Vimwiki, EPUB, ODT, and Word docx; and it can write plain +text, Markdown, CommonMark, PHP Markdown Extra, GitHub\-Flavored +Markdown, MultiMarkdown, reStructuredText, XHTML, HTML5, LaTeX +(including \f[C]beamer\f[] slide shows), ConTeXt, RTF, OPML, DocBook, +JATS, OpenDocument, ODT, Word docx, GNU Texinfo, MediaWiki markup, +DokuWiki markup, ZimWiki markup, Haddock markup, EPUB (v2 or v3), +FictionBook2, Textile, groff man, groff ms, Emacs Org mode, AsciiDoc, +InDesign ICML, TEI Simple, Muse, PowerPoint slide shows and Slidy, +Slideous, DZSlides, reveal.js or S5 HTML slide shows. +It can also produce PDF output on systems where LaTeX, ConTeXt, +\f[C]pdfroff\f[], \f[C]wkhtmltopdf\f[], \f[C]prince\f[], or +\f[C]weasyprint\f[] is installed. +.PP +Pandoc\[aq]s enhanced version of Markdown includes syntax for footnotes, +tables, flexible ordered lists, definition lists, fenced code blocks, +superscripts and subscripts, strikeout, metadata blocks, automatic +tables of contents, embedded LaTeX math, citations, and Markdown inside +HTML block elements. +(These enhancements, described further under Pandoc\[aq]s Markdown, can +be disabled using the \f[C]markdown_strict\f[] input or output format.) +.PP +In contrast to most existing tools for converting Markdown to HTML, +which use regex substitutions, pandoc has a modular design: it consists +of a set of readers, which parse text in a given format and produce a +native representation of the document, and a set of writers, which +convert this native representation into a target format. +Thus, adding an input or output format requires only adding a reader or +writer. +.PP +Because pandoc\[aq]s intermediate representation of a document is less +expressive than many of the formats it converts between, one should not +expect perfect conversions between every format and every other. +Pandoc attempts to preserve the structural elements of a document, but +not formatting details such as margin size. +And some document elements, such as complex tables, may not fit into +pandoc\[aq]s simple document model. +While conversions from pandoc\[aq]s Markdown to all formats aspire to be +perfect, conversions from formats more expressive than pandoc\[aq]s +Markdown can be expected to be lossy. +.SS Using \f[C]pandoc\f[] +.PP +If no \f[I]input\-file\f[] is specified, input is read from +\f[I]stdin\f[]. +Otherwise, the \f[I]input\-files\f[] are concatenated (with a blank line +between each) and used as input. +Output goes to \f[I]stdout\f[] by default (though output to the terminal +is disabled for the \f[C]odt\f[], \f[C]docx\f[], \f[C]epub2\f[], and +\f[C]epub3\f[] output formats, unless it is forced using +\f[C]\-o\ \-\f[]). +For output to a file, use the \f[C]\-o\f[] option: +.IP +.nf +\f[C] +pandoc\ \-o\ output.html\ input.txt +\f[] +.fi +.PP +By default, pandoc produces a document fragment, not a standalone +document with a proper header and footer. +To produce a standalone document, use the \f[C]\-s\f[] or +\f[C]\-\-standalone\f[] flag: +.IP +.nf +\f[C] +pandoc\ \-s\ \-o\ output.html\ input.txt +\f[] +.fi +.PP +For more information on how standalone documents are produced, see +Templates, below. +.PP +Instead of a file, an absolute URI may be given. +In this case pandoc will fetch the content using HTTP: +.IP +.nf +\f[C] +pandoc\ \-f\ html\ \-t\ markdown\ http://www.fsf.org +\f[] +.fi +.PP +It is possible to supply a custom User\-Agent string or other header +when requesting a document from a URL: +.IP +.nf +\f[C] +pandoc\ \-f\ html\ \-t\ markdown\ \-\-request\-header\ User\-Agent:"Mozilla/5.0"\ \\ +\ \ http://www.fsf.org +\f[] +.fi +.PP +If multiple input files are given, \f[C]pandoc\f[] will concatenate them +all (with blank lines between them) before parsing. +This feature is disabled for binary input formats such as \f[C]EPUB\f[], +\f[C]odt\f[], and \f[C]docx\f[]. +.PP +The format of the input and output can be specified explicitly using +command\-line options. +The input format can be specified using the \f[C]\-r/\-\-read\f[] or +\f[C]\-f/\-\-from\f[] options, the output format using the +\f[C]\-w/\-\-write\f[] or \f[C]\-t/\-\-to\f[] options. +Thus, to convert \f[C]hello.txt\f[] from Markdown to LaTeX, you could +type: +.IP +.nf +\f[C] +pandoc\ \-f\ markdown\ \-t\ latex\ hello.txt +\f[] +.fi +.PP +To convert \f[C]hello.html\f[] from HTML to Markdown: +.IP +.nf +\f[C] +pandoc\ \-f\ html\ \-t\ markdown\ hello.html +\f[] +.fi +.PP +Supported output formats are listed below under the \f[C]\-t/\-\-to\f[] +option. +Supported input formats are listed below under the \f[C]\-f/\-\-from\f[] +option. +Note that the \f[C]rst\f[], \f[C]textile\f[], \f[C]latex\f[], and +\f[C]html\f[] readers are not complete; there are some constructs that +they do not parse. +.PP +If the input or output format is not specified explicitly, +\f[C]pandoc\f[] will attempt to guess it from the extensions of the +input and output filenames. +Thus, for example, +.IP +.nf +\f[C] +pandoc\ \-o\ hello.tex\ hello.txt +\f[] +.fi +.PP +will convert \f[C]hello.txt\f[] from Markdown to LaTeX. +If no output file is specified (so that output goes to \f[I]stdout\f[]), +or if the output file\[aq]s extension is unknown, the output format will +default to HTML. +If no input file is specified (so that input comes from \f[I]stdin\f[]), +or if the input files\[aq] extensions are unknown, the input format will +be assumed to be Markdown unless explicitly specified. +.PP +Pandoc uses the UTF\-8 character encoding for both input and output. +If your local character encoding is not UTF\-8, you should pipe input +and output through \f[C]iconv\f[]: +.IP +.nf +\f[C] +iconv\ \-t\ utf\-8\ input.txt\ |\ pandoc\ |\ iconv\ \-f\ utf\-8 +\f[] +.fi +.PP +Note that in some output formats (such as HTML, LaTeX, ConTeXt, RTF, +OPML, DocBook, and Texinfo), information about the character encoding is +included in the document header, which will only be included if you use +the \f[C]\-s/\-\-standalone\f[] option. +.SS Creating a PDF +.PP +To produce a PDF, specify an output file with a \f[C]\&.pdf\f[] +extension. +By default, pandoc will use LaTeX to create the PDF: +.IP +.nf +\f[C] +pandoc\ test.txt\ \-o\ test.pdf +\f[] +.fi +.PP +Production of a PDF requires that a LaTeX engine be installed (see +\f[C]\-\-pdf\-engine\f[], below), and assumes that the following LaTeX +packages are available: \f[C]amsfonts\f[], \f[C]amsmath\f[], +\f[C]lm\f[], \f[C]unicode\-math\f[], \f[C]ifxetex\f[], +\f[C]ifluatex\f[], \f[C]listings\f[] (if the \f[C]\-\-listings\f[] +option is used), \f[C]fancyvrb\f[], \f[C]longtable\f[], +\f[C]booktabs\f[], \f[C]graphicx\f[] and \f[C]grffile\f[] (if the +document contains images), \f[C]hyperref\f[], \f[C]xcolor\f[] (with +\f[C]colorlinks\f[]), \f[C]ulem\f[], \f[C]geometry\f[] (with the +\f[C]geometry\f[] variable set), \f[C]setspace\f[] (with +\f[C]linestretch\f[]), and \f[C]babel\f[] (with \f[C]lang\f[]). +The use of \f[C]xelatex\f[] or \f[C]lualatex\f[] as the LaTeX engine +requires \f[C]fontspec\f[]. +\f[C]xelatex\f[] uses \f[C]polyglossia\f[] (with \f[C]lang\f[]), +\f[C]xecjk\f[], and \f[C]bidi\f[] (with the \f[C]dir\f[] variable set). +If the \f[C]mathspec\f[] variable is set, \f[C]xelatex\f[] will use +\f[C]mathspec\f[] instead of \f[C]unicode\-math\f[]. +The \f[C]upquote\f[] and \f[C]microtype\f[] packages are used if +available, and \f[C]csquotes\f[] will be used for typography if added to +the template or included in any header file. +The \f[C]natbib\f[], \f[C]biblatex\f[], \f[C]bibtex\f[], and +\f[C]biber\f[] packages can optionally be used for citation rendering. +These are included with all recent versions of TeX Live. +.PP +Alternatively, pandoc can use ConTeXt, \f[C]pdfroff\f[], or any of the +following HTML/CSS\-to\-PDF\-engines, to create a PDF: +\f[C]wkhtmltopdf\f[], \f[C]weasyprint\f[] or \f[C]prince\f[]. +To do this, specify an output file with a \f[C]\&.pdf\f[] extension, as +before, but add the \f[C]\-\-pdf\-engine\f[] option or +\f[C]\-t\ context\f[], \f[C]\-t\ html\f[], or \f[C]\-t\ ms\f[] to the +command line (\f[C]\-t\ html\f[] defaults to +\f[C]\-\-pdf\-engine=wkhtmltopdf\f[]). +.PP +PDF output can be controlled using variables for LaTeX (if LaTeX is +used) and variables for ConTeXt (if ConTeXt is used). +When using an HTML/CSS\-to\-PDF\-engine, \f[C]\-\-css\f[] affects the +output. +If \f[C]wkhtmltopdf\f[] is used, then the variables +\f[C]margin\-left\f[], \f[C]margin\-right\f[], \f[C]margin\-top\f[], +\f[C]margin\-bottom\f[], and \f[C]papersize\f[] will affect the output. +.SH OPTIONS +.SS General options +.TP +.B \f[C]\-f\f[] \f[I]FORMAT\f[], \f[C]\-r\f[] \f[I]FORMAT\f[], \f[C]\-\-from=\f[]\f[I]FORMAT\f[], \f[C]\-\-read=\f[]\f[I]FORMAT\f[] +Specify input format. +\f[I]FORMAT\f[] can be \f[C]native\f[] (native Haskell), \f[C]json\f[] +(JSON version of native AST), \f[C]markdown\f[] (pandoc\[aq]s extended +Markdown), \f[C]markdown_strict\f[] (original unextended Markdown), +\f[C]markdown_phpextra\f[] (PHP Markdown Extra), \f[C]markdown_mmd\f[] +(MultiMarkdown), \f[C]gfm\f[] (GitHub\-Flavored Markdown), +\f[C]commonmark\f[] (CommonMark Markdown), \f[C]textile\f[] (Textile), +\f[C]rst\f[] (reStructuredText), \f[C]html\f[] (HTML), \f[C]docbook\f[] +(DocBook), \f[C]t2t\f[] (txt2tags), \f[C]docx\f[] (docx), \f[C]odt\f[] +(ODT), \f[C]epub\f[] (EPUB), \f[C]opml\f[] (OPML), \f[C]org\f[] (Emacs +Org mode), \f[C]mediawiki\f[] (MediaWiki markup), \f[C]twiki\f[] (TWiki +markup), \f[C]tikiwiki\f[] (TikiWiki markup), \f[C]creole\f[] (Creole +1.0), \f[C]haddock\f[] (Haddock markup), or \f[C]latex\f[] (LaTeX). +(\f[C]markdown_github\f[] provides deprecated and less accurate support +for Github\-Flavored Markdown; please use \f[C]gfm\f[] instead, unless +you need to use extensions other than \f[C]smart\f[].) Extensions can be +individually enabled or disabled by appending \f[C]+EXTENSION\f[] or +\f[C]\-EXTENSION\f[] to the format name. +See Extensions below, for a list of extensions and their names. +See \f[C]\-\-list\-input\-formats\f[] and \f[C]\-\-list\-extensions\f[], +below. +.RS +.RE +.TP +.B \f[C]\-t\f[] \f[I]FORMAT\f[], \f[C]\-w\f[] \f[I]FORMAT\f[], \f[C]\-\-to=\f[]\f[I]FORMAT\f[], \f[C]\-\-write=\f[]\f[I]FORMAT\f[] +Specify output format. +\f[I]FORMAT\f[] can be \f[C]native\f[] (native Haskell), \f[C]json\f[] +(JSON version of native AST), \f[C]plain\f[] (plain text), +\f[C]markdown\f[] (pandoc\[aq]s extended Markdown), +\f[C]markdown_strict\f[] (original unextended Markdown), +\f[C]markdown_phpextra\f[] (PHP Markdown Extra), \f[C]markdown_mmd\f[] +(MultiMarkdown), \f[C]gfm\f[] (GitHub\-Flavored Markdown), +\f[C]commonmark\f[] (CommonMark Markdown), \f[C]rst\f[] +(reStructuredText), \f[C]html4\f[] (XHTML 1.0 Transitional), +\f[C]html\f[] or \f[C]html5\f[] (HTML5/XHTML polyglot markup), +\f[C]latex\f[] (LaTeX), \f[C]beamer\f[] (LaTeX beamer slide show), +\f[C]context\f[] (ConTeXt), \f[C]man\f[] (groff man), \f[C]mediawiki\f[] +(MediaWiki markup), \f[C]dokuwiki\f[] (DokuWiki markup), +\f[C]zimwiki\f[] (ZimWiki markup), \f[C]textile\f[] (Textile), +\f[C]org\f[] (Emacs Org mode), \f[C]texinfo\f[] (GNU Texinfo), +\f[C]opml\f[] (OPML), \f[C]docbook\f[] or \f[C]docbook4\f[] (DocBook 4), +\f[C]docbook5\f[] (DocBook 5), \f[C]jats\f[] (JATS XML), +\f[C]opendocument\f[] (OpenDocument), \f[C]odt\f[] (OpenOffice text +document), \f[C]docx\f[] (Word docx), \f[C]haddock\f[] (Haddock markup), +\f[C]rtf\f[] (rich text format), \f[C]epub2\f[] (EPUB v2 book), +\f[C]epub\f[] or \f[C]epub3\f[] (EPUB v3), \f[C]fb2\f[] (FictionBook2 +e\-book), \f[C]asciidoc\f[] (AsciiDoc), \f[C]icml\f[] (InDesign ICML), +\f[C]tei\f[] (TEI Simple), \f[C]slidy\f[] (Slidy HTML and JavaScript +slide show), \f[C]slideous\f[] (Slideous HTML and JavaScript slide +show), \f[C]dzslides\f[] (DZSlides HTML5 + JavaScript slide show), +\f[C]revealjs\f[] (reveal.js HTML5 + JavaScript slide show), \f[C]s5\f[] +(S5 HTML and JavaScript slide show), \f[C]pptx\f[] (PowerPoint slide +show) or the path of a custom lua writer (see Custom writers, below). +(\f[C]markdown_github\f[] provides deprecated and less accurate support +for Github\-Flavored Markdown; please use \f[C]gfm\f[] instead, unless +you use extensions that do not work with \f[C]gfm\f[].) Note that +\f[C]odt\f[], \f[C]epub\f[], and \f[C]epub3\f[] output will not be +directed to \f[I]stdout\f[]; an output filename must be specified using +the \f[C]\-o/\-\-output\f[] option. +Extensions can be individually enabled or disabled by appending +\f[C]+EXTENSION\f[] or \f[C]\-EXTENSION\f[] to the format name. +See Extensions below, for a list of extensions and their names. +See \f[C]\-\-list\-output\-formats\f[] and +\f[C]\-\-list\-extensions\f[], below. +.RS +.RE +.TP +.B \f[C]\-o\f[] \f[I]FILE\f[], \f[C]\-\-output=\f[]\f[I]FILE\f[] +Write output to \f[I]FILE\f[] instead of \f[I]stdout\f[]. +If \f[I]FILE\f[] is \f[C]\-\f[], output will go to \f[I]stdout\f[], even +if a non\-textual format (\f[C]docx\f[], \f[C]odt\f[], \f[C]epub2\f[], +\f[C]epub3\f[]) is specified. +.RS +.RE +.TP +.B \f[C]\-\-data\-dir=\f[]\f[I]DIRECTORY\f[] +Specify the user data directory to search for pandoc data files. +If this option is not specified, the default user data directory will be +used. +This is, in UNIX: +.RS +.IP +.nf +\f[C] +$HOME/.pandoc +\f[] +.fi +.PP +in Windows XP: +.IP +.nf +\f[C] +C:\\Documents\ And\ Settings\\USERNAME\\Application\ Data\\pandoc +\f[] +.fi +.PP +and in Windows Vista or later: +.IP +.nf +\f[C] +C:\\Users\\USERNAME\\AppData\\Roaming\\pandoc +\f[] +.fi +.PP +You can find the default user data directory on your system by looking +at the output of \f[C]pandoc\ \-\-version\f[]. +A \f[C]reference.odt\f[], \f[C]reference.docx\f[], \f[C]epub.css\f[], +\f[C]templates\f[], \f[C]slidy\f[], \f[C]slideous\f[], or \f[C]s5\f[] +directory placed in this directory will override pandoc\[aq]s normal +defaults. +.RE +.TP +.B \f[C]\-\-bash\-completion\f[] +Generate a bash completion script. +To enable bash completion with pandoc, add this to your +\f[C]\&.bashrc\f[]: +.RS +.IP +.nf +\f[C] +\ eval\ "$(pandoc\ \-\-bash\-completion)" +\f[] +.fi +.RE +.TP +.B \f[C]\-\-verbose\f[] +Give verbose debugging output. +Currently this only has an effect with PDF output. +.RS +.RE +.TP +.B \f[C]\-\-quiet\f[] +Suppress warning messages. +.RS +.RE +.TP +.B \f[C]\-\-fail\-if\-warnings\f[] +Exit with error status if there are any warnings. +.RS +.RE +.TP +.B \f[C]\-\-log=\f[]\f[I]FILE\f[] +Write log messages in machine\-readable JSON format to \f[I]FILE\f[]. +All messages above DEBUG level will be written, regardless of verbosity +settings (\f[C]\-\-verbose\f[], \f[C]\-\-quiet\f[]). +.RS +.RE +.TP +.B \f[C]\-\-list\-input\-formats\f[] +List supported input formats, one per line. +.RS +.RE +.TP +.B \f[C]\-\-list\-output\-formats\f[] +List supported output formats, one per line. +.RS +.RE +.TP +.B \f[C]\-\-list\-extensions\f[][\f[C]=\f[]\f[I]FORMAT\f[]] +List supported Markdown extensions, one per line, preceded by a +\f[C]+\f[] or \f[C]\-\f[] indicating whether it is enabled by default in +\f[I]FORMAT\f[]. +If \f[I]FORMAT\f[] is not specified, defaults for pandoc\[aq]s Markdown +are given. +.RS +.RE +.TP +.B \f[C]\-\-list\-highlight\-languages\f[] +List supported languages for syntax highlighting, one per line. +.RS +.RE +.TP +.B \f[C]\-\-list\-highlight\-styles\f[] +List supported styles for syntax highlighting, one per line. +See \f[C]\-\-highlight\-style\f[]. +.RS +.RE +.TP +.B \f[C]\-v\f[], \f[C]\-\-version\f[] +Print version. +.RS +.RE +.TP +.B \f[C]\-h\f[], \f[C]\-\-help\f[] +Show usage message. +.RS +.RE +.SS Reader options +.TP +.B \f[C]\-\-base\-header\-level=\f[]\f[I]NUMBER\f[] +Specify the base level for headers (defaults to 1). +.RS +.RE +.TP +.B \f[C]\-\-strip\-empty\-paragraphs\f[] +\f[I]Deprecated. Use the \f[CI]+empty_paragraphs\f[I] extension +instead.\f[] Ignore paragraphs with no content. +This option is useful for converting word processing documents where +users have used empty paragraphs to create inter\-paragraph space. +.RS +.RE +.TP +.B \f[C]\-\-indented\-code\-classes=\f[]\f[I]CLASSES\f[] +Specify classes to use for indented code blocks\-\-for example, +\f[C]perl,numberLines\f[] or \f[C]haskell\f[]. +Multiple classes may be separated by spaces or commas. +.RS +.RE +.TP +.B \f[C]\-\-default\-image\-extension=\f[]\f[I]EXTENSION\f[] +Specify a default extension to use when image paths/URLs have no +extension. +This allows you to use the same source for formats that require +different kinds of images. +Currently this option only affects the Markdown and LaTeX readers. +.RS +.RE +.TP +.B \f[C]\-\-file\-scope\f[] +Parse each file individually before combining for multifile documents. +This will allow footnotes in different files with the same identifiers +to work as expected. +If this option is set, footnotes and links will not work across files. +Reading binary files (docx, odt, epub) implies \f[C]\-\-file\-scope\f[]. +.RS +.RE +.TP +.B \f[C]\-\-filter=\f[]\f[I]PROGRAM\f[] +Specify an executable to be used as a filter transforming the pandoc AST +after the input is parsed and before the output is written. +The executable should read JSON from stdin and write JSON to stdout. +The JSON must be formatted like pandoc\[aq]s own JSON input and output. +The name of the output format will be passed to the filter as the first +argument. +Hence, +.RS +.IP +.nf +\f[C] +pandoc\ \-\-filter\ ./caps.py\ \-t\ latex +\f[] +.fi +.PP +is equivalent to +.IP +.nf +\f[C] +pandoc\ \-t\ json\ |\ ./caps.py\ latex\ |\ pandoc\ \-f\ json\ \-t\ latex +\f[] +.fi +.PP +The latter form may be useful for debugging filters. +.PP +Filters may be written in any language. +\f[C]Text.Pandoc.JSON\f[] exports \f[C]toJSONFilter\f[] to facilitate +writing filters in Haskell. +Those who would prefer to write filters in python can use the module +\f[C]pandocfilters\f[], installable from PyPI. +There are also pandoc filter libraries in PHP, perl, and +JavaScript/node.js. +.PP +In order of preference, pandoc will look for filters in +.IP "1." 3 +a specified full or relative path (executable or non\-executable) +.IP "2." 3 +\f[C]$DATADIR/filters\f[] (executable or non\-executable) where +\f[C]$DATADIR\f[] is the user data directory (see +\f[C]\-\-data\-dir\f[], above). +.IP "3." 3 +\f[C]$PATH\f[] (executable only) +.RE +.TP +.B \f[C]\-\-lua\-filter=\f[]\f[I]SCRIPT\f[] +Transform the document in a similar fashion as JSON filters (see +\f[C]\-\-filter\f[]), but use pandoc\[aq]s build\-in lua filtering +system. +The given lua script is expected to return a list of lua filters which +will be applied in order. +Each lua filter must contain element\-transforming functions indexed by +the name of the AST element on which the filter function should be +applied. +.RS +.PP +The \f[C]pandoc\f[] lua module provides helper functions for element +creation. +It is always loaded into the script\[aq]s lua environment. +.PP +The following is an example lua script for macro\-expansion: +.IP +.nf +\f[C] +function\ expand_hello_world(inline) +\ \ if\ inline.c\ ==\ \[aq]{{helloworld}}\[aq]\ then +\ \ \ \ return\ pandoc.Emph{\ pandoc.Str\ "Hello,\ World"\ } +\ \ else +\ \ \ \ return\ inline +\ \ end +end + +return\ {{Str\ =\ expand_hello_world}} +\f[] +.fi +.RE +.TP +.B \f[C]\-M\f[] \f[I]KEY\f[][\f[C]=\f[]\f[I]VAL\f[]], \f[C]\-\-metadata=\f[]\f[I]KEY\f[][\f[C]:\f[]\f[I]VAL\f[]] +Set the metadata field \f[I]KEY\f[] to the value \f[I]VAL\f[]. +A value specified on the command line overrides a value specified in the +document. +Values will be parsed as YAML boolean or string values. +If no value is specified, the value will be treated as Boolean true. +Like \f[C]\-\-variable\f[], \f[C]\-\-metadata\f[] causes template +variables to be set. +But unlike \f[C]\-\-variable\f[], \f[C]\-\-metadata\f[] affects the +metadata of the underlying document (which is accessible from filters +and may be printed in some output formats). +.RS +.RE +.TP +.B \f[C]\-p\f[], \f[C]\-\-preserve\-tabs\f[] +Preserve tabs instead of converting them to spaces (the default). +Note that this will only affect tabs in literal code spans and code +blocks; tabs in regular text will be treated as spaces. +.RS +.RE +.TP +.B \f[C]\-\-tab\-stop=\f[]\f[I]NUMBER\f[] +Specify the number of spaces per tab (default is 4). +.RS +.RE +.TP +.B \f[C]\-\-track\-changes=accept\f[]|\f[C]reject\f[]|\f[C]all\f[] +Specifies what to do with insertions, deletions, and comments produced +by the MS Word "Track Changes" feature. +\f[C]accept\f[] (the default), inserts all insertions, and ignores all +deletions. +\f[C]reject\f[] inserts all deletions and ignores insertions. +Both \f[C]accept\f[] and \f[C]reject\f[] ignore comments. +\f[C]all\f[] puts in insertions, deletions, and comments, wrapped in +spans with \f[C]insertion\f[], \f[C]deletion\f[], +\f[C]comment\-start\f[], and \f[C]comment\-end\f[] classes, +respectively. +The author and time of change is included. +\f[C]all\f[] is useful for scripting: only accepting changes from a +certain reviewer, say, or before a certain date. +This option only affects the docx reader. +.RS +.RE +.TP +.B \f[C]\-\-extract\-media=\f[]\f[I]DIR\f[] +Extract images and other media contained in or linked from the source +document to the path \f[I]DIR\f[], creating it if necessary, and adjust +the images references in the document so they point to the extracted +files. +If the source format is a binary container (docx, epub, or odt), the +media is extracted from the container and the original filenames are +used. +Otherwise the media is read from the file system or downloaded, and new +filenames are constructed based on SHA1 hashes of the contents. +.RS +.RE +.TP +.B \f[C]\-\-abbreviations=\f[]\f[I]FILE\f[] +Specifies a custom abbreviations file, with abbreviations one to a line. +If this option is not specified, pandoc will read the data file +\f[C]abbreviations\f[] from the user data directory or fall back on a +system default. +To see the system default, use +\f[C]pandoc\ \-\-print\-default\-data\-file=abbreviations\f[]. +The only use pandoc makes of this list is in the Markdown reader. +Strings ending in a period that are found in this list will be followed +by a nonbreaking space, so that the period will not produce +sentence\-ending space in formats like LaTeX. +.RS +.RE +.SS General writer options +.TP +.B \f[C]\-s\f[], \f[C]\-\-standalone\f[] +Produce output with an appropriate header and footer (e.g. +a standalone HTML, LaTeX, TEI, or RTF file, not a fragment). +This option is set automatically for \f[C]pdf\f[], \f[C]epub\f[], +\f[C]epub3\f[], \f[C]fb2\f[], \f[C]docx\f[], and \f[C]odt\f[] output. +.RS +.RE +.TP +.B \f[C]\-\-template=\f[]\f[I]FILE\f[] +Use \f[I]FILE\f[] as a custom template for the generated document. +Implies \f[C]\-\-standalone\f[]. +See Templates, below, for a description of template syntax. +If no extension is specified, an extension corresponding to the writer +will be added, so that \f[C]\-\-template=special\f[] looks for +\f[C]special.html\f[] for HTML output. +If the template is not found, pandoc will search for it in the +\f[C]templates\f[] subdirectory of the user data directory (see +\f[C]\-\-data\-dir\f[]). +If this option is not used, a default template appropriate for the +output format will be used (see +\f[C]\-D/\-\-print\-default\-template\f[]). +.RS +.RE +.TP +.B \f[C]\-V\f[] \f[I]KEY\f[][\f[C]=\f[]\f[I]VAL\f[]], \f[C]\-\-variable=\f[]\f[I]KEY\f[][\f[C]:\f[]\f[I]VAL\f[]] +Set the template variable \f[I]KEY\f[] to the value \f[I]VAL\f[] when +rendering the document in standalone mode. +This is generally only useful when the \f[C]\-\-template\f[] option is +used to specify a custom template, since pandoc automatically sets the +variables used in the default templates. +If no \f[I]VAL\f[] is specified, the key will be given the value +\f[C]true\f[]. +.RS +.RE +.TP +.B \f[C]\-D\f[] \f[I]FORMAT\f[], \f[C]\-\-print\-default\-template=\f[]\f[I]FORMAT\f[] +Print the system default template for an output \f[I]FORMAT\f[]. +(See \f[C]\-t\f[] for a list of possible \f[I]FORMAT\f[]s.) Templates in +the user data directory are ignored. +.RS +.RE +.TP +.B \f[C]\-\-print\-default\-data\-file=\f[]\f[I]FILE\f[] +Print a system default data file. +Files in the user data directory are ignored. +.RS +.RE +.TP +.B \f[C]\-\-eol=crlf\f[]|\f[C]lf\f[]|\f[C]native\f[] +Manually specify line endings: \f[C]crlf\f[] (Windows), \f[C]lf\f[] +(macOS/Linux/UNIX), or \f[C]native\f[] (line endings appropriate to the +OS on which pandoc is being run). +The default is \f[C]native\f[]. +.RS +.RE +.TP +.B \f[C]\-\-dpi\f[]=\f[I]NUMBER\f[] +Specify the dpi (dots per inch) value for conversion from pixels to +inch/centimeters and vice versa. +The default is 96dpi. +Technically, the correct term would be ppi (pixels per inch). +.RS +.RE +.TP +.B \f[C]\-\-wrap=auto\f[]|\f[C]none\f[]|\f[C]preserve\f[] +Determine how text is wrapped in the output (the source code, not the +rendered version). +With \f[C]auto\f[] (the default), pandoc will attempt to wrap lines to +the column width specified by \f[C]\-\-columns\f[] (default 72). +With \f[C]none\f[], pandoc will not wrap lines at all. +With \f[C]preserve\f[], pandoc will attempt to preserve the wrapping +from the source document (that is, where there are nonsemantic newlines +in the source, there will be nonsemantic newlines in the output as +well). +Automatic wrapping does not currently work in HTML output. +.RS +.RE +.TP +.B \f[C]\-\-columns=\f[]\f[I]NUMBER\f[] +Specify length of lines in characters. +This affects text wrapping in the generated source code (see +\f[C]\-\-wrap\f[]). +It also affects calculation of column widths for plain text tables (see +Tables below). +.RS +.RE +.TP +.B \f[C]\-\-toc\f[], \f[C]\-\-table\-of\-contents\f[] +Include an automatically generated table of contents (or, in the case of +\f[C]latex\f[], \f[C]context\f[], \f[C]docx\f[], \f[C]odt\f[], +\f[C]opendocument\f[], \f[C]rst\f[], or \f[C]ms\f[], an instruction to +create one) in the output document. +This option has no effect on \f[C]man\f[], \f[C]docbook4\f[], +\f[C]docbook5\f[], or \f[C]jats\f[] output. +.RS +.RE +.TP +.B \f[C]\-\-toc\-depth=\f[]\f[I]NUMBER\f[] +Specify the number of section levels to include in the table of +contents. +The default is 3 (which means that level 1, 2, and 3 headers will be +listed in the contents). +.RS +.RE +.TP +.B \f[C]\-\-strip\-comments\f[] +Strip out HTML comments in the Markdown or Textile source, rather than +passing them on to Markdown, Textile or HTML output as raw HTML. +This does not apply to HTML comments inside raw HTML blocks when the +\f[C]markdown_in_html_blocks\f[] extension is not set. +.RS +.RE +.TP +.B \f[C]\-\-no\-highlight\f[] +Disables syntax highlighting for code blocks and inlines, even when a +language attribute is given. +.RS +.RE +.TP +.B \f[C]\-\-highlight\-style=\f[]\f[I]STYLE\f[]|\f[I]FILE\f[] +Specifies the coloring style to be used in highlighted source code. +Options are \f[C]pygments\f[] (the default), \f[C]kate\f[], +\f[C]monochrome\f[], \f[C]breezeDark\f[], \f[C]espresso\f[], +\f[C]zenburn\f[], \f[C]haddock\f[], and \f[C]tango\f[]. +For more information on syntax highlighting in pandoc, see Syntax +highlighting, below. +See also \f[C]\-\-list\-highlight\-styles\f[]. +.RS +.PP +Instead of a \f[I]STYLE\f[] name, a JSON file with extension +\f[C]\&.theme\f[] may be supplied. +This will be parsed as a KDE syntax highlighting theme and (if valid) +used as the highlighting style. +.PP +To generate the JSON version of an existing style, use +\f[C]\-\-print\-highlight\-style\f[]. +.RE +.TP +.B \f[C]\-\-print\-highlight\-style=\f[]\f[I]STYLE\f[]|\f[I]FILE\f[] +Prints a JSON version of a highlighting style, which can be modified, +saved with a \f[C]\&.theme\f[] extension, and used with +\f[C]\-\-highlight\-style\f[]. +.RS +.RE +.TP +.B \f[C]\-\-syntax\-definition=\f[]\f[I]FILE\f[] +Instructs pandoc to load a KDE XML syntax definition file, which will be +used for syntax highlighting of appropriately marked code blocks. +This can be used to add support for new languages or to use altered +syntax definitions for existing languages. +.RS +.RE +.TP +.B \f[C]\-H\f[] \f[I]FILE\f[], \f[C]\-\-include\-in\-header=\f[]\f[I]FILE\f[] +Include contents of \f[I]FILE\f[], verbatim, at the end of the header. +This can be used, for example, to include special CSS or JavaScript in +HTML documents. +This option can be used repeatedly to include multiple files in the +header. +They will be included in the order specified. +Implies \f[C]\-\-standalone\f[]. +.RS +.RE +.TP +.B \f[C]\-B\f[] \f[I]FILE\f[], \f[C]\-\-include\-before\-body=\f[]\f[I]FILE\f[] +Include contents of \f[I]FILE\f[], verbatim, at the beginning of the +document body (e.g. +after the \f[C]\f[] tag in HTML, or the \f[C]\\begin{document}\f[] +command in LaTeX). +This can be used to include navigation bars or banners in HTML +documents. +This option can be used repeatedly to include multiple files. +They will be included in the order specified. +Implies \f[C]\-\-standalone\f[]. +.RS +.RE +.TP +.B \f[C]\-A\f[] \f[I]FILE\f[], \f[C]\-\-include\-after\-body=\f[]\f[I]FILE\f[] +Include contents of \f[I]FILE\f[], verbatim, at the end of the document +body (before the \f[C]\f[] tag in HTML, or the +\f[C]\\end{document}\f[] command in LaTeX). +This option can be used repeatedly to include multiple files. +They will be included in the order specified. +Implies \f[C]\-\-standalone\f[]. +.RS +.RE +.TP +.B \f[C]\-\-resource\-path=\f[]\f[I]SEARCHPATH\f[] +List of paths to search for images and other resources. +The paths should be separated by \f[C]:\f[] on Linux, UNIX, and macOS +systems, and by \f[C];\f[] on Windows. +If \f[C]\-\-resource\-path\f[] is not specified, the default resource +path is the working directory. +Note that, if \f[C]\-\-resource\-path\f[] is specified, the working +directory must be explicitly listed or it will not be searched. +For example: \f[C]\-\-resource\-path=.:test\f[] will search the working +directory and the \f[C]test\f[] subdirectory, in that order. +.RS +.RE +.TP +.B \f[C]\-\-request\-header=\f[]\f[I]NAME\f[]\f[C]:\f[]\f[I]VAL\f[] +Set the request header \f[I]NAME\f[] to the value \f[I]VAL\f[] when +making HTTP requests (for example, when a URL is given on the command +line, or when resources used in a document must be downloaded). +.RS +.RE +.SS Options affecting specific writers +.TP +.B \f[C]\-\-self\-contained\f[] +Produce a standalone HTML file with no external dependencies, using +\f[C]data:\f[] URIs to incorporate the contents of linked scripts, +stylesheets, images, and videos. +The resulting file should be "self\-contained," in the sense that it +needs no external files and no net access to be displayed properly by a +browser. +This option works only with HTML output formats, including +\f[C]html4\f[], \f[C]html5\f[], \f[C]html+lhs\f[], \f[C]html5+lhs\f[], +\f[C]s5\f[], \f[C]slidy\f[], \f[C]slideous\f[], \f[C]dzslides\f[], and +\f[C]revealjs\f[]. +Scripts, images, and stylesheets at absolute URLs will be downloaded; +those at relative URLs will be sought relative to the working directory +(if the first source file is local) or relative to the base URL (if the +first source file is remote). +Elements with the attribute \f[C]data\-external="1"\f[] will be left +alone; the documents they link to will not be incorporated in the +document. +Limitation: resources that are loaded dynamically through JavaScript +cannot be incorporated; as a result, \f[C]\-\-self\-contained\f[] does +not work with \f[C]\-\-mathjax\f[], and some advanced features (e.g. +zoom or speaker notes) may not work in an offline "self\-contained" +\f[C]reveal.js\f[] slide show. +.RS +.RE +.TP +.B \f[C]\-\-html\-q\-tags\f[] +Use \f[C]\f[] tags for quotes in HTML. +.RS +.RE +.TP +.B \f[C]\-\-ascii\f[] +Use only ASCII characters in output. +Currently supported only for HTML and DocBook output (which uses +numerical entities instead of UTF\-8 when this option is selected). +.RS +.RE +.TP +.B \f[C]\-\-reference\-links\f[] +Use reference\-style links, rather than inline links, in writing +Markdown or reStructuredText. +By default inline links are used. +The placement of link references is affected by the +\f[C]\-\-reference\-location\f[] option. +.RS +.RE +.TP +.B \f[C]\-\-reference\-location\ =\ block\f[]|\f[C]section\f[]|\f[C]document\f[] +Specify whether footnotes (and references, if \f[C]reference\-links\f[] +is set) are placed at the end of the current (top\-level) block, the +current section, or the document. +The default is \f[C]document\f[]. +Currently only affects the markdown writer. +.RS +.RE +.TP +.B \f[C]\-\-atx\-headers\f[] +Use ATX\-style headers in Markdown and AsciiDoc output. +The default is to use setext\-style headers for levels 1\-2, and then +ATX headers. +(Note: for \f[C]gfm\f[] output, ATX headers are always used.) +.RS +.RE +.TP +.B \f[C]\-\-top\-level\-division=[default|section|chapter|part]\f[] +Treat top\-level headers as the given division type in LaTeX, ConTeXt, +DocBook, and TEI output. +The hierarchy order is part, chapter, then section; all headers are +shifted such that the top\-level header becomes the specified type. +The default behavior is to determine the best division type via +heuristics: unless other conditions apply, \f[C]section\f[] is chosen. +When the LaTeX document class is set to \f[C]report\f[], \f[C]book\f[], +or \f[C]memoir\f[] (unless the \f[C]article\f[] option is specified), +\f[C]chapter\f[] is implied as the setting for this option. +If \f[C]beamer\f[] is the output format, specifying either +\f[C]chapter\f[] or \f[C]part\f[] will cause top\-level headers to +become \f[C]\\part{..}\f[], while second\-level headers remain as their +default type. +.RS +.RE +.TP +.B \f[C]\-N\f[], \f[C]\-\-number\-sections\f[] +Number section headings in LaTeX, ConTeXt, HTML, or EPUB output. +By default, sections are not numbered. +Sections with class \f[C]unnumbered\f[] will never be numbered, even if +\f[C]\-\-number\-sections\f[] is specified. +.RS +.RE +.TP +.B \f[C]\-\-number\-offset=\f[]\f[I]NUMBER\f[][\f[C],\f[]\f[I]NUMBER\f[]\f[C],\f[]\f[I]...\f[]] +Offset for section headings in HTML output (ignored in other output +formats). +The first number is added to the section number for top\-level headers, +the second for second\-level headers, and so on. +So, for example, if you want the first top\-level header in your +document to be numbered "6", specify \f[C]\-\-number\-offset=5\f[]. +If your document starts with a level\-2 header which you want to be +numbered "1.5", specify \f[C]\-\-number\-offset=1,4\f[]. +Offsets are 0 by default. +Implies \f[C]\-\-number\-sections\f[]. +.RS +.RE +.TP +.B \f[C]\-\-listings\f[] +Use the \f[C]listings\f[] package for LaTeX code blocks +.RS +.RE +.TP +.B \f[C]\-i\f[], \f[C]\-\-incremental\f[] +Make list items in slide shows display incrementally (one by one). +The default is for lists to be displayed all at once. +.RS +.RE +.TP +.B \f[C]\-\-slide\-level=\f[]\f[I]NUMBER\f[] +Specifies that headers with the specified level create slides (for +\f[C]beamer\f[], \f[C]s5\f[], \f[C]slidy\f[], \f[C]slideous\f[], +\f[C]dzslides\f[]). +Headers above this level in the hierarchy are used to divide the slide +show into sections; headers below this level create subheads within a +slide. +Note that content that is not contained under slide\-level headers will +not appear in the slide show. +The default is to set the slide level based on the contents of the +document; see Structuring the slide show. +.RS +.RE +.TP +.B \f[C]\-\-section\-divs\f[] +Wrap sections in \f[C]
    \f[] tags (or \f[C]
    \f[] tags for +\f[C]html4\f[]), and attach identifiers to the enclosing +\f[C]
    \f[] (or \f[C]
    \f[]) rather than the header itself. +See Header identifiers, below. +.RS +.RE +.TP +.B \f[C]\-\-email\-obfuscation=none\f[]|\f[C]javascript\f[]|\f[C]references\f[] +Specify a method for obfuscating \f[C]mailto:\f[] links in HTML +documents. +\f[C]none\f[] leaves \f[C]mailto:\f[] links as they are. +\f[C]javascript\f[] obfuscates them using JavaScript. +\f[C]references\f[] obfuscates them by printing their letters as decimal +or hexadecimal character references. +The default is \f[C]none\f[]. +.RS +.RE +.TP +.B \f[C]\-\-id\-prefix=\f[]\f[I]STRING\f[] +Specify a prefix to be added to all identifiers and internal links in +HTML and DocBook output, and to footnote numbers in Markdown and Haddock +output. +This is useful for preventing duplicate identifiers when generating +fragments to be included in other pages. +.RS +.RE +.TP +.B \f[C]\-T\f[] \f[I]STRING\f[], \f[C]\-\-title\-prefix=\f[]\f[I]STRING\f[] +Specify \f[I]STRING\f[] as a prefix at the beginning of the title that +appears in the HTML header (but not in the title as it appears at the +beginning of the HTML body). +Implies \f[C]\-\-standalone\f[]. +.RS +.RE +.TP +.B \f[C]\-c\f[] \f[I]URL\f[], \f[C]\-\-css=\f[]\f[I]URL\f[] +Link to a CSS style sheet. +This option can be used repeatedly to include multiple files. +They will be included in the order specified. +.RS +.PP +A stylesheet is required for generating EPUB. +If none is provided using this option (or the \f[C]stylesheet\f[] +metadata field), pandoc will look for a file \f[C]epub.css\f[] in the +user data directory (see \f[C]\-\-data\-dir\f[]). +If it is not found there, sensible defaults will be used. +.RE +.TP +.B \f[C]\-\-reference\-doc=\f[]\f[I]FILE\f[] +Use the specified file as a style reference in producing a docx or ODT +file. +.RS +.TP +.B Docx +For best results, the reference docx should be a modified version of a +docx file produced using pandoc. +The contents of the reference docx are ignored, but its stylesheets and +document properties (including margins, page size, header, and footer) +are used in the new docx. +If no reference docx is specified on the command line, pandoc will look +for a file \f[C]reference.docx\f[] in the user data directory (see +\f[C]\-\-data\-dir\f[]). +If this is not found either, sensible defaults will be used. +.RS +.PP +To produce a custom \f[C]reference.docx\f[], first get a copy of the +default \f[C]reference.docx\f[]: +\f[C]pandoc\ \-\-print\-default\-data\-file\ reference.docx\ >\ custom\-reference.docx\f[]. +Then open \f[C]custom\-reference.docx\f[] in Word, modify the styles as +you wish, and save the file. +For best results, do not make changes to this file other than modifying +the styles used by pandoc: [paragraph] Normal, Body Text, First +Paragraph, Compact, Title, Subtitle, Author, Date, Abstract, +Bibliography, Heading 1, Heading 2, Heading 3, Heading 4, Heading 5, +Heading 6, Heading 7, Heading 8, Heading 9, Block Text, Footnote Text, +Definition Term, Definition, Caption, Table Caption, Image Caption, +Figure, Captioned Figure, TOC Heading; [character] Default Paragraph +Font, Body Text Char, Verbatim Char, Footnote Reference, Hyperlink; +[table] Table. +.RE +.TP +.B ODT +For best results, the reference ODT should be a modified version of an +ODT produced using pandoc. +The contents of the reference ODT are ignored, but its stylesheets are +used in the new ODT. +If no reference ODT is specified on the command line, pandoc will look +for a file \f[C]reference.odt\f[] in the user data directory (see +\f[C]\-\-data\-dir\f[]). +If this is not found either, sensible defaults will be used. +.RS +.PP +To produce a custom \f[C]reference.odt\f[], first get a copy of the +default \f[C]reference.odt\f[]: +\f[C]pandoc\ \-\-print\-default\-data\-file\ reference.odt\ >\ custom\-reference.odt\f[]. +Then open \f[C]custom\-reference.odt\f[] in LibreOffice, modify the +styles as you wish, and save the file. +.RE +.RE +.TP +.B \f[C]\-\-epub\-cover\-image=\f[]\f[I]FILE\f[] +Use the specified image as the EPUB cover. +It is recommended that the image be less than 1000px in width and +height. +Note that in a Markdown source document you can also specify +\f[C]cover\-image\f[] in a YAML metadata block (see EPUB Metadata, +below). +.RS +.RE +.TP +.B \f[C]\-\-epub\-metadata=\f[]\f[I]FILE\f[] +Look in the specified XML file for metadata for the EPUB. +The file should contain a series of Dublin Core elements. +For example: +.RS +.IP +.nf +\f[C] +\ Creative\ Commons +\ es\-AR +\f[] +.fi +.PP +By default, pandoc will include the following metadata elements: +\f[C]\f[] (from the document title), \f[C]\f[] +(from the document authors), \f[C]\f[] (from the document date, +which should be in ISO 8601 format), \f[C]\f[] (from the +\f[C]lang\f[] variable, or, if is not set, the locale), and +\f[C]\f[] (a randomly generated UUID). +Any of these may be overridden by elements in the metadata file. +.PP +Note: if the source document is Markdown, a YAML metadata block in the +document can be used instead. +See below under EPUB Metadata. +.RE +.TP +.B \f[C]\-\-epub\-embed\-font=\f[]\f[I]FILE\f[] +Embed the specified font in the EPUB. +This option can be repeated to embed multiple fonts. +Wildcards can also be used: for example, \f[C]DejaVuSans\-*.ttf\f[]. +However, if you use wildcards on the command line, be sure to escape +them or put the whole filename in single quotes, to prevent them from +being interpreted by the shell. +To use the embedded fonts, you will need to add declarations like the +following to your CSS (see \f[C]\-\-css\f[]): +.RS +.IP +.nf +\f[C] +\@font\-face\ { +font\-family:\ DejaVuSans; +font\-style:\ normal; +font\-weight:\ normal; +src:url("DejaVuSans\-Regular.ttf"); +} +\@font\-face\ { +font\-family:\ DejaVuSans; +font\-style:\ normal; +font\-weight:\ bold; +src:url("DejaVuSans\-Bold.ttf"); +} +\@font\-face\ { +font\-family:\ DejaVuSans; +font\-style:\ italic; +font\-weight:\ normal; +src:url("DejaVuSans\-Oblique.ttf"); +} +\@font\-face\ { +font\-family:\ DejaVuSans; +font\-style:\ italic; +font\-weight:\ bold; +src:url("DejaVuSans\-BoldOblique.ttf"); +} +body\ {\ font\-family:\ "DejaVuSans";\ } +\f[] +.fi +.RE +.TP +.B \f[C]\-\-epub\-chapter\-level=\f[]\f[I]NUMBER\f[] +Specify the header level at which to split the EPUB into separate +"chapter" files. +The default is to split into chapters at level 1 headers. +This option only affects the internal composition of the EPUB, not the +way chapters and sections are displayed to users. +Some readers may be slow if the chapter files are too large, so for +large documents with few level 1 headers, one might want to use a +chapter level of 2 or 3. +.RS +.RE +.TP +.B \f[C]\-\-epub\-subdirectory=\f[]\f[I]DIRNAME\f[] +Specify the subdirectory in the OCF container that is to hold the +EPUB\-specific contents. +The default is \f[C]EPUB\f[]. +To put the EPUB contents in the top level, use an empty string. +.RS +.RE +.TP +.B \f[C]\-\-pdf\-engine=pdflatex\f[]|\f[C]lualatex\f[]|\f[C]xelatex\f[]|\f[C]wkhtmltopdf\f[]|\f[C]weasyprint\f[]|\f[C]prince\f[]|\f[C]context\f[]|\f[C]pdfroff\f[] +Use the specified engine when producing PDF output. +The default is \f[C]pdflatex\f[]. +If the engine is not in your PATH, the full path of the engine may be +specified here. +.RS +.RE +.TP +.B \f[C]\-\-pdf\-engine\-opt=\f[]\f[I]STRING\f[] +Use the given string as a command\-line argument to the +\f[C]pdf\-engine\f[]. +If used multiple times, the arguments are provided with spaces between +them. +Note that no check for duplicate options is done. +.RS +.RE +.SS Citation rendering +.TP +.B \f[C]\-\-bibliography=\f[]\f[I]FILE\f[] +Set the \f[C]bibliography\f[] field in the document\[aq]s metadata to +\f[I]FILE\f[], overriding any value set in the metadata, and process +citations using \f[C]pandoc\-citeproc\f[]. +(This is equivalent to +\f[C]\-\-metadata\ bibliography=FILE\ \-\-filter\ pandoc\-citeproc\f[].) +If \f[C]\-\-natbib\f[] or \f[C]\-\-biblatex\f[] is also supplied, +\f[C]pandoc\-citeproc\f[] is not used, making this equivalent to +\f[C]\-\-metadata\ bibliography=FILE\f[]. +If you supply this argument multiple times, each \f[I]FILE\f[] will be +added to bibliography. +.RS +.RE +.TP +.B \f[C]\-\-csl=\f[]\f[I]FILE\f[] +Set the \f[C]csl\f[] field in the document\[aq]s metadata to +\f[I]FILE\f[], overriding any value set in the metadata. +(This is equivalent to \f[C]\-\-metadata\ csl=FILE\f[].) This option is +only relevant with \f[C]pandoc\-citeproc\f[]. +.RS +.RE +.TP +.B \f[C]\-\-citation\-abbreviations=\f[]\f[I]FILE\f[] +Set the \f[C]citation\-abbreviations\f[] field in the document\[aq]s +metadata to \f[I]FILE\f[], overriding any value set in the metadata. +(This is equivalent to +\f[C]\-\-metadata\ citation\-abbreviations=FILE\f[].) This option is +only relevant with \f[C]pandoc\-citeproc\f[]. +.RS +.RE +.TP +.B \f[C]\-\-natbib\f[] +Use \f[C]natbib\f[] for citations in LaTeX output. +This option is not for use with the \f[C]pandoc\-citeproc\f[] filter or +with PDF output. +It is intended for use in producing a LaTeX file that can be processed +with \f[C]bibtex\f[]. +.RS +.RE +.TP +.B \f[C]\-\-biblatex\f[] +Use \f[C]biblatex\f[] for citations in LaTeX output. +This option is not for use with the \f[C]pandoc\-citeproc\f[] filter or +with PDF output. +It is intended for use in producing a LaTeX file that can be processed +with \f[C]bibtex\f[] or \f[C]biber\f[]. +.RS +.RE +.SS Math rendering in HTML +.PP +The default is to render TeX math as far as possible using Unicode +characters. +Formulas are put inside a \f[C]span\f[] with \f[C]class="math"\f[], so +that they may be styled differently from the surrounding text if needed. +However, this gives acceptable results only for basic math, usually you +will want to use \f[C]\-\-mathjax\f[] or another of the following +options. +.TP +.B \f[C]\-\-mathjax\f[][\f[C]=\f[]\f[I]URL\f[]] +Use MathJax to display embedded TeX math in HTML output. +TeX math will be put between \f[C]\\(...\\)\f[] (for inline math) or +\f[C]\\[...\\]\f[] (for display math) and wrapped in \f[C]\f[] +tags with class \f[C]math\f[]. +Then the MathJax JavaScript will render it. +The \f[I]URL\f[] should point to the \f[C]MathJax.js\f[] load script. +If a \f[I]URL\f[] is not provided, a link to the Cloudflare CDN will be +inserted. +.RS +.RE +.TP +.B \f[C]\-\-mathml\f[] +Convert TeX math to MathML (in \f[C]epub3\f[], \f[C]docbook4\f[], +\f[C]docbook5\f[], \f[C]jats\f[], \f[C]html4\f[] and \f[C]html5\f[]). +This is the default in \f[C]odt\f[] output. +Note that currently only Firefox and Safari (and select e\-book readers) +natively support MathML. +.RS +.RE +.TP +.B \f[C]\-\-webtex\f[][\f[C]=\f[]\f[I]URL\f[]] +Convert TeX formulas to \f[C]\f[] tags that link to an external +script that converts formulas to images. +The formula will be URL\-encoded and concatenated with the URL provided. +For SVG images you can for example use +\f[C]\-\-webtex\ https://latex.codecogs.com/svg.latex?\f[]. +If no URL is specified, the CodeCogs URL generating PNGs will be used +(\f[C]https://latex.codecogs.com/png.latex?\f[]). +Note: the \f[C]\-\-webtex\f[] option will affect Markdown output as well +as HTML, which is useful if you\[aq]re targeting a version of Markdown +without native math support. +.RS +.RE +.TP +.B \f[C]\-\-katex\f[][\f[C]=\f[]\f[I]URL\f[]] +Use KaTeX to display embedded TeX math in HTML output. +The \f[I]URL\f[] is the base URL for the KaTeX library. +If a \f[I]URL\f[] is not provided, a link to the KaTeX CDN will be +inserted. +.RS +.RE +.TP +.B \f[C]\-\-katex\-stylesheet=\f[]\f[I]URL\f[] +The \f[I]URL\f[] should point to the \f[C]katex.css\f[] stylesheet. +If this option is not specified, a link to the KaTeX CDN will be +inserted. +Note that this option does not imply \f[C]\-\-katex\f[]. +.RS +.RE +.TP +.B \f[C]\-m\f[] [\f[I]URL\f[]], \f[C]\-\-latexmathml\f[][\f[C]=\f[]\f[I]URL\f[]] +\f[I]Deprecated.\f[] Use the LaTeXMathML script to display embedded TeX +math in HTML output. +TeX math will be displayed between \f[C]$\f[] or \f[C]$$\f[] characters +and put in \f[C]\f[] tags with class \f[C]LaTeX\f[]. +The LaTeXMathML JavaScript will then change it to MathML. +Note that currently only Firefox and Safari (and select e\-book readers) +natively support MathML. +To insert a link the \f[C]LaTeXMathML.js\f[] script, provide a +\f[I]URL\f[]. +.RS +.RE +.TP +.B \f[C]\-\-jsmath\f[][\f[C]=\f[]\f[I]URL\f[]] +\f[I]Deprecated.\f[] Use jsMath (the predecessor of MathJax) to display +embedded TeX math in HTML output. +TeX math will be put inside \f[C]\f[] tags (for inline math) or +\f[C]
    \f[] tags (for display math) with class \f[C]math\f[] and +rendered by the jsMath script. +The \f[I]URL\f[] should point to the script (e.g. +\f[C]jsMath/easy/load.js\f[]); if provided, it will be linked to in the +header of standalone HTML documents. +If a \f[I]URL\f[] is not provided, no link to the jsMath load script +will be inserted; it is then up to the author to provide such a link in +the HTML template. +.RS +.RE +.TP +.B \f[C]\-\-gladtex\f[] +\f[I]Deprecated.\f[] Enclose TeX math in \f[C]\f[] tags in HTML +output. +The resulting HTML can then be processed by gladTeX to produce images of +the typeset formulas and an HTML file with links to these images. +So, the procedure is: +.RS +.IP +.nf +\f[C] +pandoc\ \-s\ \-\-gladtex\ input.md\ \-o\ myfile.htex +gladtex\ \-d\ myfile\-images\ myfile.htex +#\ produces\ myfile.html\ and\ images\ in\ myfile\-images +\f[] +.fi +.RE +.TP +.B \f[C]\-\-mimetex\f[][\f[C]=\f[]\f[I]URL\f[]] +\f[I]Deprecated.\f[] Render TeX math using the mimeTeX CGI script, which +generates an image for each TeX formula. +This should work in all browsers. +If \f[I]URL\f[] is not specified, it is assumed that the script is at +\f[C]/cgi\-bin/mimetex.cgi\f[]. +.RS +.RE +.SS Options for wrapper scripts +.TP +.B \f[C]\-\-dump\-args\f[] +Print information about command\-line arguments to \f[I]stdout\f[], then +exit. +This option is intended primarily for use in wrapper scripts. +The first line of output contains the name of the output file specified +with the \f[C]\-o\f[] option, or \f[C]\-\f[] (for \f[I]stdout\f[]) if no +output file was specified. +The remaining lines contain the command\-line arguments, one per line, +in the order they appear. +These do not include regular pandoc options and their arguments, but do +include any options appearing after a \f[C]\-\-\f[] separator at the end +of the line. +.RS +.RE +.TP +.B \f[C]\-\-ignore\-args\f[] +Ignore command\-line arguments (for use in wrapper scripts). +Regular pandoc options are not ignored. +Thus, for example, +.RS +.IP +.nf +\f[C] +pandoc\ \-\-ignore\-args\ \-o\ foo.html\ \-s\ foo.txt\ \-\-\ \-e\ latin1 +\f[] +.fi +.PP +is equivalent to +.IP +.nf +\f[C] +pandoc\ \-o\ foo.html\ \-s +\f[] +.fi +.RE +.SH TEMPLATES +.PP +When the \f[C]\-s/\-\-standalone\f[] option is used, pandoc uses a +template to add header and footer material that is needed for a +self\-standing document. +To see the default template that is used, just type +.IP +.nf +\f[C] +pandoc\ \-D\ *FORMAT* +\f[] +.fi +.PP +where \f[I]FORMAT\f[] is the name of the output format. +A custom template can be specified using the \f[C]\-\-template\f[] +option. +You can also override the system default templates for a given output +format \f[I]FORMAT\f[] by putting a file +\f[C]templates/default.*FORMAT*\f[] in the user data directory (see +\f[C]\-\-data\-dir\f[], above). +\f[I]Exceptions:\f[] +.IP \[bu] 2 +For \f[C]odt\f[] output, customize the \f[C]default.opendocument\f[] +template. +.IP \[bu] 2 +For \f[C]pdf\f[] output, customize the \f[C]default.latex\f[] template +(or the \f[C]default.context\f[] template, if you use +\f[C]\-t\ context\f[], or the \f[C]default.ms\f[] template, if you use +\f[C]\-t\ ms\f[], or the \f[C]default.html5\f[] template, if you use +\f[C]\-t\ html5\f[]). +.IP \[bu] 2 +\f[C]docx\f[] has no template (however, you can use +\f[C]\-\-reference\-doc\f[] to customize the output). +.PP +Templates contain \f[I]variables\f[], which allow for the inclusion of +arbitrary information at any point in the file. +Variables may be set within the document using YAML metadata blocks. +They may also be set at the command line using the +\f[C]\-V/\-\-variable\f[] option: variables set in this way override +metadata fields with the same name. +.SS Variables set by pandoc +.PP +Some variables are set automatically by pandoc. +These vary somewhat depending on the output format, but include metadata +fields as well as the following: +.TP +.B \f[C]sourcefile\f[], \f[C]outputfile\f[] +source and destination filenames, as given on the command line. +\f[C]sourcefile\f[] can also be a list if input comes from multiple +files, or empty if input is from stdin. +You can use the following snippet in your template to distinguish them: +.RS +.IP +.nf +\f[C] +$if(sourcefile)$ +$for(sourcefile)$ +$sourcefile$ +$endfor$ +$else$ +(stdin) +$endif$ +\f[] +.fi +.PP +Similarly, \f[C]outputfile\f[] can be \f[C]\-\f[] if output goes to the +terminal. +.RE +.TP +.B \f[C]title\f[], \f[C]author\f[], \f[C]date\f[] +allow identification of basic aspects of the document. +Included in PDF metadata through LaTeX and ConTeXt. +These can be set through a pandoc title block, which allows for multiple +authors, or through a YAML metadata block: +.RS +.IP +.nf +\f[C] +\-\-\- +author: +\-\ Aristotle +\-\ Peter\ Abelard +\&... +\f[] +.fi +.RE +.TP +.B \f[C]subtitle\f[] +document subtitle, included in HTML, EPUB, LaTeX, ConTeXt, and Word +docx; renders in LaTeX only when using a document class that supports +\f[C]\\subtitle\f[], such as \f[C]beamer\f[] or the KOMA\-Script series +(\f[C]scrartcl\f[], \f[C]scrreprt\f[], \f[C]scrbook\f[]). +.RS +.RE +.TP +.B \f[C]institute\f[] +author affiliations (in LaTeX and Beamer only). +Can be a list, when there are multiple authors. +.RS +.RE +.TP +.B \f[C]abstract\f[] +document summary, included in LaTeX, ConTeXt, AsciiDoc, and Word docx +.RS +.RE +.TP +.B \f[C]keywords\f[] +list of keywords to be included in HTML, PDF, and AsciiDoc metadata; may +be repeated as for \f[C]author\f[], above +.RS +.RE +.TP +.B \f[C]header\-includes\f[] +contents specified by \f[C]\-H/\-\-include\-in\-header\f[] (may have +multiple values) +.RS +.RE +.TP +.B \f[C]toc\f[] +non\-null value if \f[C]\-\-toc/\-\-table\-of\-contents\f[] was +specified +.RS +.RE +.TP +.B \f[C]toc\-title\f[] +title of table of contents (works only with EPUB, opendocument, odt, +docx) +.RS +.RE +.TP +.B \f[C]include\-before\f[] +contents specified by \f[C]\-B/\-\-include\-before\-body\f[] (may have +multiple values) +.RS +.RE +.TP +.B \f[C]include\-after\f[] +contents specified by \f[C]\-A/\-\-include\-after\-body\f[] (may have +multiple values) +.RS +.RE +.TP +.B \f[C]body\f[] +body of document +.RS +.RE +.TP +.B \f[C]meta\-json\f[] +JSON representation of all of the document\[aq]s metadata. +Field values are transformed to the selected output format. +.RS +.RE +.SS Language variables +.TP +.B \f[C]lang\f[] +identifies the main language of the document, using a code according to +BCP 47 (e.g. +\f[C]en\f[] or \f[C]en\-GB\f[]). +For some output formats, pandoc will convert it to an appropriate format +stored in the additional variables \f[C]babel\-lang\f[], +\f[C]polyglossia\-lang\f[] (LaTeX) and \f[C]context\-lang\f[] (ConTeXt). +.RS +.PP +Native pandoc \f[C]span\f[]s and \f[C]div\f[]s with the lang attribute +(value in BCP 47) can be used to switch the language in that range. +.RE +.TP +.B \f[C]otherlangs\f[] +a list of other languages used in the document in the YAML metadata, +according to BCP 47. +For example: \f[C]otherlangs:\ [en\-GB,\ fr]\f[]. +This is automatically generated from the \f[C]lang\f[] attributes in all +\f[C]span\f[]s and \f[C]div\f[]s but can be overridden. +Currently only used by LaTeX through the generated +\f[C]babel\-otherlangs\f[] and \f[C]polyglossia\-otherlangs\f[] +variables. +The LaTeX writer outputs polyglossia commands in the text but the +\f[C]babel\-newcommands\f[] variable contains mappings for them to the +corresponding babel. +.RS +.RE +.TP +.B \f[C]dir\f[] +the base direction of the document, either \f[C]rtl\f[] +(right\-to\-left) or \f[C]ltr\f[] (left\-to\-right). +.RS +.PP +For bidirectional documents, native pandoc \f[C]span\f[]s and +\f[C]div\f[]s with the \f[C]dir\f[] attribute (value \f[C]rtl\f[] or +\f[C]ltr\f[]) can be used to override the base direction in some output +formats. +This may not always be necessary if the final renderer (e.g. +the browser, when generating HTML) supports the Unicode Bidirectional +Algorithm. +.PP +When using LaTeX for bidirectional documents, only the \f[C]xelatex\f[] +engine is fully supported (use \f[C]\-\-pdf\-engine=xelatex\f[]). +.RE +.SS Variables for slides +.PP +Variables are available for producing slide shows with pandoc, including +all reveal.js configuration options. +.TP +.B \f[C]titlegraphic\f[] +title graphic for Beamer documents +.RS +.RE +.TP +.B \f[C]logo\f[] +logo for Beamer documents +.RS +.RE +.TP +.B \f[C]slidy\-url\f[] +base URL for Slidy documents (defaults to +\f[C]https://www.w3.org/Talks/Tools/Slidy2\f[]) +.RS +.RE +.TP +.B \f[C]slideous\-url\f[] +base URL for Slideous documents (defaults to \f[C]slideous\f[]) +.RS +.RE +.TP +.B \f[C]s5\-url\f[] +base URL for S5 documents (defaults to \f[C]s5/default\f[]) +.RS +.RE +.TP +.B \f[C]revealjs\-url\f[] +base URL for reveal.js documents (defaults to \f[C]reveal.js\f[]) +.RS +.RE +.TP +.B \f[C]theme\f[], \f[C]colortheme\f[], \f[C]fonttheme\f[], \f[C]innertheme\f[], \f[C]outertheme\f[] +themes for LaTeX \f[C]beamer\f[] documents +.RS +.RE +.TP +.B \f[C]themeoptions\f[] +options for LaTeX beamer themes (a list). +.RS +.RE +.TP +.B \f[C]navigation\f[] +controls navigation symbols in \f[C]beamer\f[] documents (default is +\f[C]empty\f[] for no navigation symbols; other valid values are +\f[C]frame\f[], \f[C]vertical\f[], and \f[C]horizontal\f[]). +.RS +.RE +.TP +.B \f[C]section\-titles\f[] +enables on "title pages" for new sections in \f[C]beamer\f[] documents +(default = true). +.RS +.RE +.TP +.B \f[C]beamerarticle\f[] +when true, the \f[C]beamerarticle\f[] package is loaded (for producing +an article from beamer slides). +.RS +.RE +.TP +.B \f[C]aspectratio\f[] +aspect ratio of slides (for beamer only, \f[C]1610\f[] for 16:10, +\f[C]169\f[] for 16:9, \f[C]149\f[] for 14:9, \f[C]141\f[] for 1.41:1, +\f[C]54\f[] for 5:4, \f[C]43\f[] for 4:3 which is the default, and +\f[C]32\f[] for 3:2). +.RS +.RE +.SS Variables for LaTeX +.PP +LaTeX variables are used when creating a PDF. +.TP +.B \f[C]papersize\f[] +paper size, e.g. +\f[C]letter\f[], \f[C]a4\f[] +.RS +.RE +.TP +.B \f[C]fontsize\f[] +font size for body text (e.g. +\f[C]10pt\f[], \f[C]12pt\f[]) +.RS +.RE +.TP +.B \f[C]documentclass\f[] +document class, e.g. +\f[C]article\f[], \f[C]report\f[], \f[C]book\f[], \f[C]memoir\f[] +.RS +.RE +.TP +.B \f[C]classoption\f[] +option for document class, e.g. +\f[C]oneside\f[]; may be repeated for multiple options +.RS +.RE +.TP +.B \f[C]geometry\f[] +option for \f[C]geometry\f[] package, e.g. +\f[C]margin=1in\f[]; may be repeated for multiple options +.RS +.RE +.TP +.B \f[C]margin\-left\f[], \f[C]margin\-right\f[], \f[C]margin\-top\f[], \f[C]margin\-bottom\f[] +sets margins, if \f[C]geometry\f[] is not used (otherwise +\f[C]geometry\f[] overrides these) +.RS +.RE +.TP +.B \f[C]linestretch\f[] +adjusts line spacing using the \f[C]setspace\f[] package, e.g. +\f[C]1.25\f[], \f[C]1.5\f[] +.RS +.RE +.TP +.B \f[C]fontfamily\f[] +font package for use with \f[C]pdflatex\f[]: TeX Live includes many +options, documented in the LaTeX Font Catalogue. +The default is Latin Modern. +.RS +.RE +.TP +.B \f[C]fontfamilyoptions\f[] +options for package used as \f[C]fontfamily\f[]: e.g. +\f[C]osf,sc\f[] with \f[C]fontfamily\f[] set to \f[C]mathpazo\f[] +provides Palatino with old\-style figures and true small caps; may be +repeated for multiple options +.RS +.RE +.TP +.B \f[C]mainfont\f[], \f[C]sansfont\f[], \f[C]monofont\f[], \f[C]mathfont\f[], \f[C]CJKmainfont\f[] +font families for use with \f[C]xelatex\f[] or \f[C]lualatex\f[]: take +the name of any system font, using the \f[C]fontspec\f[] package. +Note that if \f[C]CJKmainfont\f[] is used, the \f[C]xecjk\f[] package +must be available. +.RS +.RE +.TP +.B \f[C]mainfontoptions\f[], \f[C]sansfontoptions\f[], \f[C]monofontoptions\f[], \f[C]mathfontoptions\f[], \f[C]CJKoptions\f[] +options to use with \f[C]mainfont\f[], \f[C]sansfont\f[], +\f[C]monofont\f[], \f[C]mathfont\f[], \f[C]CJKmainfont\f[] in +\f[C]xelatex\f[] and \f[C]lualatex\f[]. +Allow for any choices available through \f[C]fontspec\f[], such as the +OpenType features \f[C]Numbers=OldStyle,Numbers=Proportional\f[]. +May be repeated for multiple options. +.RS +.RE +.TP +.B \f[C]fontenc\f[] +allows font encoding to be specified through \f[C]fontenc\f[] package +(with \f[C]pdflatex\f[]); default is \f[C]T1\f[] (see guide to LaTeX +font encodings) +.RS +.RE +.TP +.B \f[C]microtypeoptions\f[] +options to pass to the microtype package +.RS +.RE +.TP +.B \f[C]colorlinks\f[] +add color to link text; automatically enabled if any of +\f[C]linkcolor\f[], \f[C]citecolor\f[], \f[C]urlcolor\f[], or +\f[C]toccolor\f[] are set +.RS +.RE +.TP +.B \f[C]linkcolor\f[], \f[C]citecolor\f[], \f[C]urlcolor\f[], \f[C]toccolor\f[] +color for internal links, citation links, external links, and links in +table of contents: uses options allowed by \f[C]xcolor\f[], including +the \f[C]dvipsnames\f[], \f[C]svgnames\f[], and \f[C]x11names\f[] lists +.RS +.RE +.TP +.B \f[C]links\-as\-notes\f[] +causes links to be printed as footnotes +.RS +.RE +.TP +.B \f[C]indent\f[] +uses document class settings for indentation (the default LaTeX template +otherwise removes indentation and adds space between paragraphs) +.RS +.RE +.TP +.B \f[C]subparagraph\f[] +disables default behavior of LaTeX template that redefines +(sub)paragraphs as sections, changing the appearance of nested headings +in some classes +.RS +.RE +.TP +.B \f[C]thanks\f[] +specifies contents of acknowledgments footnote after document title. +.RS +.RE +.TP +.B \f[C]toc\f[] +include table of contents (can also be set using +\f[C]\-\-toc/\-\-table\-of\-contents\f[]) +.RS +.RE +.TP +.B \f[C]toc\-depth\f[] +level of section to include in table of contents +.RS +.RE +.TP +.B \f[C]secnumdepth\f[] +numbering depth for sections, if sections are numbered +.RS +.RE +.TP +.B \f[C]lof\f[], \f[C]lot\f[] +include list of figures, list of tables +.RS +.RE +.TP +.B \f[C]bibliography\f[] +bibliography to use for resolving references +.RS +.RE +.TP +.B \f[C]biblio\-style\f[] +bibliography style, when used with \f[C]\-\-natbib\f[] and +\f[C]\-\-biblatex\f[]. +.RS +.RE +.TP +.B \f[C]biblio\-title\f[] +bibliography title, when used with \f[C]\-\-natbib\f[] and +\f[C]\-\-biblatex\f[]. +.RS +.RE +.TP +.B \f[C]biblatexoptions\f[] +list of options for biblatex. +.RS +.RE +.TP +.B \f[C]natbiboptions\f[] +list of options for natbib. +.RS +.RE +.TP +.B \f[C]pagestyle\f[] +An option for LaTeX\[aq]s \f[C]\\pagestyle{}\f[]. +The default article class supports \[aq]plain\[aq] (default), +\[aq]empty\[aq], and \[aq]headings\[aq]; headings puts section titles in +the header. +.RS +.RE +.SS Variables for ConTeXt +.TP +.B \f[C]papersize\f[] +paper size, e.g. +\f[C]letter\f[], \f[C]A4\f[], \f[C]landscape\f[] (see ConTeXt Paper +Setup); may be repeated for multiple options +.RS +.RE +.TP +.B \f[C]layout\f[] +options for page margins and text arrangement (see ConTeXt Layout); may +be repeated for multiple options +.RS +.RE +.TP +.B \f[C]margin\-left\f[], \f[C]margin\-right\f[], \f[C]margin\-top\f[], \f[C]margin\-bottom\f[] +sets margins, if \f[C]layout\f[] is not used (otherwise \f[C]layout\f[] +overrides these) +.RS +.RE +.TP +.B \f[C]fontsize\f[] +font size for body text (e.g. +\f[C]10pt\f[], \f[C]12pt\f[]) +.RS +.RE +.TP +.B \f[C]mainfont\f[], \f[C]sansfont\f[], \f[C]monofont\f[], \f[C]mathfont\f[] +font families: take the name of any system font (see ConTeXt Font +Switching) +.RS +.RE +.TP +.B \f[C]linkcolor\f[], \f[C]contrastcolor\f[] +color for links outside and inside a page, e.g. +\f[C]red\f[], \f[C]blue\f[] (see ConTeXt Color) +.RS +.RE +.TP +.B \f[C]linkstyle\f[] +typeface style for links, e.g. +\f[C]normal\f[], \f[C]bold\f[], \f[C]slanted\f[], \f[C]boldslanted\f[], +\f[C]type\f[], \f[C]cap\f[], \f[C]small\f[] +.RS +.RE +.TP +.B \f[C]indenting\f[] +controls indentation of paragraphs, e.g. +\f[C]yes,small,next\f[] (see ConTeXt Indentation); may be repeated for +multiple options +.RS +.RE +.TP +.B \f[C]whitespace\f[] +spacing between paragraphs, e.g. +\f[C]none\f[], \f[C]small\f[] (using \f[C]setupwhitespace\f[]) +.RS +.RE +.TP +.B \f[C]interlinespace\f[] +adjusts line spacing, e.g. +\f[C]4ex\f[] (using \f[C]setupinterlinespace\f[]); may be repeated for +multiple options +.RS +.RE +.TP +.B \f[C]headertext\f[], \f[C]footertext\f[] +text to be placed in running header or footer (see ConTeXt Headers and +Footers); may be repeated up to four times for different placement +.RS +.RE +.TP +.B \f[C]pagenumbering\f[] +page number style and location (using \f[C]setuppagenumbering\f[]); may +be repeated for multiple options +.RS +.RE +.TP +.B \f[C]toc\f[] +include table of contents (can also be set using +\f[C]\-\-toc/\-\-table\-of\-contents\f[]) +.RS +.RE +.TP +.B \f[C]lof\f[], \f[C]lot\f[] +include list of figures, list of tables +.RS +.RE +.SS Variables for man pages +.TP +.B \f[C]section\f[] +section number in man pages +.RS +.RE +.TP +.B \f[C]header\f[] +header in man pages +.RS +.RE +.TP +.B \f[C]footer\f[] +footer in man pages +.RS +.RE +.TP +.B \f[C]adjusting\f[] +adjusts text to left (\f[C]l\f[]), right (\f[C]r\f[]), center +(\f[C]c\f[]), or both (\f[C]b\f[]) margins +.RS +.RE +.TP +.B \f[C]hyphenate\f[] +if \f[C]true\f[] (the default), hyphenation will be used +.RS +.RE +.SS Variables for ms +.TP +.B \f[C]pointsize\f[] +point size (e.g. +\f[C]10p\f[]) +.RS +.RE +.TP +.B \f[C]lineheight\f[] +line height (e.g. +\f[C]12p\f[]) +.RS +.RE +.TP +.B \f[C]fontfamily\f[] +font family (e.g. +\f[C]T\f[] or \f[C]P\f[]) +.RS +.RE +.TP +.B \f[C]indent\f[] +paragraph indent (e.g. +\f[C]2m\f[]) +.RS +.RE +.SS Using variables in templates +.PP +Variable names are sequences of alphanumerics, \f[C]\-\f[], and +\f[C]_\f[], starting with a letter. +A variable name surrounded by \f[C]$\f[] signs will be replaced by its +value. +For example, the string \f[C]$title$\f[] in +.IP +.nf +\f[C] +$title$ +\f[] +.fi +.PP +will be replaced by the document title. +.PP +To write a literal \f[C]$\f[] in a template, use \f[C]$$\f[]. +.PP +Templates may contain conditionals. +The syntax is as follows: +.IP +.nf +\f[C] +$if(variable)$ +X +$else$ +Y +$endif$ +\f[] +.fi +.PP +This will include \f[C]X\f[] in the template if \f[C]variable\f[] has a +non\-null value; otherwise it will include \f[C]Y\f[]. +\f[C]X\f[] and \f[C]Y\f[] are placeholders for any valid template text, +and may include interpolated variables or other conditionals. +The \f[C]$else$\f[] section may be omitted. +.PP +When variables can have multiple values (for example, \f[C]author\f[] in +a multi\-author document), you can use the \f[C]$for$\f[] keyword: +.IP +.nf +\f[C] +$for(author)$ + +$endfor$ +\f[] +.fi +.PP +You can optionally specify a separator to be used between consecutive +items: +.IP +.nf +\f[C] +$for(author)$$author$$sep$,\ $endfor$ +\f[] +.fi +.PP +A dot can be used to select a field of a variable that takes an object +as its value. +So, for example: +.IP +.nf +\f[C] +$author.name$\ ($author.affiliation$) +\f[] +.fi +.PP +If you use custom templates, you may need to revise them as pandoc +changes. +We recommend tracking the changes in the default templates, and +modifying your custom templates accordingly. +An easy way to do this is to fork the pandoc\-templates repository and +merge in changes after each pandoc release. +.PP +Templates may contain comments: anything on a line after \f[C]$\-\-\f[] +will be treated as a comment and ignored. +.SH EXTENSIONS +.PP +The behavior of some of the readers and writers can be adjusted by +enabling or disabling various extensions. +.PP +An extension can be enabled by adding \f[C]+EXTENSION\f[] to the format +name and disabled by adding \f[C]\-EXTENSION\f[]. +For example, \f[C]\-\-from\ markdown_strict+footnotes\f[] is strict +Markdown with footnotes enabled, while +\f[C]\-\-from\ markdown\-footnotes\-pipe_tables\f[] is pandoc\[aq]s +Markdown without footnotes or pipe tables. +.PP +The markdown reader and writer make by far the most use of extensions. +Extensions only used by them are therefore covered in the section +Pandoc\[aq]s Markdown below (See Markdown variants for +\f[C]commonmark\f[] and \f[C]gfm\f[].) In the following, extensions that +also work for other formats are covered. +.SS Typography +.SS Extension: \f[C]smart\f[] +.PP +Interpret straight quotes as curly quotes, \f[C]\-\-\-\f[] as +em\-dashes, \f[C]\-\-\f[] as en\-dashes, and \f[C]\&...\f[] as ellipses. +Nonbreaking spaces are inserted after certain abbreviations, such as +"Mr." +.PP +This extension can be enabled/disabled for the following formats: +.TP +.B input formats +\f[C]markdown\f[], \f[C]commonmark\f[], \f[C]latex\f[], +\f[C]mediawiki\f[], \f[C]org\f[], \f[C]rst\f[], \f[C]twiki\f[] +.RS +.RE +.TP +.B output formats +\f[C]markdown\f[], \f[C]latex\f[], \f[C]context\f[], \f[C]rst\f[] +.RS +.RE +.TP +.B enabled by default in +\f[C]markdown\f[], \f[C]latex\f[], \f[C]context\f[] (both input and +output) +.RS +.RE +.PP +Note: If you are \f[I]writing\f[] Markdown, then the \f[C]smart\f[] +extension has the reverse effect: what would have been curly quotes +comes out straight. +.PP +In LaTeX, \f[C]smart\f[] means to use the standard TeX ligatures for +quotation marks (\f[C]``\f[] and \f[C]\[aq]\[aq]\f[] for double quotes, +\f[C]`\f[] and \f[C]\[aq]\f[] for single quotes) and dashes +(\f[C]\-\-\f[] for en\-dash and \f[C]\-\-\-\f[] for em\-dash). +If \f[C]smart\f[] is disabled, then in reading LaTeX pandoc will parse +these characters literally. +In writing LaTeX, enabling \f[C]smart\f[] tells pandoc to use the +ligatures when possible; if \f[C]smart\f[] is disabled pandoc will use +unicode quotation mark and dash characters. +.SS Headers and sections +.SS Extension: \f[C]auto_identifiers\f[] +.PP +A header without an explicitly specified identifier will be +automatically assigned a unique identifier based on the header text. +.PP +This extension can be enabled/disabled for the following formats: +.TP +.B input formats +\f[C]markdown\f[], \f[C]latex\f[], \f[C]rst\f[], \f[C]mediawiki\f[], +\f[C]textile\f[] +.RS +.RE +.TP +.B output formats +\f[C]markdown\f[], \f[C]muse\f[] +.RS +.RE +.TP +.B enabled by default in +\f[C]markdown\f[], \f[C]muse\f[] +.RS +.RE +.PP +The algorithm used to derive the identifier from the header text is: +.IP \[bu] 2 +Remove all formatting, links, etc. +.IP \[bu] 2 +Remove all footnotes. +.IP \[bu] 2 +Remove all punctuation, except underscores, hyphens, and periods. +.IP \[bu] 2 +Replace all spaces and newlines with hyphens. +.IP \[bu] 2 +Convert all alphabetic characters to lowercase. +.IP \[bu] 2 +Remove everything up to the first letter (identifiers may not begin with +a number or punctuation mark). +.IP \[bu] 2 +If nothing is left after this, use the identifier \f[C]section\f[]. +.PP +Thus, for example, +.PP +.TS +tab(@); +l l. +T{ +Header +T}@T{ +Identifier +T} +_ +T{ +\f[C]Header\ identifiers\ in\ HTML\f[] +T}@T{ +\f[C]header\-identifiers\-in\-html\f[] +T} +T{ +\f[C]*Dogs*?\-\-in\ *my*\ house?\f[] +T}@T{ +\f[C]dogs\-\-in\-my\-house\f[] +T} +T{ +\f[C][HTML],\ [S5],\ or\ [RTF]?\f[] +T}@T{ +\f[C]html\-s5\-or\-rtf\f[] +T} +T{ +\f[C]3.\ Applications\f[] +T}@T{ +\f[C]applications\f[] +T} +T{ +\f[C]33\f[] +T}@T{ +\f[C]section\f[] +T} +.TE +.PP +These rules should, in most cases, allow one to determine the identifier +from the header text. +The exception is when several headers have the same text; in this case, +the first will get an identifier as described above; the second will get +the same identifier with \f[C]\-1\f[] appended; the third with +\f[C]\-2\f[]; and so on. +.PP +These identifiers are used to provide link targets in the table of +contents generated by the \f[C]\-\-toc|\-\-table\-of\-contents\f[] +option. +They also make it easy to provide links from one section of a document +to another. +A link to this section, for example, might look like this: +.IP +.nf +\f[C] +See\ the\ section\ on +[header\ identifiers](#header\-identifiers\-in\-html\-latex\-and\-context). +\f[] +.fi +.PP +Note, however, that this method of providing links to sections works +only in HTML, LaTeX, and ConTeXt formats. +.PP +If the \f[C]\-\-section\-divs\f[] option is specified, then each section +will be wrapped in a \f[C]section\f[] (or a \f[C]div\f[], if +\f[C]html4\f[] was specified), and the identifier will be attached to +the enclosing \f[C]
    \f[] (or \f[C]
    \f[]) tag rather than the +header itself. +This allows entire sections to be manipulated using JavaScript or +treated differently in CSS. +.SS Extension: \f[C]ascii_identifiers\f[] +.PP +Causes the identifiers produced by \f[C]auto_identifiers\f[] to be pure +ASCII. +Accents are stripped off of accented Latin letters, and non\-Latin +letters are omitted. +.SS Math Input +.PP +The extensions \f[C]tex_math_dollars\f[], +\f[C]tex_math_single_backslash\f[], and +\f[C]tex_math_double_backslash\f[] are described in the section about +Pandoc\[aq]s Markdown. +.PP +However, they can also be used with HTML input. +This is handy for reading web pages formatted using MathJax, for +example. +.SS Raw HTML/TeX +.PP +The following extensions (especially how they affect Markdown +input/output) are also described in more detail in their respective +sections of Pandoc\[aq]s Markdown. +.SS Extension: \f[C]raw_html\f[] +.PP +When converting from HTML, parse elements to raw HTML which are not +representable in pandoc\[aq]s AST. +By default, this is disabled for HTML input. +.SS Extension: \f[C]raw_tex\f[] +.PP +Allows raw LaTeX, TeX, and ConTeXt to be included in a document. +.PP +This extension can be enabled/disabled for the following formats (in +addition to \f[C]markdown\f[]): +.TP +.B input formats +\f[C]latex\f[], \f[C]org\f[], \f[C]textile\f[] +.RS +.RE +.TP +.B output formats +\f[C]textile\f[] +.RS +.RE +.SS Extension: \f[C]native_divs\f[] +.PP +This extension is enabled by default for HTML input. +This means that \f[C]div\f[]s are parsed to pandoc native elements. +(Alternatively, you can parse them to raw HTML using +\f[C]\-f\ html\-native_divs+raw_html\f[].) +.PP +When converting HTML to Markdown, for example, you may want to drop all +\f[C]div\f[]s and \f[C]span\f[]s: +.IP +.nf +\f[C] +pandoc\ \-f\ html\-native_divs\-native_spans\ \-t\ markdown +\f[] +.fi +.SS Extension: \f[C]native_spans\f[] +.PP +Analogous to \f[C]native_divs\f[] above. +.SS Literate Haskell support +.SS Extension: \f[C]literate_haskell\f[] +.PP +Treat the document as literate Haskell source. +.PP +This extension can be enabled/disabled for the following formats: +.TP +.B input formats +\f[C]markdown\f[], \f[C]rst\f[], \f[C]latex\f[] +.RS +.RE +.TP +.B output formats +\f[C]markdown\f[], \f[C]rst\f[], \f[C]latex\f[], \f[C]html\f[] +.RS +.RE +.PP +If you append \f[C]+lhs\f[] (or \f[C]+literate_haskell\f[]) to one of +the formats above, pandoc will treat the document as literate Haskell +source. +This means that +.IP \[bu] 2 +In Markdown input, "bird track" sections will be parsed as Haskell code +rather than block quotations. +Text between \f[C]\\begin{code}\f[] and \f[C]\\end{code}\f[] will also +be treated as Haskell code. +For ATX\-style headers the character \[aq]=\[aq] will be used instead of +\[aq]#\[aq]. +.IP \[bu] 2 +In Markdown output, code blocks with classes \f[C]haskell\f[] and +\f[C]literate\f[] will be rendered using bird tracks, and block +quotations will be indented one space, so they will not be treated as +Haskell code. +In addition, headers will be rendered setext\-style (with underlines) +rather than ATX\-style (with \[aq]#\[aq] characters). +(This is because ghc treats \[aq]#\[aq] characters in column 1 as +introducing line numbers.) +.IP \[bu] 2 +In restructured text input, "bird track" sections will be parsed as +Haskell code. +.IP \[bu] 2 +In restructured text output, code blocks with class \f[C]haskell\f[] +will be rendered using bird tracks. +.IP \[bu] 2 +In LaTeX input, text in \f[C]code\f[] environments will be parsed as +Haskell code. +.IP \[bu] 2 +In LaTeX output, code blocks with class \f[C]haskell\f[] will be +rendered inside \f[C]code\f[] environments. +.IP \[bu] 2 +In HTML output, code blocks with class \f[C]haskell\f[] will be rendered +with class \f[C]literatehaskell\f[] and bird tracks. +.PP +Examples: +.IP +.nf +\f[C] +pandoc\ \-f\ markdown+lhs\ \-t\ html +\f[] +.fi +.PP +reads literate Haskell source formatted with Markdown conventions and +writes ordinary HTML (without bird tracks). +.IP +.nf +\f[C] +pandoc\ \-f\ markdown+lhs\ \-t\ html+lhs +\f[] +.fi +.PP +writes HTML with the Haskell code in bird tracks, so it can be copied +and pasted as literate Haskell source. +.PP +Note that GHC expects the bird tracks in the first column, so indentend +literate code blocks (e.g. +inside an itemized environment) will not be picked up by the Haskell +compiler. +.SS Other extensions +.SS Extension: \f[C]empty_paragraphs\f[] +.PP +Allows empty paragraphs. +By default empty paragraphs are omitted. +.PP +This extension can be enabled/disabled for the following formats: +.TP +.B input formats +\f[C]docx\f[], \f[C]html\f[] +.RS +.RE +.TP +.B output formats +\f[C]markdown\f[], \f[C]docx\f[], \f[C]odt\f[], \f[C]opendocument\f[], +\f[C]html\f[] +.RS +.RE +.SS Extension: \f[C]amuse\f[] +.PP +In the \f[C]muse\f[] input format, this enables Text::Amuse extensions +to Emacs Muse markup. +.SS Extension: \f[C]citations\f[] +.PP +Some aspects of Pandoc\[aq]s Markdown citation syntax are also accepted +in \f[C]org\f[] input. +.SH PANDOC\[aq]S MARKDOWN +.PP +Pandoc understands an extended and slightly revised version of John +Gruber\[aq]s Markdown syntax. +This document explains the syntax, noting differences from standard +Markdown. +Except where noted, these differences can be suppressed by using the +\f[C]markdown_strict\f[] format instead of \f[C]markdown\f[]. +Extensions can be enabled or disabled to specify the behavior more +granularly. +They are described in the following. +See also Extensions above, for extensions that work also on other +formats. +.SS Philosophy +.PP +Markdown is designed to be easy to write, and, even more importantly, +easy to read: +.RS +.PP +A Markdown\-formatted document should be publishable as\-is, as plain +text, without looking like it\[aq]s been marked up with tags or +formatting instructions. +\-\- John Gruber +.RE +.PP +This principle has guided pandoc\[aq]s decisions in finding syntax for +tables, footnotes, and other extensions. +.PP +There is, however, one respect in which pandoc\[aq]s aims are different +from the original aims of Markdown. +Whereas Markdown was originally designed with HTML generation in mind, +pandoc is designed for multiple output formats. +Thus, while pandoc allows the embedding of raw HTML, it discourages it, +and provides other, non\-HTMLish ways of representing important document +elements like definition lists, tables, mathematics, and footnotes. +.SS Paragraphs +.PP +A paragraph is one or more lines of text followed by one or more blank +lines. +Newlines are treated as spaces, so you can reflow your paragraphs as you +like. +If you need a hard line break, put two or more spaces at the end of a +line. +.SS Extension: \f[C]escaped_line_breaks\f[] +.PP +A backslash followed by a newline is also a hard line break. +Note: in multiline and grid table cells, this is the only way to create +a hard line break, since trailing spaces in the cells are ignored. +.SS Headers +.PP +There are two kinds of headers: Setext and ATX. +.SS Setext\-style headers +.PP +A setext\-style header is a line of text "underlined" with a row of +\f[C]=\f[] signs (for a level one header) or \f[C]\-\f[] signs (for a +level two header): +.IP +.nf +\f[C] +A\ level\-one\ header +================== + +A\ level\-two\ header +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- +\f[] +.fi +.PP +The header text can contain inline formatting, such as emphasis (see +Inline formatting, below). +.SS ATX\-style headers +.PP +An ATX\-style header consists of one to six \f[C]#\f[] signs and a line +of text, optionally followed by any number of \f[C]#\f[] signs. +The number of \f[C]#\f[] signs at the beginning of the line is the +header level: +.IP +.nf +\f[C] +##\ A\ level\-two\ header + +###\ A\ level\-three\ header\ ### +\f[] +.fi +.PP +As with setext\-style headers, the header text can contain formatting: +.IP +.nf +\f[C] +#\ A\ level\-one\ header\ with\ a\ [link](/url)\ and\ *emphasis* +\f[] +.fi +.SS Extension: \f[C]blank_before_header\f[] +.PP +Standard Markdown syntax does not require a blank line before a header. +Pandoc does require this (except, of course, at the beginning of the +document). +The reason for the requirement is that it is all too easy for a +\f[C]#\f[] to end up at the beginning of a line by accident (perhaps +through line wrapping). +Consider, for example: +.IP +.nf +\f[C] +I\ like\ several\ of\ their\ flavors\ of\ ice\ cream: +#22,\ for\ example,\ and\ #5. +\f[] +.fi +.SS Extension: \f[C]space_in_atx_header\f[] +.PP +Many Markdown implementations do not require a space between the opening +\f[C]#\f[]s of an ATX header and the header text, so that +\f[C]#5\ bolt\f[] and \f[C]#hashtag\f[] count as headers. +With this extension, pandoc does require the space. +.SS Header identifiers +.PP +See also the \f[C]auto_identifiers\f[] extension above. +.SS Extension: \f[C]header_attributes\f[] +.PP +Headers can be assigned attributes using this syntax at the end of the +line containing the header text: +.IP +.nf +\f[C] +{#identifier\ .class\ .class\ key=value\ key=value} +\f[] +.fi +.PP +Thus, for example, the following headers will all be assigned the +identifier \f[C]foo\f[]: +.IP +.nf +\f[C] +#\ My\ header\ {#foo} + +##\ My\ header\ ##\ \ \ \ {#foo} + +My\ other\ header\ \ \ {#foo} +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- +\f[] +.fi +.PP +(This syntax is compatible with PHP Markdown Extra.) +.PP +Note that although this syntax allows assignment of classes and +key/value attributes, writers generally don\[aq]t use all of this +information. +Identifiers, classes, and key/value attributes are used in HTML and +HTML\-based formats such as EPUB and slidy. +Identifiers are used for labels and link anchors in the LaTeX, ConTeXt, +Textile, and AsciiDoc writers. +.PP +Headers with the class \f[C]unnumbered\f[] will not be numbered, even if +\f[C]\-\-number\-sections\f[] is specified. +A single hyphen (\f[C]\-\f[]) in an attribute context is equivalent to +\f[C]\&.unnumbered\f[], and preferable in non\-English documents. +So, +.IP +.nf +\f[C] +#\ My\ header\ {\-} +\f[] +.fi +.PP +is just the same as +.IP +.nf +\f[C] +#\ My\ header\ {.unnumbered} +\f[] +.fi +.SS Extension: \f[C]implicit_header_references\f[] +.PP +Pandoc behaves as if reference links have been defined for each header. +So, to link to a header +.IP +.nf +\f[C] +#\ Header\ identifiers\ in\ HTML +\f[] +.fi +.PP +you can simply write +.IP +.nf +\f[C] +[Header\ identifiers\ in\ HTML] +\f[] +.fi +.PP +or +.IP +.nf +\f[C] +[Header\ identifiers\ in\ HTML][] +\f[] +.fi +.PP +or +.IP +.nf +\f[C] +[the\ section\ on\ header\ identifiers][header\ identifiers\ in +HTML] +\f[] +.fi +.PP +instead of giving the identifier explicitly: +.IP +.nf +\f[C] +[Header\ identifiers\ in\ HTML](#header\-identifiers\-in\-html) +\f[] +.fi +.PP +If there are multiple headers with identical text, the corresponding +reference will link to the first one only, and you will need to use +explicit links to link to the others, as described above. +.PP +Like regular reference links, these references are case\-insensitive. +.PP +Explicit link reference definitions always take priority over implicit +header references. +So, in the following example, the link will point to \f[C]bar\f[], not +to \f[C]#foo\f[]: +.IP +.nf +\f[C] +#\ Foo + +[foo]:\ bar + +See\ [foo] +\f[] +.fi +.SS Block quotations +.PP +Markdown uses email conventions for quoting blocks of text. +A block quotation is one or more paragraphs or other block elements +(such as lists or headers), with each line preceded by a \f[C]>\f[] +character and an optional space. +(The \f[C]>\f[] need not start at the left margin, but it should not be +indented more than three spaces.) +.IP +.nf +\f[C] +>\ This\ is\ a\ block\ quote.\ This +>\ paragraph\ has\ two\ lines. +> +>\ 1.\ This\ is\ a\ list\ inside\ a\ block\ quote. +>\ 2.\ Second\ item. +\f[] +.fi +.PP +A "lazy" form, which requires the \f[C]>\f[] character only on the first +line of each block, is also allowed: +.IP +.nf +\f[C] +>\ This\ is\ a\ block\ quote.\ This +paragraph\ has\ two\ lines. + +>\ 1.\ This\ is\ a\ list\ inside\ a\ block\ quote. +2.\ Second\ item. +\f[] +.fi +.PP +Among the block elements that can be contained in a block quote are +other block quotes. +That is, block quotes can be nested: +.IP +.nf +\f[C] +>\ This\ is\ a\ block\ quote. +> +>\ >\ A\ block\ quote\ within\ a\ block\ quote. +\f[] +.fi +.PP +If the \f[C]>\f[] character is followed by an optional space, that space +will be considered part of the block quote marker and not part of the +indentation of the contents. +Thus, to put an indented code block in a block quote, you need five +spaces after the \f[C]>\f[]: +.IP +.nf +\f[C] +>\ \ \ \ \ code +\f[] +.fi +.SS Extension: \f[C]blank_before_blockquote\f[] +.PP +Standard Markdown syntax does not require a blank line before a block +quote. +Pandoc does require this (except, of course, at the beginning of the +document). +The reason for the requirement is that it is all too easy for a +\f[C]>\f[] to end up at the beginning of a line by accident (perhaps +through line wrapping). +So, unless the \f[C]markdown_strict\f[] format is used, the following +does not produce a nested block quote in pandoc: +.IP +.nf +\f[C] +>\ This\ is\ a\ block\ quote. +>>\ Nested. +\f[] +.fi +.SS Verbatim (code) blocks +.SS Indented code blocks +.PP +A block of text indented four spaces (or one tab) is treated as verbatim +text: that is, special characters do not trigger special formatting, and +all spaces and line breaks are preserved. +For example, +.IP +.nf +\f[C] +\ \ \ \ if\ (a\ >\ 3)\ { +\ \ \ \ \ \ moveShip(5\ *\ gravity,\ DOWN); +\ \ \ \ } +\f[] +.fi +.PP +The initial (four space or one tab) indentation is not considered part +of the verbatim text, and is removed in the output. +.PP +Note: blank lines in the verbatim text need not begin with four spaces. +.SS Fenced code blocks +.SS Extension: \f[C]fenced_code_blocks\f[] +.PP +In addition to standard indented code blocks, pandoc supports +\f[I]fenced\f[] code blocks. +These begin with a row of three or more tildes (\f[C]~\f[]) and end with +a row of tildes that must be at least as long as the starting row. +Everything between these lines is treated as code. +No indentation is necessary: +.IP +.nf +\f[C] +~~~~~~~ +if\ (a\ >\ 3)\ { +\ \ moveShip(5\ *\ gravity,\ DOWN); +} +~~~~~~~ +\f[] +.fi +.PP +Like regular code blocks, fenced code blocks must be separated from +surrounding text by blank lines. +.PP +If the code itself contains a row of tildes or backticks, just use a +longer row of tildes or backticks at the start and end: +.IP +.nf +\f[C] +~~~~~~~~~~~~~~~~ +~~~~~~~~~~ +code\ including\ tildes +~~~~~~~~~~ +~~~~~~~~~~~~~~~~ +\f[] +.fi +.SS Extension: \f[C]backtick_code_blocks\f[] +.PP +Same as \f[C]fenced_code_blocks\f[], but uses backticks (\f[C]`\f[]) +instead of tildes (\f[C]~\f[]). +.SS Extension: \f[C]fenced_code_attributes\f[] +.PP +Optionally, you may attach attributes to fenced or backtick code block +using this syntax: +.IP +.nf +\f[C] +~~~~\ {#mycode\ .haskell\ .numberLines\ startFrom="100"} +qsort\ []\ \ \ \ \ =\ [] +qsort\ (x:xs)\ =\ qsort\ (filter\ (<\ x)\ xs)\ ++\ [x]\ ++ +\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ qsort\ (filter\ (>=\ x)\ xs) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +\f[] +.fi +.PP +Here \f[C]mycode\f[] is an identifier, \f[C]haskell\f[] and +\f[C]numberLines\f[] are classes, and \f[C]startFrom\f[] is an attribute +with value \f[C]100\f[]. +Some output formats can use this information to do syntax highlighting. +Currently, the only output formats that uses this information are HTML, +LaTeX, Docx, and Ms. +If highlighting is supported for your output format and language, then +the code block above will appear highlighted, with numbered lines. +(To see which languages are supported, type +\f[C]pandoc\ \-\-list\-highlight\-languages\f[].) Otherwise, the code +block above will appear as follows: +.IP +.nf +\f[C] + +\ \ +\ \ ... +\ \ + +\f[] +.fi +.PP +The \f[C]numberLines\f[] (or \f[C]number\-lines\f[]) class will cause +the lines of the code block to be numbered, starting with \f[C]1\f[] or +the value of the \f[C]startFrom\f[] attribute. +The \f[C]lineAnchors\f[] (or \f[C]line\-anchors\f[]) class will cause +the lines to be clickable anchors in HTML output. +.PP +A shortcut form can also be used for specifying the language of the code +block: +.IP +.nf +\f[C] +```haskell +qsort\ []\ =\ [] +``` +\f[] +.fi +.PP +This is equivalent to: +.IP +.nf +\f[C] +```\ {.haskell} +qsort\ []\ =\ [] +``` +\f[] +.fi +.PP +If the \f[C]fenced_code_attributes\f[] extension is disabled, but input +contains class attribute(s) for the code block, the first class +attribute will be printed after the opening fence as a bare word. +.PP +To prevent all highlighting, use the \f[C]\-\-no\-highlight\f[] flag. +To set the highlighting style, use \f[C]\-\-highlight\-style\f[]. +For more information on highlighting, see Syntax highlighting, below. +.SS Line blocks +.SS Extension: \f[C]line_blocks\f[] +.PP +A line block is a sequence of lines beginning with a vertical bar +(\f[C]|\f[]) followed by a space. +The division into lines will be preserved in the output, as will any +leading spaces; otherwise, the lines will be formatted as Markdown. +This is useful for verse and addresses: +.IP +.nf +\f[C] +|\ The\ limerick\ packs\ laughs\ anatomical +|\ In\ space\ that\ is\ quite\ economical. +|\ \ \ \ But\ the\ good\ ones\ I\[aq]ve\ seen +|\ \ \ \ So\ seldom\ are\ clean +|\ And\ the\ clean\ ones\ so\ seldom\ are\ comical + +|\ 200\ Main\ St. +|\ Berkeley,\ CA\ 94718 +\f[] +.fi +.PP +The lines can be hard\-wrapped if needed, but the continuation line must +begin with a space. +.IP +.nf +\f[C] +|\ The\ Right\ Honorable\ Most\ Venerable\ and\ Righteous\ Samuel\ L. +\ \ Constable,\ Jr. +|\ 200\ Main\ St. +|\ Berkeley,\ CA\ 94718 +\f[] +.fi +.PP +This syntax is borrowed from reStructuredText. +.SS Lists +.SS Bullet lists +.PP +A bullet list is a list of bulleted list items. +A bulleted list item begins with a bullet (\f[C]*\f[], \f[C]+\f[], or +\f[C]\-\f[]). +Here is a simple example: +.IP +.nf +\f[C] +*\ one +*\ two +*\ three +\f[] +.fi +.PP +This will produce a "compact" list. +If you want a "loose" list, in which each item is formatted as a +paragraph, put spaces between the items: +.IP +.nf +\f[C] +*\ one + +*\ two + +*\ three +\f[] +.fi +.PP +The bullets need not be flush with the left margin; they may be indented +one, two, or three spaces. +The bullet must be followed by whitespace. +.PP +List items look best if subsequent lines are flush with the first line +(after the bullet): +.IP +.nf +\f[C] +*\ here\ is\ my\ first +\ \ list\ item. +*\ and\ my\ second. +\f[] +.fi +.PP +But Markdown also allows a "lazy" format: +.IP +.nf +\f[C] +*\ here\ is\ my\ first +list\ item. +*\ and\ my\ second. +\f[] +.fi +.SS Block content in list items +.PP +A list item may contain multiple paragraphs and other block\-level +content. +However, subsequent paragraphs must be preceded by a blank line and +indented to line up with the first non\-space content after the list +marker. +.IP +.nf +\f[C] +\ \ *\ First\ paragraph. + +\ \ \ \ Continued. + +\ \ *\ Second\ paragraph.\ With\ a\ code\ block,\ which\ must\ be\ indented +\ \ \ \ eight\ spaces: + +\ \ \ \ \ \ \ \ {\ code\ } +\f[] +.fi +.PP +Exception: if the list marker is followed by an indented code block, +which must begin 5 spaces after the list marker, then subsequent +paragraphs must begin two columns after the last character of the list +marker: +.IP +.nf +\f[C] +*\ \ \ \ \ code + +\ \ continuation\ paragraph +\f[] +.fi +.PP +List items may include other lists. +In this case the preceding blank line is optional. +The nested list must be indented to line up with the first non\-space +character after the list marker of the containing list item. +.IP +.nf +\f[C] +*\ fruits +\ \ +\ apples +\ \ \ \ \-\ macintosh +\ \ \ \ \-\ red\ delicious +\ \ +\ pears +\ \ +\ peaches +*\ vegetables +\ \ +\ broccoli +\ \ +\ chard +\f[] +.fi +.PP +As noted above, Markdown allows you to write list items "lazily," +instead of indenting continuation lines. +However, if there are multiple paragraphs or other blocks in a list +item, the first line of each must be indented. +.IP +.nf +\f[C] ++\ A\ lazy,\ lazy,\ list +item. + ++\ Another\ one;\ this\ looks +bad\ but\ is\ legal. + +\ \ \ \ Second\ paragraph\ of\ second +list\ item. +\f[] +.fi +.SS Ordered lists +.PP +Ordered lists work just like bulleted lists, except that the items begin +with enumerators rather than bullets. +.PP +In standard Markdown, enumerators are decimal numbers followed by a +period and a space. +The numbers themselves are ignored, so there is no difference between +this list: +.IP +.nf +\f[C] +1.\ \ one +2.\ \ two +3.\ \ three +\f[] +.fi +.PP +and this one: +.IP +.nf +\f[C] +5.\ \ one +7.\ \ two +1.\ \ three +\f[] +.fi +.SS Extension: \f[C]fancy_lists\f[] +.PP +Unlike standard Markdown, pandoc allows ordered list items to be marked +with uppercase and lowercase letters and roman numerals, in addition to +Arabic numerals. +List markers may be enclosed in parentheses or followed by a single +right\-parentheses or period. +They must be separated from the text that follows by at least one space, +and, if the list marker is a capital letter with a period, by at least +two spaces. +.PP +The \f[C]fancy_lists\f[] extension also allows \[aq]\f[C]#\f[]\[aq] to +be used as an ordered list marker in place of a numeral: +.IP +.nf +\f[C] +#.\ one +#.\ two +\f[] +.fi +.SS Extension: \f[C]startnum\f[] +.PP +Pandoc also pays attention to the type of list marker used, and to the +starting number, and both of these are preserved where possible in the +output format. +Thus, the following yields a list with numbers followed by a single +parenthesis, starting with 9, and a sublist with lowercase roman +numerals: +.IP +.nf +\f[C] +\ 9)\ \ Ninth +10)\ \ Tenth +11)\ \ Eleventh +\ \ \ \ \ \ \ i.\ subone +\ \ \ \ \ \ ii.\ subtwo +\ \ \ \ \ iii.\ subthree +\f[] +.fi +.PP +Pandoc will start a new list each time a different type of list marker +is used. +So, the following will create three lists: +.IP +.nf +\f[C] +(2)\ Two +(5)\ Three +1.\ \ Four +*\ \ \ Five +\f[] +.fi +.PP +If default list markers are desired, use \f[C]#.\f[]: +.IP +.nf +\f[C] +#.\ \ one +#.\ \ two +#.\ \ three +\f[] +.fi +.SS Definition lists +.SS Extension: \f[C]definition_lists\f[] +.PP +Pandoc supports definition lists, using the syntax of PHP Markdown Extra +with some extensions. +.IP +.nf +\f[C] +Term\ 1 + +:\ \ \ Definition\ 1 + +Term\ 2\ with\ *inline\ markup* + +:\ \ \ Definition\ 2 + +\ \ \ \ \ \ \ \ {\ some\ code,\ part\ of\ Definition\ 2\ } + +\ \ \ \ Third\ paragraph\ of\ definition\ 2. +\f[] +.fi +.PP +Each term must fit on one line, which may optionally be followed by a +blank line, and must be followed by one or more definitions. +A definition begins with a colon or tilde, which may be indented one or +two spaces. +.PP +A term may have multiple definitions, and each definition may consist of +one or more block elements (paragraph, code block, list, etc.), each +indented four spaces or one tab stop. +The body of the definition (including the first line, aside from the +colon or tilde) should be indented four spaces. +However, as with other Markdown lists, you can "lazily" omit indentation +except at the beginning of a paragraph or other block element: +.IP +.nf +\f[C] +Term\ 1 + +:\ \ \ Definition +with\ lazy\ continuation. + +\ \ \ \ Second\ paragraph\ of\ the\ definition. +\f[] +.fi +.PP +If you leave space before the definition (as in the example above), the +text of the definition will be treated as a paragraph. +In some output formats, this will mean greater spacing between +term/definition pairs. +For a more compact definition list, omit the space before the +definition: +.IP +.nf +\f[C] +Term\ 1 +\ \ ~\ Definition\ 1 + +Term\ 2 +\ \ ~\ Definition\ 2a +\ \ ~\ Definition\ 2b +\f[] +.fi +.PP +Note that space between items in a definition list is required. +(A variant that loosens this requirement, but disallows "lazy" hard +wrapping, can be activated with \f[C]compact_definition_lists\f[]: see +Non\-pandoc extensions, below.) +.SS Numbered example lists +.SS Extension: \f[C]example_lists\f[] +.PP +The special list marker \f[C]\@\f[] can be used for sequentially +numbered examples. +The first list item with a \f[C]\@\f[] marker will be numbered +\[aq]1\[aq], the next \[aq]2\[aq], and so on, throughout the document. +The numbered examples need not occur in a single list; each new list +using \f[C]\@\f[] will take up where the last stopped. +So, for example: +.IP +.nf +\f[C] +(\@)\ \ My\ first\ example\ will\ be\ numbered\ (1). +(\@)\ \ My\ second\ example\ will\ be\ numbered\ (2). + +Explanation\ of\ examples. + +(\@)\ \ My\ third\ example\ will\ be\ numbered\ (3). +\f[] +.fi +.PP +Numbered examples can be labeled and referred to elsewhere in the +document: +.IP +.nf +\f[C] +(\@good)\ \ This\ is\ a\ good\ example. + +As\ (\@good)\ illustrates,\ ... +\f[] +.fi +.PP +The label can be any string of alphanumeric characters, underscores, or +hyphens. +.PP +Note: continuation paragraphs in example lists must always be indented +four spaces, regardless of the length of the list marker. +That is, example lists always behave as if the \f[C]four_space_rule\f[] +extension is set. +This is because example labels tend to be long, and indenting content to +the first non\-space character after the label would be awkward. +.SS Compact and loose lists +.PP +Pandoc behaves differently from \f[C]Markdown.pl\f[] on some "edge +cases" involving lists. +Consider this source: +.IP +.nf +\f[C] ++\ \ \ First ++\ \ \ Second: +\ \ \ \ \-\ \ \ Fee +\ \ \ \ \-\ \ \ Fie +\ \ \ \ \-\ \ \ Foe + ++\ \ \ Third +\f[] +.fi +.PP +Pandoc transforms this into a "compact list" (with no \f[C]

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

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

    This\ is\ the\ abstract.

    +

    It\ consists\ of\ two\ paragraphs.

    +\f[] +.fi +.PP +Variables can contain arbitrary YAML structures, but the template must +match this structure. +The \f[C]author\f[] variable in the default templates expects a simple +list or string, but can be changed to support more complicated +structures. +The following combination, for example, would add an affiliation to the +author if one is given: +.IP +.nf +\f[C] +\-\-\- +title:\ The\ document\ title +author: +\-\ name:\ Author\ One +\ \ affiliation:\ University\ of\ Somewhere +\-\ name:\ Author\ Two +\ \ affiliation:\ University\ of\ Nowhere +\&... +\f[] +.fi +.PP +To use the structured authors in the example above, you would need a +custom template: +.IP +.nf +\f[C] +$for(author)$ +$if(author.name)$ +$author.name$$if(author.affiliation)$\ ($author.affiliation$)$endif$ +$else$ +$author$ +$endif$ +$endfor$ +\f[] +.fi +.SS Backslash escapes +.SS Extension: \f[C]all_symbols_escapable\f[] +.PP +Except inside a code block or inline code, any punctuation or space +character preceded by a backslash will be treated literally, even if it +would normally indicate formatting. +Thus, for example, if one writes +.IP +.nf +\f[C] +*\\*hello\\** +\f[] +.fi +.PP +one will get +.IP +.nf +\f[C] +*hello* +\f[] +.fi +.PP +instead of +.IP +.nf +\f[C] +hello +\f[] +.fi +.PP +This rule is easier to remember than standard Markdown\[aq]s rule, which +allows only the following characters to be backslash\-escaped: +.IP +.nf +\f[C] +\\`*_{}[]()>#+\-.! +\f[] +.fi +.PP +(However, if the \f[C]markdown_strict\f[] format is used, the standard +Markdown rule will be used.) +.PP +A backslash\-escaped space is parsed as a nonbreaking space. +It will appear in TeX output as \f[C]~\f[] and in HTML and XML as +\f[C]\\ \f[] or \f[C]\\ \f[]. +.PP +A backslash\-escaped newline (i.e. +a backslash occurring at the end of a line) is parsed as a hard line +break. +It will appear in TeX output as \f[C]\\\\\f[] and in HTML as +\f[C]\f[]. +This is a nice alternative to Markdown\[aq]s "invisible" way of +indicating hard line breaks using two trailing spaces on a line. +.PP +Backslash escapes do not work in verbatim contexts. +.SS Inline formatting +.SS Emphasis +.PP +To \f[I]emphasize\f[] some text, surround it with \f[C]*\f[]s or +\f[C]_\f[], like this: +.IP +.nf +\f[C] +This\ text\ is\ _emphasized\ with\ underscores_,\ and\ this +is\ *emphasized\ with\ asterisks*. +\f[] +.fi +.PP +Double \f[C]*\f[] or \f[C]_\f[] produces \f[B]strong emphasis\f[]: +.IP +.nf +\f[C] +This\ is\ **strong\ emphasis**\ and\ __with\ underscores__. +\f[] +.fi +.PP +A \f[C]*\f[] or \f[C]_\f[] character surrounded by spaces, or +backslash\-escaped, will not trigger emphasis: +.IP +.nf +\f[C] +This\ is\ *\ not\ emphasized\ *,\ and\ \\*neither\ is\ this\\*. +\f[] +.fi +.SS Extension: \f[C]intraword_underscores\f[] +.PP +Because \f[C]_\f[] is sometimes used inside words and identifiers, +pandoc does not interpret a \f[C]_\f[] surrounded by alphanumeric +characters as an emphasis marker. +If you want to emphasize just part of a word, use \f[C]*\f[]: +.IP +.nf +\f[C] +feas*ible*,\ not\ feas*able*. +\f[] +.fi +.SS Strikeout +.SS Extension: \f[C]strikeout\f[] +.PP +To strikeout a section of text with a horizontal line, begin and end it +with \f[C]~~\f[]. +Thus, for example, +.IP +.nf +\f[C] +This\ ~~is\ deleted\ text.~~ +\f[] +.fi +.SS Superscripts and subscripts +.SS Extension: \f[C]superscript\f[], \f[C]subscript\f[] +.PP +Superscripts may be written by surrounding the superscripted text by +\f[C]^\f[] characters; subscripts may be written by surrounding the +subscripted text by \f[C]~\f[] characters. +Thus, for example, +.IP +.nf +\f[C] +H~2~O\ is\ a\ liquid.\ \ 2^10^\ is\ 1024. +\f[] +.fi +.PP +If the superscripted or subscripted text contains spaces, these spaces +must be escaped with backslashes. +(This is to prevent accidental superscripting and subscripting through +the ordinary use of \f[C]~\f[] and \f[C]^\f[].) Thus, if you want the +letter P with \[aq]a cat\[aq] in subscripts, use \f[C]P~a\\\ cat~\f[], +not \f[C]P~a\ cat~\f[]. +.SS Verbatim +.PP +To make a short span of text verbatim, put it inside backticks: +.IP +.nf +\f[C] +What\ is\ the\ difference\ between\ `>>=`\ and\ `>>`? +\f[] +.fi +.PP +If the verbatim text includes a backtick, use double backticks: +.IP +.nf +\f[C] +Here\ is\ a\ literal\ backtick\ ``\ `\ ``. +\f[] +.fi +.PP +(The spaces after the opening backticks and before the closing backticks +will be ignored.) +.PP +The general rule is that a verbatim span starts with a string of +consecutive backticks (optionally followed by a space) and ends with a +string of the same number of backticks (optionally preceded by a space). +.PP +Note that backslash\-escapes (and other Markdown constructs) do not work +in verbatim contexts: +.IP +.nf +\f[C] +This\ is\ a\ backslash\ followed\ by\ an\ asterisk:\ `\\*`. +\f[] +.fi +.SS Extension: \f[C]inline_code_attributes\f[] +.PP +Attributes can be attached to verbatim text, just as with fenced code +blocks: +.IP +.nf +\f[C] +`<$>`{.haskell} +\f[] +.fi +.SS Small caps +.PP +To write small caps, use the \f[C]smallcaps\f[] class: +.IP +.nf +\f[C] +[Small\ caps]{.smallcaps} +\f[] +.fi +.PP +Or, without the \f[C]bracketed_spans\f[] extension: +.IP +.nf +\f[C] +Small\ caps +\f[] +.fi +.PP +For compatibility with other Markdown flavors, CSS is also supported: +.IP +.nf +\f[C] +Small\ caps +\f[] +.fi +.PP +This will work in all output formats that support small caps. +.SS Math +.SS Extension: \f[C]tex_math_dollars\f[] +.PP +Anything between two \f[C]$\f[] characters will be treated as TeX math. +The opening \f[C]$\f[] must have a non\-space character immediately to +its right, while the closing \f[C]$\f[] must have a non\-space character +immediately to its left, and must not be followed immediately by a +digit. +Thus, \f[C]$20,000\ and\ $30,000\f[] won\[aq]t parse as math. +If for some reason you need to enclose text in literal \f[C]$\f[] +characters, backslash\-escape them and they won\[aq]t be treated as math +delimiters. +.PP +TeX math will be printed in all output formats. +How it is rendered depends on the output format: +.TP +.B Markdown, LaTeX, Emacs Org mode, ConTeXt, ZimWiki +It will appear verbatim between \f[C]$\f[] characters. +.RS +.RE +.TP +.B reStructuredText +It will be rendered using an interpreted text role \f[C]:math:\f[]. +.RS +.RE +.TP +.B AsciiDoc +It will be rendered as \f[C]latexmath:[...]\f[]. +.RS +.RE +.TP +.B Texinfo +It will be rendered inside a \f[C]\@math\f[] command. +.RS +.RE +.TP +.B groff man +It will be rendered verbatim without \f[C]$\f[]\[aq]s. +.RS +.RE +.TP +.B MediaWiki, DokuWiki +It will be rendered inside \f[C]\f[] tags. +.RS +.RE +.TP +.B Textile +It will be rendered inside \f[C]\f[] tags. +.RS +.RE +.TP +.B RTF, OpenDocument +It will be rendered, if possible, using Unicode characters, and will +otherwise appear verbatim. +.RS +.RE +.TP +.B ODT +It will be rendered, if possible, using MathML. +.RS +.RE +.TP +.B DocBook +If the \f[C]\-\-mathml\f[] flag is used, it will be rendered using +MathML in an \f[C]inlineequation\f[] or \f[C]informalequation\f[] tag. +Otherwise it will be rendered, if possible, using Unicode characters. +.RS +.RE +.TP +.B Docx +It will be rendered using OMML math markup. +.RS +.RE +.TP +.B FictionBook2 +If the \f[C]\-\-webtex\f[] option is used, formulas are rendered as +images using CodeCogs or other compatible web service, downloaded and +embedded in the e\-book. +Otherwise, they will appear verbatim. +.RS +.RE +.TP +.B HTML, Slidy, DZSlides, S5, EPUB +The way math is rendered in HTML will depend on the command\-line +options selected. +Therefore see Math rendering in HTML above. +.RS +.RE +.SS Raw HTML +.SS Extension: \f[C]raw_html\f[] +.PP +Markdown allows you to insert raw HTML (or DocBook) anywhere in a +document (except verbatim contexts, where \f[C]<\f[], \f[C]>\f[], and +\f[C]&\f[] are interpreted literally). +(Technically this is not an extension, since standard Markdown allows +it, but it has been made an extension so that it can be disabled if +desired.) +.PP +The raw HTML is passed through unchanged in HTML, S5, Slidy, Slideous, +DZSlides, EPUB, Markdown, Emacs Org mode, and Textile output, and +suppressed in other formats. +.SS Extension: \f[C]markdown_in_html_blocks\f[] +.PP +Standard Markdown allows you to include HTML "blocks": blocks of HTML +between balanced tags that are separated from the surrounding text with +blank lines, and start and end at the left margin. +Within these blocks, everything is interpreted as HTML, not Markdown; so +(for example), \f[C]*\f[] does not signify emphasis. +.PP +Pandoc behaves this way when the \f[C]markdown_strict\f[] format is +used; but by default, pandoc interprets material between HTML block tags +as Markdown. +Thus, for example, pandoc will turn +.IP +.nf +\f[C] +
    " .. caption .. "
    ' .. h .. '
    ' .. c .. '
    + + + + +
    *one*[a\ link](http://google.com)
    +\f[] +.fi +.PP +into +.IP +.nf +\f[C] + + + + + +
    onea\ link
    +\f[] +.fi +.PP +whereas \f[C]Markdown.pl\f[] will preserve it as is. +.PP +There is one exception to this rule: text between \f[C] + + +
    +
    +
    + + +
    +
    +
    +

    My S5 Document

    +

    Sam Smith
    Jen Jones

    +

    July 15, 2006

    +
    +
    +

    First slide

    +
      +
    • first bullet
    • +
    • second bullet
    • +
    +
    +
    +

    Math

    +
      +
    • $\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$
    • +
    +
    +
    + + diff --git a/test/s5-fancy.html b/test/s5-fancy.html new file mode 100644 index 0000000..9f724af --- /dev/null +++ b/test/s5-fancy.html @@ -0,0 +1,262 @@ + + + + + + + + + + + + My S5 Document + + + + + + + + + + + + + + +
    +
    +
    + + +
    +
    +
    +

    My S5 Document

    +

    Sam Smith
    Jen Jones

    +

    July 15, 2006

    +
    +
    +

    First slide

    +
      +
    • first bullet
    • +
    • second bullet
    • +
    +
    +
    +

    Math

    +
      +
    • $\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$
    • +
    +
    +
    + + diff --git a/test/s5-fragment.html b/test/s5-fragment.html new file mode 100644 index 0000000..81c578d --- /dev/null +++ b/test/s5-fragment.html @@ -0,0 +1,9 @@ +

    First slide

    +
      +
    • first bullet
    • +
    • second bullet
    • +
    +

    Math

    +
      +
    • $\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$
    • +
    diff --git a/test/s5-inserts.html b/test/s5-inserts.html new file mode 100644 index 0000000..efde179 --- /dev/null +++ b/test/s5-inserts.html @@ -0,0 +1,39 @@ + + + + + + + + + + My S5 Document + + + STUFF INSERTED + + +STUFF INSERTED + +

    First slide

    +
      +
    • first bullet
    • +
    • second bullet
    • +
    +

    Math

    +
      +
    • $\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$
    • +
    +STUFF INSERTED + + diff --git a/test/s5.native b/test/s5.native new file mode 100644 index 0000000..5796b74 --- /dev/null +++ b/test/s5.native @@ -0,0 +1,8 @@ +Pandoc (Meta {unMeta = fromList [("author",MetaList [MetaInlines [Str "Sam",Space,Str "Smith"],MetaInlines [Str "Jen",Space,Str "Jones"]]),("date",MetaInlines [Str "July",Space,Str "15,",Space,Str "2006"]),("title",MetaInlines [Str "My",Space,Str "S5",Space,Str "Document"])]}) +[Header 1 ("first-slide",[],[]) [Str "First",Space,Str "slide"] +,BulletList + [[Plain [Str "first",Space,Str "bullet"]] + ,[Plain [Str "second",Space,Str "bullet"]]] +,Header 1 ("math",[],[]) [Str "Math"] +,BulletList + [[Plain [Math InlineMath "\\frac{d}{dx}f(x)=\\lim_{h\\to 0}\\frac{f(x+h)-f(x)}{h}"]]]] diff --git a/test/tables-rstsubset.native b/test/tables-rstsubset.native new file mode 100644 index 0000000..8b7ccdf --- /dev/null +++ b/test/tables-rstsubset.native @@ -0,0 +1,114 @@ +[Para [Str "Simple",Space,Str "table",Space,Str "with",Space,Str "caption:"] +,Table [Str "Demonstration",Space,Str "of",Space,Str "simple",Space,Str "table",Space,Str "syntax."] [AlignDefault,AlignDefault,AlignDefault,AlignDefault] [0.1,8.75e-2,0.1125,0.125] + [[Plain [Str "Right"]] + ,[Plain [Str "Left"]] + ,[Plain [Str "Center"]] + ,[Plain [Str "Default"]]] + [[[Plain [Str "12"]] + ,[Plain [Str "12"]] + ,[Plain [Str "12"]] + ,[Plain [Str "12"]]] + ,[[Plain [Str "123"]] + ,[Plain [Str "123"]] + ,[Plain [Str "123"]] + ,[Plain [Str "123"]]] + ,[[Plain [Str "1"]] + ,[Plain [Str "1"]] + ,[Plain [Str "1"]] + ,[Plain [Str "1"]]]] +,Para [Str "Simple",Space,Str "table",Space,Str "without",Space,Str "caption:"] +,Table [] [AlignDefault,AlignDefault,AlignDefault,AlignDefault] [0.1,8.75e-2,0.1125,0.125] + [[Plain [Str "Right"]] + ,[Plain [Str "Left"]] + ,[Plain [Str "Center"]] + ,[Plain [Str "Default"]]] + [[[Plain [Str "12"]] + ,[Plain [Str "12"]] + ,[Plain [Str "12"]] + ,[Plain [Str "12"]]] + ,[[Plain [Str "123"]] + ,[Plain [Str "123"]] + ,[Plain [Str "123"]] + ,[Plain [Str "123"]]] + ,[[Plain [Str "1"]] + ,[Plain [Str "1"]] + ,[Plain [Str "1"]] + ,[Plain [Str "1"]]]] +,Para [Str "Simple",Space,Str "table",Space,Str "indented",Space,Str "two",Space,Str "spaces:"] +,Table [Str "Demonstration",Space,Str "of",Space,Str "simple",Space,Str "table",Space,Str "syntax."] [AlignDefault,AlignDefault,AlignDefault,AlignDefault] [0.1,8.75e-2,0.1125,0.125] + [[Plain [Str "Right"]] + ,[Plain [Str "Left"]] + ,[Plain [Str "Center"]] + ,[Plain [Str "Default"]]] + [[[Plain [Str "12"]] + ,[Plain [Str "12"]] + ,[Plain [Str "12"]] + ,[Plain [Str "12"]]] + ,[[Plain [Str "123"]] + ,[Plain [Str "123"]] + ,[Plain [Str "123"]] + ,[Plain [Str "123"]]] + ,[[Plain [Str "1"]] + ,[Plain [Str "1"]] + ,[Plain [Str "1"]] + ,[Plain [Str "1"]]]] +,Para [Str "Multiline",Space,Str "table",Space,Str "with",Space,Str "caption:"] +,Table [Str "Here\8217s",Space,Str "the",Space,Str "caption.",Space,Str "It",Space,Str "may",Space,Str "span",Space,Str "multiple",Space,Str "lines."] [AlignDefault,AlignDefault,AlignDefault,AlignDefault] [0.1375,0.125,0.15,0.325] + [[Plain [Str "Centered",SoftBreak,Str "Header"]] + ,[Plain [Str "Left",SoftBreak,Str "Aligned"]] + ,[Plain [Str "Right",SoftBreak,Str "Aligned"]] + ,[Plain [Str "Default",Space,Str "aligned"]]] + [[[Plain [Str "First"]] + ,[Plain [Str "row"]] + ,[Plain [Str "12.0"]] + ,[Plain [Str "Example",Space,Str "of",Space,Str "a",Space,Str "row",Space,Str "that",SoftBreak,Str "spans",Space,Str "multiple",Space,Str "lines."]]] + ,[[Plain [Str "Second"]] + ,[Plain [Str "row"]] + ,[Plain [Str "5.0"]] + ,[Plain [Str "Here\8217s",Space,Str "another",Space,Str "one.",SoftBreak,Str "Note",Space,Str "the",Space,Str "blank",Space,Str "line",SoftBreak,Str "between",Space,Str "rows."]]]] +,Para [Str "Multiline",Space,Str "table",Space,Str "without",Space,Str "caption:"] +,Table [] [AlignDefault,AlignDefault,AlignDefault,AlignDefault] [0.1375,0.125,0.15,0.325] + [[Plain [Str "Centered",SoftBreak,Str "Header"]] + ,[Plain [Str "Left",SoftBreak,Str "Aligned"]] + ,[Plain [Str "Right",SoftBreak,Str "Aligned"]] + ,[Plain [Str "Default",Space,Str "aligned"]]] + [[[Plain [Str "First"]] + ,[Plain [Str "row"]] + ,[Plain [Str "12.0"]] + ,[Plain [Str "Example",Space,Str "of",Space,Str "a",Space,Str "row",Space,Str "that",SoftBreak,Str "spans",Space,Str "multiple",Space,Str "lines."]]] + ,[[Plain [Str "Second"]] + ,[Plain [Str "row"]] + ,[Plain [Str "5.0"]] + ,[Plain [Str "Here\8217s",Space,Str "another",Space,Str "one.",SoftBreak,Str "Note",Space,Str "the",Space,Str "blank",Space,Str "line",SoftBreak,Str "between",Space,Str "rows."]]]] +,Para [Str "Table",Space,Str "without",Space,Str "column",Space,Str "headers:"] +,Table [] [AlignDefault,AlignDefault,AlignDefault,AlignDefault] [7.5e-2,7.5e-2,7.5e-2,7.5e-2] + [[] + ,[] + ,[] + ,[]] + [[[Plain [Str "12"]] + ,[Plain [Str "12"]] + ,[Plain [Str "12"]] + ,[Plain [Str "12"]]] + ,[[Plain [Str "123"]] + ,[Plain [Str "123"]] + ,[Plain [Str "123"]] + ,[Plain [Str "123"]]] + ,[[Plain [Str "1"]] + ,[Plain [Str "1"]] + ,[Plain [Str "1"]] + ,[Plain [Str "1"]]]] +,Para [Str "Multiline",Space,Str "table",Space,Str "without",Space,Str "column",Space,Str "headers:"] +,Table [] [AlignDefault,AlignDefault,AlignDefault,AlignDefault] [0.1375,0.125,0.15,0.325] + [[] + ,[] + ,[] + ,[]] + [[[Plain [Str "First"]] + ,[Plain [Str "row"]] + ,[Plain [Str "12.0"]] + ,[Plain [Str "Example",Space,Str "of",Space,Str "a",Space,Str "row",Space,Str "that",SoftBreak,Str "spans",Space,Str "multiple",Space,Str "lines."]]] + ,[[Plain [Str "Second"]] + ,[Plain [Str "row"]] + ,[Plain [Str "5.0"]] + ,[Plain [Str "Here\8217s",Space,Str "another",Space,Str "one.",SoftBreak,Str "Note",Space,Str "the",Space,Str "blank",Space,Str "line",SoftBreak,Str "between",Space,Str "rows."]]]]] diff --git a/test/tables.asciidoc b/test/tables.asciidoc new file mode 100644 index 0000000..91490a2 --- /dev/null +++ b/test/tables.asciidoc @@ -0,0 +1,67 @@ +Simple table with caption: + +.Demonstration of simple table syntax. +[cols=">,<,^,",options="header",] +|============================ +|Right |Left |Center |Default +|12 |12 |12 |12 +|123 |123 |123 |123 +|1 |1 |1 |1 +|============================ + +Simple table without caption: + +[cols=">,<,^,",options="header",] +|============================ +|Right |Left |Center |Default +|12 |12 |12 |12 +|123 |123 |123 |123 +|1 |1 |1 |1 +|============================ + +Simple table indented two spaces: + +.Demonstration of simple table syntax. +[cols=">,<,^,",options="header",] +|============================ +|Right |Left |Center |Default +|12 |12 |12 |12 +|123 |123 |123 |123 +|1 |1 |1 |1 +|============================ + +Multiline table with caption: + +.Here’s the caption. It may span multiple lines. +[width="78%",cols="^21%,<17%,>20%,<42%",options="header",] +|======================================================================= +|Centered Header |Left Aligned |Right Aligned |Default aligned +|First |row |12.0 |Example of a row that spans multiple lines. +|Second |row |5.0 |Here’s another one. Note the blank line between rows. +|======================================================================= + +Multiline table without caption: + +[width="78%",cols="^21%,<17%,>20%,<42%",options="header",] +|======================================================================= +|Centered Header |Left Aligned |Right Aligned |Default aligned +|First |row |12.0 |Example of a row that spans multiple lines. +|Second |row |5.0 |Here’s another one. Note the blank line between rows. +|======================================================================= + +Table without column headers: + +[cols=">,<,^,>",] +|================== +|12 |12 |12 |12 +|123 |123 |123 |123 +|1 |1 |1 |1 +|================== + +Multiline table without column headers: + +[width="78%",cols="^21%,<17%,>20%,42%",] +|======================================================================= +|First |row |12.0 |Example of a row that spans multiple lines. +|Second |row |5.0 |Here’s another one. Note the blank line between rows. +|======================================================================= diff --git a/test/tables.context b/test/tables.context new file mode 100644 index 0000000..371e559 --- /dev/null +++ b/test/tables.context @@ -0,0 +1,175 @@ +Simple table with caption: + +\placetable{Demonstration of simple table syntax.} +\starttable[|r|l|c|l|] +\HL +\NC Right +\NC Left +\NC Center +\NC Default +\NC\AR +\HL +\NC 12 +\NC 12 +\NC 12 +\NC 12 +\NC\AR +\NC 123 +\NC 123 +\NC 123 +\NC 123 +\NC\AR +\NC 1 +\NC 1 +\NC 1 +\NC 1 +\NC\AR +\HL +\stoptable + +Simple table without caption: + +\placetable[none]{} +\starttable[|r|l|c|l|] +\HL +\NC Right +\NC Left +\NC Center +\NC Default +\NC\AR +\HL +\NC 12 +\NC 12 +\NC 12 +\NC 12 +\NC\AR +\NC 123 +\NC 123 +\NC 123 +\NC 123 +\NC\AR +\NC 1 +\NC 1 +\NC 1 +\NC 1 +\NC\AR +\HL +\stoptable + +Simple table indented two spaces: + +\placetable{Demonstration of simple table syntax.} +\starttable[|r|l|c|l|] +\HL +\NC Right +\NC Left +\NC Center +\NC Default +\NC\AR +\HL +\NC 12 +\NC 12 +\NC 12 +\NC 12 +\NC\AR +\NC 123 +\NC 123 +\NC 123 +\NC 123 +\NC\AR +\NC 1 +\NC 1 +\NC 1 +\NC 1 +\NC\AR +\HL +\stoptable + +Multiline table with caption: + +\placetable{Here's the caption. It may span multiple lines.} +\starttable[|cp(0.15\textwidth)|lp(0.14\textwidth)|rp(0.16\textwidth)|lp(0.34\textwidth)|] +\HL +\NC Centered Header +\NC Left Aligned +\NC Right Aligned +\NC Default aligned +\NC\AR +\HL +\NC First +\NC row +\NC 12.0 +\NC Example of a row that spans multiple lines. +\NC\AR +\NC Second +\NC row +\NC 5.0 +\NC Here's another one. Note the blank line between rows. +\NC\AR +\HL +\stoptable + +Multiline table without caption: + +\placetable[none]{} +\starttable[|cp(0.15\textwidth)|lp(0.14\textwidth)|rp(0.16\textwidth)|lp(0.34\textwidth)|] +\HL +\NC Centered Header +\NC Left Aligned +\NC Right Aligned +\NC Default aligned +\NC\AR +\HL +\NC First +\NC row +\NC 12.0 +\NC Example of a row that spans multiple lines. +\NC\AR +\NC Second +\NC row +\NC 5.0 +\NC Here's another one. Note the blank line between rows. +\NC\AR +\HL +\stoptable + +Table without column headers: + +\placetable[none]{} +\starttable[|r|l|c|r|] +\HL +\NC 12 +\NC 12 +\NC 12 +\NC 12 +\NC\AR +\NC 123 +\NC 123 +\NC 123 +\NC 123 +\NC\AR +\NC 1 +\NC 1 +\NC 1 +\NC 1 +\NC\AR +\HL +\stoptable + +Multiline table without column headers: + +\placetable[none]{} +\starttable[|cp(0.15\textwidth)|lp(0.14\textwidth)|rp(0.16\textwidth)|lp(0.34\textwidth)|] +\HL +\NC First +\NC row +\NC 12.0 +\NC Example of a row that spans multiple lines. +\NC\AR +\NC Second +\NC row +\NC 5.0 +\NC Here's another one. Note the blank line between rows. +\NC\AR +\HL +\stoptable diff --git a/test/tables.custom b/test/tables.custom new file mode 100644 index 0000000..410b68d --- /dev/null +++ b/test/tables.custom @@ -0,0 +1,201 @@ +

    Simple table with caption:

    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Demonstration of simple table syntax.
    RightLeftCenterDefault
    12121212
    123123123123
    1111
    Simple table without caption:

    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    RightLeftCenterDefault
    12121212
    123123123123
    1111
    Simple table indented two spaces:

    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Demonstration of simple table syntax.
    RightLeftCenterDefault
    12121212
    123123123123
    1111
    Multiline table with caption:

    + + + +++++ + + + + + + + + + + + + + + + + + +
    Here’s the caption. +It may span multiple lines.
    Centered +HeaderLeft +AlignedRight +AlignedDefault aligned
    Firstrow12.0Example of a row that spans +multiple lines.
    Secondrow5.0Here’s another one. Note +the blank line between rows.
    Multiline table without caption:

    + + +++++ + + + + + + + + + + + + + + + + + +
    Centered +HeaderLeft +AlignedRight +AlignedDefault aligned
    Firstrow12.0Example of a row that spans +multiple lines.
    Secondrow5.0Here’s another one. Note +the blank line between rows.
    Table without column headers:

    + + + + + + + + + + + + + + + + + + + + +
    12121212
    123123123123
    1111
    Multiline table without column headers:

    + + +++++ + + + + + + + + + + + +
    Firstrow12.0Example of a row that spans +multiple lines.
    Secondrow5.0Here’s another one. Note +the blank line between rows.
    + 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. + + + + + diff --git a/test/tables.docbook5 b/test/tables.docbook5 new file mode 100644 index 0000000..f86b1c3 --- /dev/null +++ b/test/tables.docbook5 @@ -0,0 +1,432 @@ + + 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. + + + + + diff --git a/test/tables.dokuwiki b/test/tables.dokuwiki new file mode 100644 index 0000000..23c0d22 --- /dev/null +++ b/test/tables.dokuwiki @@ -0,0 +1,47 @@ +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.| + diff --git a/test/tables.fb2 b/test/tables.fb2 new file mode 100644 index 0000000..56ed531 --- /dev/null +++ b/test/tables.fb2 @@ -0,0 +1,3 @@ + +unrecognisedpandoc<p />

    Simple table with caption:

    RightLeftCenterDefault
    12121212
    123123123123
    1111

    Demonstration of simple table syntax.

    Simple table without caption:

    RightLeftCenterDefault
    12121212
    123123123123
    1111

    Simple table indented two spaces:

    RightLeftCenterDefault
    12121212
    123123123123
    1111

    Demonstration of simple table syntax.

    Multiline table with caption:

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

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

    Multiline table without caption:

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

    Table without column headers:

    12121212
    123123123123
    1111

    Multiline table without column headers:

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

    + diff --git a/test/tables.haddock b/test/tables.haddock new file mode 100644 index 0000000..84a15cc --- /dev/null +++ b/test/tables.haddock @@ -0,0 +1,76 @@ +Simple table with caption: + +> Right Left Center Default +> ------- ------ -------- --------- +> 12 12 12 12 +> 123 123 123 123 +> 1 1 1 1 +> +> Demonstration of simple table syntax. + +Simple table without caption: + +> Right Left Center Default +> ------- ------ -------- --------- +> 12 12 12 12 +> 123 123 123 123 +> 1 1 1 1 + +Simple table indented two spaces: + +> Right Left Center Default +> ------- ------ -------- --------- +> 12 12 12 12 +> 123 123 123 123 +> 1 1 1 1 +> +> Demonstration of simple table syntax. + +Multiline table with caption: + +> -------------------------------------------------------------- +> Centered Left Right Default aligned +> Header Aligned Aligned +> ----------- ---------- ------------ -------------------------- +> First row 12.0 Example of a row that +> spans multiple lines. +> +> Second row 5.0 Here’s another one. Note +> the blank line between +> rows. +> -------------------------------------------------------------- +> +> Here’s the caption. It may span multiple lines. + +Multiline table without caption: + +> -------------------------------------------------------------- +> Centered Left Right Default aligned +> Header Aligned Aligned +> ----------- ---------- ------------ -------------------------- +> First row 12.0 Example of a row that +> spans multiple lines. +> +> Second row 5.0 Here’s another one. Note +> the blank line between +> rows. +> -------------------------------------------------------------- + +Table without column headers: + +> ----- ----- ----- ----- +> 12 12 12 12 +> 123 123 123 123 +> 1 1 1 1 +> ----- ----- ----- ----- + +Multiline table without column headers: + +> ----------- ---------- ------------ -------------------------- +> First row 12.0 Example of a row that +> spans multiple lines. +> +> Second row 5.0 Here’s another one. Note +> the blank line between +> rows. +> ----------- ---------- ------------ -------------------------- diff --git a/test/tables.html4 b/test/tables.html4 new file mode 100644 index 0000000..5bb7a7d --- /dev/null +++ b/test/tables.html4 @@ -0,0 +1,204 @@ +

    Simple table with caption:

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Demonstration of simple table syntax.
    RightLeftCenterDefault
    12121212
    123123123123
    1111
    +

    Simple table without caption:

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    RightLeftCenterDefault
    12121212
    123123123123
    1111
    +

    Simple table indented two spaces:

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Demonstration of simple table syntax.
    RightLeftCenterDefault
    12121212
    123123123123
    1111
    +

    Multiline table with caption:

    + + ++++++ + + + + + + + + + + + + + + + + + + + + + + +
    Here’s the caption. It may span multiple lines.
    Centered HeaderLeft AlignedRight AlignedDefault aligned
    Firstrow12.0Example of a row that spans multiple lines.
    Secondrow5.0Here’s another one. Note the blank line between rows.
    +

    Multiline table without caption:

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

    Table without column headers:

    + + + + + + + + + + + + + + + + + + + + + +
    12121212
    123123123123
    1111
    +

    Multiline table without column headers:

    + ++++++ + + + + + + + + + + + + + + +
    Firstrow12.0Example of a row that spans multiple lines.
    Secondrow5.0Here’s another one. Note the blank line between rows.
    diff --git a/test/tables.html5 b/test/tables.html5 new file mode 100644 index 0000000..17a8211 --- /dev/null +++ b/test/tables.html5 @@ -0,0 +1,204 @@ +

    Simple table with caption:

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Demonstration of simple table syntax.
    RightLeftCenterDefault
    12121212
    123123123123
    1111
    +

    Simple table without caption:

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    RightLeftCenterDefault
    12121212
    123123123123
    1111
    +

    Simple table indented two spaces:

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Demonstration of simple table syntax.
    RightLeftCenterDefault
    12121212
    123123123123
    1111
    +

    Multiline table with caption:

    + + ++++++ + + + + + + + + + + + + + + + + + + + + + + +
    Here’s the caption. It may span multiple lines.
    Centered HeaderLeft AlignedRight AlignedDefault aligned
    Firstrow12.0Example of a row that spans multiple lines.
    Secondrow5.0Here’s another one. Note the blank line between rows.
    +

    Multiline table without caption:

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

    Table without column headers:

    + + + + + + + + + + + + + + + + + + + + + +
    12121212
    123123123123
    1111
    +

    Multiline table without column headers:

    + ++++++ + + + + + + + + + + + + + + +
    Firstrow12.0Example of a row that spans multiple lines.
    Secondrow5.0Here’s another one. Note the blank line between rows.
    diff --git a/test/tables.icml b/test/tables.icml new file mode 100644 index 0000000..0280caf --- /dev/null +++ b/test/tables.icml @@ -0,0 +1,757 @@ + + + Simple table with caption: + + +
    + + + + + + + + + Right + + + + + + + Left + + + + + + + Center + + + + + + + Default + + + + + + + 12 + + + + + + + 12 + + + + + + + 12 + + + + + + + 12 + + + + + + + 123 + + + + + + + 123 + + + + + + + 123 + + + + + + + 123 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + +
    + + + Demonstration of simple table syntax. + + +
    + + + Simple table without caption: + + +
    + + + + + + + + + Right + + + + + + + Left + + + + + + + Center + + + + + + + Default + + + + + + + 12 + + + + + + + 12 + + + + + + + 12 + + + + + + + 12 + + + + + + + 123 + + + + + + + 123 + + + + + + + 123 + + + + + + + 123 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + +
    + + +
    + + + Simple table indented two spaces: + + +
    + + + + + + + + + Right + + + + + + + Left + + + + + + + Center + + + + + + + Default + + + + + + + 12 + + + + + + + 12 + + + + + + + 12 + + + + + + + 12 + + + + + + + 123 + + + + + + + 123 + + + + + + + 123 + + + + + + + 123 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + +
    + + + Demonstration of simple table syntax. + + +
    + + + Multiline table with caption: + + +
    + + + + + + + + + Centered Header + + + + + + + Left Aligned + + + + + + + Right Aligned + + + + + + + Default aligned + + + + + + + First + + + + + + + row + + + + + + + 12.0 + + + + + + + Example of a row that spans multiple lines. + + + + + + + Second + + + + + + + row + + + + + + + 5.0 + + + + + + + Here’s another one. Note the blank line between rows. + + + +
    + + + Here’s the caption. It may span multiple lines. + + +
    + + + Multiline table without caption: + + +
    + + + + + + + + + Centered Header + + + + + + + Left Aligned + + + + + + + Right Aligned + + + + + + + Default aligned + + + + + + + First + + + + + + + row + + + + + + + 12.0 + + + + + + + Example of a row that spans multiple lines. + + + + + + + Second + + + + + + + row + + + + + + + 5.0 + + + + + + + Here’s another one. Note the blank line between rows. + + + +
    + + +
    + + + Table without column headers: + + +
    + + + + + + + + + 12 + + + + + + + 12 + + + + + + + 12 + + + + + + + 12 + + + + + + + 123 + + + + + + + 123 + + + + + + + 123 + + + + + + + 123 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + + + + + 1 + + + +
    + + +
    + + + Multiline table without column headers: + + +
    + + + + + + + + + First + + + + + + + row + + + + + + + 12.0 + + + + + + + Example of a row that spans multiple lines. + + + + + + + Second + + + + + + + row + + + + + + + 5.0 + + + + + + + Here’s another one. Note the blank line between rows. + + + +
    + + diff --git a/test/tables.jats b/test/tables.jats new file mode 100644 index 0000000..46af616 --- /dev/null +++ b/test/tables.jats @@ -0,0 +1,430 @@ +

    + 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. +
    diff --git a/test/tables.latex b/test/tables.latex new file mode 100644 index 0000000..759b35d --- /dev/null +++ b/test/tables.latex @@ -0,0 +1,170 @@ +Simple table with caption: + +\begin{longtable}[]{@{}rlcl@{}} +\caption{Demonstration of simple table syntax.}\tabularnewline +\toprule +Right & Left & Center & Default\tabularnewline +\midrule +\endfirsthead +\toprule +Right & Left & Center & Default\tabularnewline +\midrule +\endhead +12 & 12 & 12 & 12\tabularnewline +123 & 123 & 123 & 123\tabularnewline +1 & 1 & 1 & 1\tabularnewline +\bottomrule +\end{longtable} + +Simple table without caption: + +\begin{longtable}[]{@{}rlcl@{}} +\toprule +Right & Left & Center & Default\tabularnewline +\midrule +\endhead +12 & 12 & 12 & 12\tabularnewline +123 & 123 & 123 & 123\tabularnewline +1 & 1 & 1 & 1\tabularnewline +\bottomrule +\end{longtable} + +Simple table indented two spaces: + +\begin{longtable}[]{@{}rlcl@{}} +\caption{Demonstration of simple table syntax.}\tabularnewline +\toprule +Right & Left & Center & Default\tabularnewline +\midrule +\endfirsthead +\toprule +Right & Left & Center & Default\tabularnewline +\midrule +\endhead +12 & 12 & 12 & 12\tabularnewline +123 & 123 & 123 & 123\tabularnewline +1 & 1 & 1 & 1\tabularnewline +\bottomrule +\end{longtable} + +Multiline table with caption: + +\begin{longtable}[]{@{}clrl@{}} +\caption{Here's the caption. It may span multiple lines.}\tabularnewline +\toprule +\begin{minipage}[b]{0.13\columnwidth}\centering +Centered Header\strut +\end{minipage} & \begin{minipage}[b]{0.12\columnwidth}\raggedright +Left Aligned\strut +\end{minipage} & \begin{minipage}[b]{0.14\columnwidth}\raggedleft +Right Aligned\strut +\end{minipage} & \begin{minipage}[b]{0.30\columnwidth}\raggedright +Default aligned\strut +\end{minipage}\tabularnewline +\midrule +\endfirsthead +\toprule +\begin{minipage}[b]{0.13\columnwidth}\centering +Centered Header\strut +\end{minipage} & \begin{minipage}[b]{0.12\columnwidth}\raggedright +Left Aligned\strut +\end{minipage} & \begin{minipage}[b]{0.14\columnwidth}\raggedleft +Right Aligned\strut +\end{minipage} & \begin{minipage}[b]{0.30\columnwidth}\raggedright +Default aligned\strut +\end{minipage}\tabularnewline +\midrule +\endhead +\begin{minipage}[t]{0.13\columnwidth}\centering +First\strut +\end{minipage} & \begin{minipage}[t]{0.12\columnwidth}\raggedright +row\strut +\end{minipage} & \begin{minipage}[t]{0.14\columnwidth}\raggedleft +12.0\strut +\end{minipage} & \begin{minipage}[t]{0.30\columnwidth}\raggedright +Example of a row that spans multiple lines.\strut +\end{minipage}\tabularnewline +\begin{minipage}[t]{0.13\columnwidth}\centering +Second\strut +\end{minipage} & \begin{minipage}[t]{0.12\columnwidth}\raggedright +row\strut +\end{minipage} & \begin{minipage}[t]{0.14\columnwidth}\raggedleft +5.0\strut +\end{minipage} & \begin{minipage}[t]{0.30\columnwidth}\raggedright +Here's another one. Note the blank line between rows.\strut +\end{minipage}\tabularnewline +\bottomrule +\end{longtable} + +Multiline table without caption: + +\begin{longtable}[]{@{}clrl@{}} +\toprule +\begin{minipage}[b]{0.13\columnwidth}\centering +Centered Header\strut +\end{minipage} & \begin{minipage}[b]{0.12\columnwidth}\raggedright +Left Aligned\strut +\end{minipage} & \begin{minipage}[b]{0.14\columnwidth}\raggedleft +Right Aligned\strut +\end{minipage} & \begin{minipage}[b]{0.30\columnwidth}\raggedright +Default aligned\strut +\end{minipage}\tabularnewline +\midrule +\endhead +\begin{minipage}[t]{0.13\columnwidth}\centering +First\strut +\end{minipage} & \begin{minipage}[t]{0.12\columnwidth}\raggedright +row\strut +\end{minipage} & \begin{minipage}[t]{0.14\columnwidth}\raggedleft +12.0\strut +\end{minipage} & \begin{minipage}[t]{0.30\columnwidth}\raggedright +Example of a row that spans multiple lines.\strut +\end{minipage}\tabularnewline +\begin{minipage}[t]{0.13\columnwidth}\centering +Second\strut +\end{minipage} & \begin{minipage}[t]{0.12\columnwidth}\raggedright +row\strut +\end{minipage} & \begin{minipage}[t]{0.14\columnwidth}\raggedleft +5.0\strut +\end{minipage} & \begin{minipage}[t]{0.30\columnwidth}\raggedright +Here's another one. Note the blank line between rows.\strut +\end{minipage}\tabularnewline +\bottomrule +\end{longtable} + +Table without column headers: + +\begin{longtable}[]{@{}rlcr@{}} +\toprule +\endhead +12 & 12 & 12 & 12\tabularnewline +123 & 123 & 123 & 123\tabularnewline +1 & 1 & 1 & 1\tabularnewline +\bottomrule +\end{longtable} + +Multiline table without column headers: + +\begin{longtable}[]{@{}clrl@{}} +\toprule +\endhead +\begin{minipage}[t]{0.13\columnwidth}\centering +First\strut +\end{minipage} & \begin{minipage}[t]{0.12\columnwidth}\raggedright +row\strut +\end{minipage} & \begin{minipage}[t]{0.14\columnwidth}\raggedleft +12.0\strut +\end{minipage} & \begin{minipage}[t]{0.30\columnwidth}\raggedright +Example of a row that spans multiple lines.\strut +\end{minipage}\tabularnewline +\begin{minipage}[t]{0.13\columnwidth}\centering +Second\strut +\end{minipage} & \begin{minipage}[t]{0.12\columnwidth}\raggedright +row\strut +\end{minipage} & \begin{minipage}[t]{0.14\columnwidth}\raggedleft +5.0\strut +\end{minipage} & \begin{minipage}[t]{0.30\columnwidth}\raggedright +Here's another one. Note the blank line between rows.\strut +\end{minipage}\tabularnewline +\bottomrule +\end{longtable} diff --git a/test/tables.man b/test/tables.man new file mode 100644 index 0000000..dd6a3cc --- /dev/null +++ b/test/tables.man @@ -0,0 +1,267 @@ +.PP +Simple table with caption: +.PP +Demonstration of simple table syntax. +.TS +tab(@); +r l c l. +T{ +Right +T}@T{ +Left +T}@T{ +Center +T}@T{ +Default +T} +_ +T{ +12 +T}@T{ +12 +T}@T{ +12 +T}@T{ +12 +T} +T{ +123 +T}@T{ +123 +T}@T{ +123 +T}@T{ +123 +T} +T{ +1 +T}@T{ +1 +T}@T{ +1 +T}@T{ +1 +T} +.TE +.PP +Simple table without caption: +.PP +.TS +tab(@); +r l c l. +T{ +Right +T}@T{ +Left +T}@T{ +Center +T}@T{ +Default +T} +_ +T{ +12 +T}@T{ +12 +T}@T{ +12 +T}@T{ +12 +T} +T{ +123 +T}@T{ +123 +T}@T{ +123 +T}@T{ +123 +T} +T{ +1 +T}@T{ +1 +T}@T{ +1 +T}@T{ +1 +T} +.TE +.PP +Simple table indented two spaces: +.PP +Demonstration of simple table syntax. +.TS +tab(@); +r l c l. +T{ +Right +T}@T{ +Left +T}@T{ +Center +T}@T{ +Default +T} +_ +T{ +12 +T}@T{ +12 +T}@T{ +12 +T}@T{ +12 +T} +T{ +123 +T}@T{ +123 +T}@T{ +123 +T}@T{ +123 +T} +T{ +1 +T}@T{ +1 +T}@T{ +1 +T}@T{ +1 +T} +.TE +.PP +Multiline table with caption: +.PP +Here's the caption. It may span multiple lines. +.TS +tab(@); +cw(10.5n) lw(9.6n) rw(11.4n) lw(23.6n). +T{ +Centered Header +T}@T{ +Left Aligned +T}@T{ +Right Aligned +T}@T{ +Default aligned +T} +_ +T{ +First +T}@T{ +row +T}@T{ +12.0 +T}@T{ +Example of a row that spans multiple lines. +T} +T{ +Second +T}@T{ +row +T}@T{ +5.0 +T}@T{ +Here's another one. +Note the blank line between rows. +T} +.TE +.PP +Multiline table without caption: +.PP +.TS +tab(@); +cw(10.5n) lw(9.6n) rw(11.4n) lw(23.6n). +T{ +Centered Header +T}@T{ +Left Aligned +T}@T{ +Right Aligned +T}@T{ +Default aligned +T} +_ +T{ +First +T}@T{ +row +T}@T{ +12.0 +T}@T{ +Example of a row that spans multiple lines. +T} +T{ +Second +T}@T{ +row +T}@T{ +5.0 +T}@T{ +Here's another one. +Note the blank line between rows. +T} +.TE +.PP +Table without column headers: +.PP +.TS +tab(@); +r l c r. +T{ +12 +T}@T{ +12 +T}@T{ +12 +T}@T{ +12 +T} +T{ +123 +T}@T{ +123 +T}@T{ +123 +T}@T{ +123 +T} +T{ +1 +T}@T{ +1 +T}@T{ +1 +T}@T{ +1 +T} +.TE +.PP +Multiline table without column headers: +.PP +.TS +tab(@); +cw(10.5n) lw(9.6n) rw(11.4n) lw(23.6n). +T{ +First +T}@T{ +row +T}@T{ +12.0 +T}@T{ +Example of a row that spans multiple lines. +T} +T{ +Second +T}@T{ +row +T}@T{ +5.0 +T}@T{ +Here's another one. +Note the blank line between rows. +T} +.TE diff --git a/test/tables.markdown b/test/tables.markdown new file mode 100644 index 0000000..7f89bfc --- /dev/null +++ b/test/tables.markdown @@ -0,0 +1,76 @@ +Simple table with caption: + + Right Left Center Default + ------- ------ -------- --------- + 12 12 12 12 + 123 123 123 123 + 1 1 1 1 + + : Demonstration of simple table syntax. + +Simple table without caption: + + Right Left Center Default + ------- ------ -------- --------- + 12 12 12 12 + 123 123 123 123 + 1 1 1 1 + +Simple table indented two spaces: + + Right Left Center Default + ------- ------ -------- --------- + 12 12 12 12 + 123 123 123 123 + 1 1 1 1 + + : Demonstration of simple table syntax. + +Multiline table with caption: + + -------------------------------------------------------------- + Centered Left Right Default aligned + Header Aligned Aligned + ----------- ---------- ------------ -------------------------- + First row 12.0 Example of a row that + spans multiple lines. + + Second row 5.0 Here's another one. Note + the blank line between + rows. + -------------------------------------------------------------- + + : Here's the caption. It may span multiple lines. + +Multiline table without caption: + + -------------------------------------------------------------- + Centered Left Right Default aligned + Header Aligned Aligned + ----------- ---------- ------------ -------------------------- + First row 12.0 Example of a row that + spans multiple lines. + + Second row 5.0 Here's another one. Note + the blank line between + rows. + -------------------------------------------------------------- + +Table without column headers: + + ----- ----- ----- ----- + 12 12 12 12 + 123 123 123 123 + 1 1 1 1 + ----- ----- ----- ----- + +Multiline table without column headers: + + ----------- ---------- ------------ -------------------------- + First row 12.0 Example of a row that + spans multiple lines. + + Second row 5.0 Here's another one. Note + the blank line between + rows. + ----------- ---------- ------------ -------------------------- diff --git a/test/tables.mediawiki b/test/tables.mediawiki new file mode 100644 index 0000000..ce7c178 --- /dev/null +++ b/test/tables.mediawiki @@ -0,0 +1,146 @@ +Simple table with caption: + +{| +|+ Demonstration of simple table syntax. +!align="right"| Right +! Left +!align="center"| Center +! Default +|- +|align="right"| 12 +| 12 +|align="center"| 12 +| 12 +|- +|align="right"| 123 +| 123 +|align="center"| 123 +| 123 +|- +|align="right"| 1 +| 1 +|align="center"| 1 +| 1 +|} + +Simple table without caption: + +{| +!align="right"| Right +! Left +!align="center"| Center +! Default +|- +|align="right"| 12 +| 12 +|align="center"| 12 +| 12 +|- +|align="right"| 123 +| 123 +|align="center"| 123 +| 123 +|- +|align="right"| 1 +| 1 +|align="center"| 1 +| 1 +|} + +Simple table indented two spaces: + +{| +|+ Demonstration of simple table syntax. +!align="right"| Right +! Left +!align="center"| Center +! Default +|- +|align="right"| 12 +| 12 +|align="center"| 12 +| 12 +|- +|align="right"| 123 +| 123 +|align="center"| 123 +| 123 +|- +|align="right"| 1 +| 1 +|align="center"| 1 +| 1 +|} + +Multiline table with caption: + +{| +|+ Here’s the caption. It may span multiple lines. +!align="center" width="15%"| Centered Header +!width="13%"| Left Aligned +!align="right" width="16%"| Right Aligned +!width="33%"| Default aligned +|- +|align="center"| First +| row +|align="right"| 12.0 +| Example of a row that spans multiple lines. +|- +|align="center"| Second +| row +|align="right"| 5.0 +| Here’s another one. Note the blank line between rows. +|} + +Multiline table without caption: + +{| +!align="center" width="15%"| Centered Header +!width="13%"| Left Aligned +!align="right" width="16%"| Right Aligned +!width="33%"| Default aligned +|- +|align="center"| First +| row +|align="right"| 12.0 +| Example of a row that spans multiple lines. +|- +|align="center"| Second +| row +|align="right"| 5.0 +| Here’s another one. Note the blank line between rows. +|} + +Table without column headers: + +{| +|align="right"| 12 +| 12 +|align="center"| 12 +|align="right"| 12 +|- +|align="right"| 123 +| 123 +|align="center"| 123 +|align="right"| 123 +|- +|align="right"| 1 +| 1 +|align="center"| 1 +|align="right"| 1 +|} + +Multiline table without column headers: + +{| +|align="center" width="15%"| First +|width="13%"| row +|align="right" width="16%"| 12.0 +|width="33%"| Example of a row that spans multiple lines. +|- +|align="center"| Second +| row +|align="right"| 5.0 +| Here’s another one. Note the blank line between rows. +|} + diff --git a/test/tables.ms b/test/tables.ms new file mode 100644 index 0000000..21b3bd4 --- /dev/null +++ b/test/tables.ms @@ -0,0 +1,267 @@ +.LP +Simple table with caption: +.PP +Demonstration of simple table syntax. +.TS +delim(@@) tab( ); +r l c l. +T{ +Right +T} T{ +Left +T} T{ +Center +T} T{ +Default +T} +_ +T{ +12 +T} T{ +12 +T} T{ +12 +T} T{ +12 +T} +T{ +123 +T} T{ +123 +T} T{ +123 +T} T{ +123 +T} +T{ +1 +T} T{ +1 +T} T{ +1 +T} T{ +1 +T} +.TE +.LP +Simple table without caption: +.PP +.TS +delim(@@) tab( ); +r l c l. +T{ +Right +T} T{ +Left +T} T{ +Center +T} T{ +Default +T} +_ +T{ +12 +T} T{ +12 +T} T{ +12 +T} T{ +12 +T} +T{ +123 +T} T{ +123 +T} T{ +123 +T} T{ +123 +T} +T{ +1 +T} T{ +1 +T} T{ +1 +T} T{ +1 +T} +.TE +.LP +Simple table indented two spaces: +.PP +Demonstration of simple table syntax. +.TS +delim(@@) tab( ); +r l c l. +T{ +Right +T} T{ +Left +T} T{ +Center +T} T{ +Default +T} +_ +T{ +12 +T} T{ +12 +T} T{ +12 +T} T{ +12 +T} +T{ +123 +T} T{ +123 +T} T{ +123 +T} T{ +123 +T} +T{ +1 +T} T{ +1 +T} T{ +1 +T} T{ +1 +T} +.TE +.LP +Multiline table with caption: +.PP +Here's the caption. It may span multiple lines. +.TS +delim(@@) tab( ); +cw(10.5n) lw(9.6n) rw(11.4n) lw(23.6n). +T{ +Centered Header +T} T{ +Left Aligned +T} T{ +Right Aligned +T} T{ +Default aligned +T} +_ +T{ +First +T} T{ +row +T} T{ +12.0 +T} T{ +Example of a row that spans multiple lines. +T} +T{ +Second +T} T{ +row +T} T{ +5.0 +T} T{ +Here's another one. +Note the blank line between rows. +T} +.TE +.LP +Multiline table without caption: +.PP +.TS +delim(@@) tab( ); +cw(10.5n) lw(9.6n) rw(11.4n) lw(23.6n). +T{ +Centered Header +T} T{ +Left Aligned +T} T{ +Right Aligned +T} T{ +Default aligned +T} +_ +T{ +First +T} T{ +row +T} T{ +12.0 +T} T{ +Example of a row that spans multiple lines. +T} +T{ +Second +T} T{ +row +T} T{ +5.0 +T} T{ +Here's another one. +Note the blank line between rows. +T} +.TE +.LP +Table without column headers: +.PP +.TS +delim(@@) tab( ); +r l c r. +T{ +12 +T} T{ +12 +T} T{ +12 +T} T{ +12 +T} +T{ +123 +T} T{ +123 +T} T{ +123 +T} T{ +123 +T} +T{ +1 +T} T{ +1 +T} T{ +1 +T} T{ +1 +T} +.TE +.LP +Multiline table without column headers: +.PP +.TS +delim(@@) tab( ); +cw(10.5n) lw(9.6n) rw(11.4n) lw(23.6n). +T{ +First +T} T{ +row +T} T{ +12.0 +T} T{ +Example of a row that spans multiple lines. +T} +T{ +Second +T} T{ +row +T} T{ +5.0 +T} T{ +Here's another one. +Note the blank line between rows. +T} +.TE diff --git a/test/tables.muse b/test/tables.muse new file mode 100644 index 0000000..fdf20be --- /dev/null +++ b/test/tables.muse @@ -0,0 +1,46 @@ +Simple table with caption: + + Right || Left || Center || Default + 12 | 12 | 12 | 12 + 123 | 123 | 123 | 123 + 1 | 1 | 1 | 1 + |+ Demonstration of simple table syntax. +| + +Simple table without caption: + + Right || Left || Center || Default + 12 | 12 | 12 | 12 + 123 | 123 | 123 | 123 + 1 | 1 | 1 | 1 + +Simple table indented two spaces: + + Right || Left || Center || Default + 12 | 12 | 12 | 12 + 123 | 123 | 123 | 123 + 1 | 1 | 1 | 1 + |+ Demonstration of simple table syntax. +| + +Multiline table with caption: + + Centered Header || Left Aligned || Right Aligned || Default aligned + First | row | 12.0 | Example of a row that spans multiple lines. + Second | row | 5.0 | Here’s another one. Note the blank line between rows. + |+ Here’s the caption. It may span multiple lines. +| + +Multiline table without caption: + + Centered Header || Left Aligned || Right Aligned || Default aligned + First | row | 12.0 | Example of a row that spans multiple lines. + Second | row | 5.0 | Here’s another one. Note the blank line between rows. + +Table without column headers: + + 12 | 12 | 12 | 12 + 123 | 123 | 123 | 123 + 1 | 1 | 1 | 1 + +Multiline table without column headers: + + First | row | 12.0 | Example of a row that spans multiple lines. + Second | row | 5.0 | Here’s another one. Note the blank line between rows. diff --git a/test/tables.native b/test/tables.native new file mode 100644 index 0000000..a60f9b5 --- /dev/null +++ b/test/tables.native @@ -0,0 +1,114 @@ +[Para [Str "Simple",Space,Str "table",Space,Str "with",Space,Str "caption:"] +,Table [Str "Demonstration",Space,Str "of",Space,Str "simple",Space,Str "table",Space,Str "syntax."] [AlignRight,AlignLeft,AlignCenter,AlignDefault] [0.0,0.0,0.0,0.0] + [[Plain [Str "Right"]] + ,[Plain [Str "Left"]] + ,[Plain [Str "Center"]] + ,[Plain [Str "Default"]]] + [[[Plain [Str "12"]] + ,[Plain [Str "12"]] + ,[Plain [Str "12"]] + ,[Plain [Str "12"]]] + ,[[Plain [Str "123"]] + ,[Plain [Str "123"]] + ,[Plain [Str "123"]] + ,[Plain [Str "123"]]] + ,[[Plain [Str "1"]] + ,[Plain [Str "1"]] + ,[Plain [Str "1"]] + ,[Plain [Str "1"]]]] +,Para [Str "Simple",Space,Str "table",Space,Str "without",Space,Str "caption:"] +,Table [] [AlignRight,AlignLeft,AlignCenter,AlignDefault] [0.0,0.0,0.0,0.0] + [[Plain [Str "Right"]] + ,[Plain [Str "Left"]] + ,[Plain [Str "Center"]] + ,[Plain [Str "Default"]]] + [[[Plain [Str "12"]] + ,[Plain [Str "12"]] + ,[Plain [Str "12"]] + ,[Plain [Str "12"]]] + ,[[Plain [Str "123"]] + ,[Plain [Str "123"]] + ,[Plain [Str "123"]] + ,[Plain [Str "123"]]] + ,[[Plain [Str "1"]] + ,[Plain [Str "1"]] + ,[Plain [Str "1"]] + ,[Plain [Str "1"]]]] +,Para [Str "Simple",Space,Str "table",Space,Str "indented",Space,Str "two",Space,Str "spaces:"] +,Table [Str "Demonstration",Space,Str "of",Space,Str "simple",Space,Str "table",Space,Str "syntax."] [AlignRight,AlignLeft,AlignCenter,AlignDefault] [0.0,0.0,0.0,0.0] + [[Plain [Str "Right"]] + ,[Plain [Str "Left"]] + ,[Plain [Str "Center"]] + ,[Plain [Str "Default"]]] + [[[Plain [Str "12"]] + ,[Plain [Str "12"]] + ,[Plain [Str "12"]] + ,[Plain [Str "12"]]] + ,[[Plain [Str "123"]] + ,[Plain [Str "123"]] + ,[Plain [Str "123"]] + ,[Plain [Str "123"]]] + ,[[Plain [Str "1"]] + ,[Plain [Str "1"]] + ,[Plain [Str "1"]] + ,[Plain [Str "1"]]]] +,Para [Str "Multiline",Space,Str "table",Space,Str "with",Space,Str "caption:"] +,Table [Str "Here\8217s",Space,Str "the",Space,Str "caption.",SoftBreak,Str "It",Space,Str "may",Space,Str "span",Space,Str "multiple",Space,Str "lines."] [AlignCenter,AlignLeft,AlignRight,AlignLeft] [0.15,0.1375,0.1625,0.3375] + [[Plain [Str "Centered",SoftBreak,Str "Header"]] + ,[Plain [Str "Left",SoftBreak,Str "Aligned"]] + ,[Plain [Str "Right",SoftBreak,Str "Aligned"]] + ,[Plain [Str "Default",Space,Str "aligned"]]] + [[[Plain [Str "First"]] + ,[Plain [Str "row"]] + ,[Plain [Str "12.0"]] + ,[Plain [Str "Example",Space,Str "of",Space,Str "a",Space,Str "row",Space,Str "that",Space,Str "spans",SoftBreak,Str "multiple",Space,Str "lines."]]] + ,[[Plain [Str "Second"]] + ,[Plain [Str "row"]] + ,[Plain [Str "5.0"]] + ,[Plain [Str "Here\8217s",Space,Str "another",Space,Str "one.",Space,Str "Note",SoftBreak,Str "the",Space,Str "blank",Space,Str "line",Space,Str "between",Space,Str "rows."]]]] +,Para [Str "Multiline",Space,Str "table",Space,Str "without",Space,Str "caption:"] +,Table [] [AlignCenter,AlignLeft,AlignRight,AlignLeft] [0.15,0.1375,0.1625,0.3375] + [[Plain [Str "Centered",SoftBreak,Str "Header"]] + ,[Plain [Str "Left",SoftBreak,Str "Aligned"]] + ,[Plain [Str "Right",SoftBreak,Str "Aligned"]] + ,[Plain [Str "Default",Space,Str "aligned"]]] + [[[Plain [Str "First"]] + ,[Plain [Str "row"]] + ,[Plain [Str "12.0"]] + ,[Plain [Str "Example",Space,Str "of",Space,Str "a",Space,Str "row",Space,Str "that",Space,Str "spans",SoftBreak,Str "multiple",Space,Str "lines."]]] + ,[[Plain [Str "Second"]] + ,[Plain [Str "row"]] + ,[Plain [Str "5.0"]] + ,[Plain [Str "Here\8217s",Space,Str "another",Space,Str "one.",Space,Str "Note",SoftBreak,Str "the",Space,Str "blank",Space,Str "line",Space,Str "between",Space,Str "rows."]]]] +,Para [Str "Table",Space,Str "without",Space,Str "column",Space,Str "headers:"] +,Table [] [AlignRight,AlignLeft,AlignCenter,AlignRight] [0.0,0.0,0.0,0.0] + [[] + ,[] + ,[] + ,[]] + [[[Plain [Str "12"]] + ,[Plain [Str "12"]] + ,[Plain [Str "12"]] + ,[Plain [Str "12"]]] + ,[[Plain [Str "123"]] + ,[Plain [Str "123"]] + ,[Plain [Str "123"]] + ,[Plain [Str "123"]]] + ,[[Plain [Str "1"]] + ,[Plain [Str "1"]] + ,[Plain [Str "1"]] + ,[Plain [Str "1"]]]] +,Para [Str "Multiline",Space,Str "table",Space,Str "without",Space,Str "column",Space,Str "headers:"] +,Table [] [AlignCenter,AlignLeft,AlignRight,AlignDefault] [0.15,0.1375,0.1625,0.3375] + [[] + ,[] + ,[] + ,[]] + [[[Plain [Str "First"]] + ,[Plain [Str "row"]] + ,[Plain [Str "12.0"]] + ,[Plain [Str "Example",Space,Str "of",Space,Str "a",Space,Str "row",Space,Str "that",Space,Str "spans",SoftBreak,Str "multiple",Space,Str "lines."]]] + ,[[Plain [Str "Second"]] + ,[Plain [Str "row"]] + ,[Plain [Str "5.0"]] + ,[Plain [Str "Here\8217s",Space,Str "another",Space,Str "one.",Space,Str "Note",SoftBreak,Str "the",Space,Str "blank",Space,Str "line",Space,Str "between",Space,Str "rows."]]]]] diff --git a/test/tables.opendocument b/test/tables.opendocument new file mode 100644 index 0000000..c331ecc --- /dev/null +++ b/test/tables.opendocument @@ -0,0 +1,397 @@ +Simple table with caption: + + + + + + + + + Right + + + Left + + + Center + + + Default + + + + + + 12 + + + 12 + + + 12 + + + 12 + + + + + 123 + + + 123 + + + 123 + + + 123 + + + + + 1 + + + 1 + + + 1 + + + 1 + + + +Demonstration of simple table syntax. +Simple table without +caption: + + + + + + + + + Right + + + Left + + + Center + + + Default + + + + + + 12 + + + 12 + + + 12 + + + 12 + + + + + 123 + + + 123 + + + 123 + + + 123 + + + + + 1 + + + 1 + + + 1 + + + 1 + + + +Simple table indented two +spaces: + + + + + + + + + Right + + + Left + + + Center + + + Default + + + + + + 12 + + + 12 + + + 12 + + + 12 + + + + + 123 + + + 123 + + + 123 + + + 123 + + + + + 1 + + + 1 + + + 1 + + + 1 + + + +Demonstration of simple table syntax. +Multiline table with +caption: + + + + + + + + + Centered Header + + + Left Aligned + + + Right Aligned + + + Default aligned + + + + + + First + + + row + + + 12.0 + + + Example of a row that spans + multiple lines. + + + + + Second + + + row + + + 5.0 + + + Here’s another one. Note the + blank line between rows. + + + +Here’s the caption. It may span multiple +lines. +Multiline table without +caption: + + + + + + + + + Centered Header + + + Left Aligned + + + Right Aligned + + + Default aligned + + + + + + First + + + row + + + 12.0 + + + Example of a row that spans + multiple lines. + + + + + Second + + + row + + + 5.0 + + + Here’s another one. Note the + blank line between rows. + + + +Table without column +headers: + + + + + + + + 12 + + + 12 + + + 12 + + + 12 + + + + + 123 + + + 123 + + + 123 + + + 123 + + + + + 1 + + + 1 + + + 1 + + + 1 + + + +Multiline table without column +headers: + + + + + + + + First + + + row + + + 12.0 + + + Example of a row that spans + multiple lines. + + + + + Second + + + row + + + 5.0 + + + Here’s another one. Note the + blank line between rows. + + + diff --git a/test/tables.org b/test/tables.org new file mode 100644 index 0000000..9eaf5e7 --- /dev/null +++ b/test/tables.org @@ -0,0 +1,51 @@ +Simple table with caption: + +| Right | Left | Center | Default | +|---------+--------+----------+-----------| +| 12 | 12 | 12 | 12 | +| 123 | 123 | 123 | 123 | +| 1 | 1 | 1 | 1 | +#+CAPTION: Demonstration of simple table syntax. + +Simple table without caption: + +| Right | Left | Center | Default | +|---------+--------+----------+-----------| +| 12 | 12 | 12 | 12 | +| 123 | 123 | 123 | 123 | +| 1 | 1 | 1 | 1 | + +Simple table indented two spaces: + +| Right | Left | Center | Default | +|---------+--------+----------+-----------| +| 12 | 12 | 12 | 12 | +| 123 | 123 | 123 | 123 | +| 1 | 1 | 1 | 1 | +#+CAPTION: Demonstration of simple table syntax. + +Multiline table with caption: + +| Centered Header | Left Aligned | Right Aligned | Default aligned | +|-------------------+----------------+-----------------+---------------------------------------------------------| +| First | row | 12.0 | Example of a row that spans multiple lines. | +| Second | row | 5.0 | Here's another one. Note the blank line between rows. | +#+CAPTION: Here's the caption. It may span multiple lines. + +Multiline table without caption: + +| Centered Header | Left Aligned | Right Aligned | Default aligned | +|-------------------+----------------+-----------------+---------------------------------------------------------| +| First | row | 12.0 | Example of a row that spans multiple lines. | +| Second | row | 5.0 | Here's another one. Note the blank line between rows. | + +Table without column headers: + +| 12 | 12 | 12 | 12 | +| 123 | 123 | 123 | 123 | +| 1 | 1 | 1 | 1 | + +Multiline table without column headers: + +| First | row | 12.0 | Example of a row that spans multiple lines. | +| Second | row | 5.0 | Here's another one. Note the blank line between rows. | diff --git a/test/tables.plain b/test/tables.plain new file mode 100644 index 0000000..e46317a --- /dev/null +++ b/test/tables.plain @@ -0,0 +1,76 @@ +Simple table with caption: + + Right Left Center Default + ------- ------ -------- --------- + 12 12 12 12 + 123 123 123 123 + 1 1 1 1 + + : Demonstration of simple table syntax. + +Simple table without caption: + + Right Left Center Default + ------- ------ -------- --------- + 12 12 12 12 + 123 123 123 123 + 1 1 1 1 + +Simple table indented two spaces: + + Right Left Center Default + ------- ------ -------- --------- + 12 12 12 12 + 123 123 123 123 + 1 1 1 1 + + : Demonstration of simple table syntax. + +Multiline table with caption: + + -------------------------------------------------------------- + Centered Left Right Default aligned + Header Aligned Aligned + ----------- ---------- ------------ -------------------------- + First row 12.0 Example of a row that + spans multiple lines. + + Second row 5.0 Here’s another one. Note + the blank line between + rows. + -------------------------------------------------------------- + + : Here’s the caption. It may span multiple lines. + +Multiline table without caption: + + -------------------------------------------------------------- + Centered Left Right Default aligned + Header Aligned Aligned + ----------- ---------- ------------ -------------------------- + First row 12.0 Example of a row that + spans multiple lines. + + Second row 5.0 Here’s another one. Note + the blank line between + rows. + -------------------------------------------------------------- + +Table without column headers: + + ----- ----- ----- ----- + 12 12 12 12 + 123 123 123 123 + 1 1 1 1 + ----- ----- ----- ----- + +Multiline table without column headers: + + ----------- ---------- ------------ -------------------------- + First row 12.0 Example of a row that + spans multiple lines. + + Second row 5.0 Here’s another one. Note + the blank line between + rows. + ----------- ---------- ------------ -------------------------- diff --git a/test/tables.rst b/test/tables.rst new file mode 100644 index 0000000..e76c505 --- /dev/null +++ b/test/tables.rst @@ -0,0 +1,90 @@ +Simple table with caption: + +.. table:: 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: + +.. table:: 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: + +.. table:: Here’s the caption. It may span multiple lines. + + +----------+---------+-----------+-------------------------+ + | Centered | Left | Right | Default aligned | + | Header | Aligned | Aligned | | + +==========+=========+===========+=========================+ + | First | row | 12.0 | Example of a row that | + | | | | spans multiple lines. | + +----------+---------+-----------+-------------------------+ + | Second | row | 5.0 | Here’s another one. | + | | | | Note the blank line | + | | | | between rows. | + +----------+---------+-----------+-------------------------+ + +Multiline table without caption: + ++----------+---------+-----------+-------------------------+ +| Centered | Left | Right | Default aligned | +| Header | Aligned | Aligned | | ++==========+=========+===========+=========================+ +| First | row | 12.0 | Example of a row that | +| | | | spans multiple lines. | ++----------+---------+-----------+-------------------------+ +| Second | row | 5.0 | Here’s another one. | +| | | | Note the blank line | +| | | | between rows. | ++----------+---------+-----------+-------------------------+ + +Table without column headers: + ++-----+-----+-----+-----+ +| 12 | 12 | 12 | 12 | ++-----+-----+-----+-----+ +| 123 | 123 | 123 | 123 | ++-----+-----+-----+-----+ +| 1 | 1 | 1 | 1 | ++-----+-----+-----+-----+ + +Multiline table without column headers: + ++----------+---------+-----------+-------------------------+ +| First | row | 12.0 | Example of a row that | +| | | | spans multiple lines. | ++----------+---------+-----------+-------------------------+ +| Second | row | 5.0 | Here’s another one. | +| | | | Note the blank line | +| | | | between rows. | ++----------+---------+-----------+-------------------------+ diff --git a/test/tables.rtf b/test/tables.rtf new file mode 100644 index 0000000..57030b1 --- /dev/null +++ b/test/tables.rtf @@ -0,0 +1,360 @@ +{\pard \ql \f0 \sa180 \li0 \fi0 Simple table with caption:\par} +{ +\trowd \trgaph120 +\clbrdrb\brdrs\cellx2160\clbrdrb\brdrs\cellx4320\clbrdrb\brdrs\cellx6480\clbrdrb\brdrs\cellx8640 +\trkeep\intbl +{ +{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 Right\par} +\cell} +{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Left\par} +\cell} +{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 Center\par} +\cell} +{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Default\par} +\cell} +} +\intbl\row} +{ +\trowd \trgaph120 +\cellx2160\cellx4320\cellx6480\cellx8640 +\trkeep\intbl +{ +{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 12\par} +\cell} +{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 12\par} +\cell} +{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 12\par} +\cell} +{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 12\par} +\cell} +} +\intbl\row} +{ +\trowd \trgaph120 +\cellx2160\cellx4320\cellx6480\cellx8640 +\trkeep\intbl +{ +{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 123\par} +\cell} +{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 123\par} +\cell} +{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 123\par} +\cell} +{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 123\par} +\cell} +} +\intbl\row} +{ +\trowd \trgaph120 +\cellx2160\cellx4320\cellx6480\cellx8640 +\trkeep\intbl +{ +{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 1\par} +\cell} +{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 1\par} +\cell} +{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 1\par} +\cell} +{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 1\par} +\cell} +} +\intbl\row} +{\pard \ql \f0 \sa180 \li0 \fi0 Demonstration of simple table syntax.\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Simple table without caption:\par} +{ +\trowd \trgaph120 +\clbrdrb\brdrs\cellx2160\clbrdrb\brdrs\cellx4320\clbrdrb\brdrs\cellx6480\clbrdrb\brdrs\cellx8640 +\trkeep\intbl +{ +{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 Right\par} +\cell} +{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Left\par} +\cell} +{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 Center\par} +\cell} +{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Default\par} +\cell} +} +\intbl\row} +{ +\trowd \trgaph120 +\cellx2160\cellx4320\cellx6480\cellx8640 +\trkeep\intbl +{ +{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 12\par} +\cell} +{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 12\par} +\cell} +{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 12\par} +\cell} +{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 12\par} +\cell} +} +\intbl\row} +{ +\trowd \trgaph120 +\cellx2160\cellx4320\cellx6480\cellx8640 +\trkeep\intbl +{ +{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 123\par} +\cell} +{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 123\par} +\cell} +{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 123\par} +\cell} +{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 123\par} +\cell} +} +\intbl\row} +{ +\trowd \trgaph120 +\cellx2160\cellx4320\cellx6480\cellx8640 +\trkeep\intbl +{ +{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 1\par} +\cell} +{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 1\par} +\cell} +{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 1\par} +\cell} +{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 1\par} +\cell} +} +\intbl\row} +{\pard \ql \f0 \sa180 \li0 \fi0 \par} +{\pard \ql \f0 \sa180 \li0 \fi0 Simple table indented two spaces:\par} +{ +\trowd \trgaph120 +\clbrdrb\brdrs\cellx2160\clbrdrb\brdrs\cellx4320\clbrdrb\brdrs\cellx6480\clbrdrb\brdrs\cellx8640 +\trkeep\intbl +{ +{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 Right\par} +\cell} +{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Left\par} +\cell} +{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 Center\par} +\cell} +{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Default\par} +\cell} +} +\intbl\row} +{ +\trowd \trgaph120 +\cellx2160\cellx4320\cellx6480\cellx8640 +\trkeep\intbl +{ +{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 12\par} +\cell} +{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 12\par} +\cell} +{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 12\par} +\cell} +{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 12\par} +\cell} +} +\intbl\row} +{ +\trowd \trgaph120 +\cellx2160\cellx4320\cellx6480\cellx8640 +\trkeep\intbl +{ +{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 123\par} +\cell} +{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 123\par} +\cell} +{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 123\par} +\cell} +{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 123\par} +\cell} +} +\intbl\row} +{ +\trowd \trgaph120 +\cellx2160\cellx4320\cellx6480\cellx8640 +\trkeep\intbl +{ +{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 1\par} +\cell} +{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 1\par} +\cell} +{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 1\par} +\cell} +{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 1\par} +\cell} +} +\intbl\row} +{\pard \ql \f0 \sa180 \li0 \fi0 Demonstration of simple table syntax.\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Multiline table with caption:\par} +{ +\trowd \trgaph120 +\clbrdrb\brdrs\cellx1296\clbrdrb\brdrs\cellx2484\clbrdrb\brdrs\cellx3888\clbrdrb\brdrs\cellx6804 +\trkeep\intbl +{ +{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 Centered Header\par} +\cell} +{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Left Aligned\par} +\cell} +{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 Right Aligned\par} +\cell} +{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Default aligned\par} +\cell} +} +\intbl\row} +{ +\trowd \trgaph120 +\cellx1296\cellx2484\cellx3888\cellx6804 +\trkeep\intbl +{ +{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 First\par} +\cell} +{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 row\par} +\cell} +{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 12.0\par} +\cell} +{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Example of a row that spans multiple lines.\par} +\cell} +} +\intbl\row} +{ +\trowd \trgaph120 +\cellx1296\cellx2484\cellx3888\cellx6804 +\trkeep\intbl +{ +{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 Second\par} +\cell} +{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 row\par} +\cell} +{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 5.0\par} +\cell} +{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Here\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} +{ +\trowd \trgaph120 +\clbrdrb\brdrs\cellx1296\clbrdrb\brdrs\cellx2484\clbrdrb\brdrs\cellx3888\clbrdrb\brdrs\cellx6804 +\trkeep\intbl +{ +{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 Centered Header\par} +\cell} +{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Left Aligned\par} +\cell} +{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 Right Aligned\par} +\cell} +{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Default aligned\par} +\cell} +} +\intbl\row} +{ +\trowd \trgaph120 +\cellx1296\cellx2484\cellx3888\cellx6804 +\trkeep\intbl +{ +{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 First\par} +\cell} +{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 row\par} +\cell} +{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 12.0\par} +\cell} +{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Example of a row that spans multiple lines.\par} +\cell} +} +\intbl\row} +{ +\trowd \trgaph120 +\cellx1296\cellx2484\cellx3888\cellx6804 +\trkeep\intbl +{ +{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 Second\par} +\cell} +{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 row\par} +\cell} +{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 5.0\par} +\cell} +{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Here\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} +{ +\trowd \trgaph120 +\cellx2160\cellx4320\cellx6480\cellx8640 +\trkeep\intbl +{ +{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 12\par} +\cell} +{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 12\par} +\cell} +{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 12\par} +\cell} +{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 12\par} +\cell} +} +\intbl\row} +{ +\trowd \trgaph120 +\cellx2160\cellx4320\cellx6480\cellx8640 +\trkeep\intbl +{ +{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 123\par} +\cell} +{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 123\par} +\cell} +{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 123\par} +\cell} +{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 123\par} +\cell} +} +\intbl\row} +{ +\trowd \trgaph120 +\cellx2160\cellx4320\cellx6480\cellx8640 +\trkeep\intbl +{ +{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 1\par} +\cell} +{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 1\par} +\cell} +{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 1\par} +\cell} +{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 1\par} +\cell} +} +\intbl\row} +{\pard \ql \f0 \sa180 \li0 \fi0 \par} +{\pard \ql \f0 \sa180 \li0 \fi0 Multiline table without column headers:\par} +{ +\trowd \trgaph120 +\cellx1296\cellx2484\cellx3888\cellx6804 +\trkeep\intbl +{ +{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 First\par} +\cell} +{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 row\par} +\cell} +{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 12.0\par} +\cell} +{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Example of a row that spans multiple lines.\par} +\cell} +} +\intbl\row} +{ +\trowd \trgaph120 +\cellx1296\cellx2484\cellx3888\cellx6804 +\trkeep\intbl +{ +{{\pard\intbl \qc \f0 \sa0 \li0 \fi0 Second\par} +\cell} +{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 row\par} +\cell} +{{\pard\intbl \qr \f0 \sa0 \li0 \fi0 5.0\par} +\cell} +{{\pard\intbl \ql \f0 \sa0 \li0 \fi0 Here\u8217's another one. Note the blank line between rows.\par} +\cell} +} +\intbl\row} +{\pard \ql \f0 \sa180 \li0 \fi0 \par} + diff --git a/test/tables.tei b/test/tables.tei new file mode 100644 index 0000000..64438e5 --- /dev/null +++ b/test/tables.tei @@ -0,0 +1,171 @@ +

    Simple table with caption:

    + + +

    Right

    +

    Left

    +

    Center

    +

    Default

    +
    + +

    12

    +

    12

    +

    12

    +

    12

    +
    + +

    123

    +

    123

    +

    123

    +

    123

    +
    + +

    1

    +

    1

    +

    1

    +

    1

    +
    +
    +

    Simple table without caption:

    + + +

    Right

    +

    Left

    +

    Center

    +

    Default

    +
    + +

    12

    +

    12

    +

    12

    +

    12

    +
    + +

    123

    +

    123

    +

    123

    +

    123

    +
    + +

    1

    +

    1

    +

    1

    +

    1

    +
    +
    +

    Simple table indented two spaces:

    + + +

    Right

    +

    Left

    +

    Center

    +

    Default

    +
    + +

    12

    +

    12

    +

    12

    +

    12

    +
    + +

    123

    +

    123

    +

    123

    +

    123

    +
    + +

    1

    +

    1

    +

    1

    +

    1

    +
    +
    +

    Multiline table with caption:

    + + +

    Centered Header

    +

    Left Aligned

    +

    Right Aligned

    +

    Default aligned

    +
    + +

    First

    +

    row

    +

    12.0

    +

    Example of a row that spans multiple lines.

    +
    + +

    Second

    +

    row

    +

    5.0

    +

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

    +
    +
    +

    Multiline table without caption:

    + + +

    Centered Header

    +

    Left Aligned

    +

    Right Aligned

    +

    Default aligned

    +
    + +

    First

    +

    row

    +

    12.0

    +

    Example of a row that spans multiple lines.

    +
    + +

    Second

    +

    row

    +

    5.0

    +

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

    +
    +
    +

    Table without column headers:

    + + + + + + + + +

    12

    +

    12

    +

    12

    +

    12

    +
    + +

    123

    +

    123

    +

    123

    +

    123

    +
    + +

    1

    +

    1

    +

    1

    +

    1

    +
    +
    +

    Multiline table without column headers:

    + + + + + + + + +

    First

    +

    row

    +

    12.0

    +

    Example of a row that spans multiple lines.

    +
    + +

    Second

    +

    row

    +

    5.0

    +

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

    +
    +
    diff --git a/test/tables.texinfo b/test/tables.texinfo new file mode 100644 index 0000000..b82006f --- /dev/null +++ b/test/tables.texinfo @@ -0,0 +1,158 @@ +@node Top +@top Top + +Simple table with caption: + +@float +@multitable {Right} {Left} {Center} {Default} +@headitem +Right + @tab Left + @tab Center + @tab Default +@item +12 + @tab 12 + @tab 12 + @tab 12 +@item +123 + @tab 123 + @tab 123 + @tab 123 +@item +1 + @tab 1 + @tab 1 + @tab 1 +@end multitable +@caption{Demonstration of simple table syntax.} +@end float +Simple table without caption: + +@multitable {Right} {Left} {Center} {Default} +@headitem +Right + @tab Left + @tab Center + @tab Default +@item +12 + @tab 12 + @tab 12 + @tab 12 +@item +123 + @tab 123 + @tab 123 + @tab 123 +@item +1 + @tab 1 + @tab 1 + @tab 1 +@end multitable + +Simple table indented two spaces: + +@float +@multitable {Right} {Left} {Center} {Default} +@headitem +Right + @tab Left + @tab Center + @tab Default +@item +12 + @tab 12 + @tab 12 + @tab 12 +@item +123 + @tab 123 + @tab 123 + @tab 123 +@item +1 + @tab 1 + @tab 1 + @tab 1 +@end multitable +@caption{Demonstration of simple table syntax.} +@end float +Multiline table with caption: + +@float +@multitable @columnfractions 0.15 0.14 0.16 0.34 +@headitem +Centered Header + @tab Left Aligned + @tab Right Aligned + @tab Default aligned +@item +First + @tab row + @tab 12.0 + @tab Example of a row that spans multiple lines. +@item +Second + @tab row + @tab 5.0 + @tab Here's another one. Note the blank line between rows. +@end multitable +@caption{Here's the caption. It may span multiple lines.} +@end float +Multiline table without caption: + +@multitable @columnfractions 0.15 0.14 0.16 0.34 +@headitem +Centered Header + @tab Left Aligned + @tab Right Aligned + @tab Default aligned +@item +First + @tab row + @tab 12.0 + @tab Example of a row that spans multiple lines. +@item +Second + @tab row + @tab 5.0 + @tab Here's another one. Note the blank line between rows. +@end multitable + +Table without column headers: + +@multitable {123} {123} {123} {123} +@item +12 + @tab 12 + @tab 12 + @tab 12 +@item +123 + @tab 123 + @tab 123 + @tab 123 +@item +1 + @tab 1 + @tab 1 + @tab 1 +@end multitable + +Multiline table without column headers: + +@multitable @columnfractions 0.15 0.14 0.16 0.34 +@item +First + @tab row + @tab 12.0 + @tab Example of a row that spans multiple lines. +@item +Second + @tab row + @tab 5.0 + @tab Here's another one. Note the blank line between rows. +@end multitable diff --git a/test/tables.textile b/test/tables.textile new file mode 100644 index 0000000..6c6b234 --- /dev/null +++ b/test/tables.textile @@ -0,0 +1,167 @@ +Simple table with caption: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Demonstration of simple table syntax.
    RightLeftCenterDefault
    12121212
    123123123123
    1111
    + +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.
    RightLeftCenterDefault
    12121212
    123123123123
    1111
    + +Multiline table with caption: + + + +++++ + + + + + + + + + + + + + + + + + + + + + +
    Here's the caption. It may span multiple lines.
    Centered HeaderLeft AlignedRight AlignedDefault aligned
    Firstrow12.0Example of a row that spans multiple lines.
    Secondrow5.0Here's another one. Note the blank line between rows.
    + +Multiline table without caption: + + +++++ + + + + + + + + + + + + + + + + + + + + + +
    Centered HeaderLeft AlignedRight AlignedDefault aligned
    Firstrow12.0Example of a row that spans multiple lines.
    Secondrow5.0Here's another one. Note the blank line between rows.
    + +Table without column headers: + +|>. 12|<. 12|=. 12|>. 12| +|>. 123|<. 123|=. 123|>. 123| +|>. 1|<. 1|=. 1|>. 1| + +Multiline table without column headers: + + +++++ + + + + + + + + + + + + + +
    Firstrow12.0Example of a row that spans multiple lines.
    Secondrow5.0Here's another one. Note the blank line between rows.
    + diff --git a/test/tables.txt b/test/tables.txt new file mode 100644 index 0000000..d704922 --- /dev/null +++ b/test/tables.txt @@ -0,0 +1,75 @@ +Simple table with caption: + + Right Left Center Default +------- ------ ---------- ------- + 12 12 12 12 + 123 123 123 123 + 1 1 1 1 + +Table: Demonstration of simple table syntax. + +Simple table without caption: + + Right Left Center Default +------- ------ ---------- ------- + 12 12 12 12 + 123 123 123 123 + 1 1 1 1 + +Simple table indented two spaces: + + Right Left Center Default + ------- ------ ---------- ------- + 12 12 12 12 + 123 123 123 123 + 1 1 1 1 + + : Demonstration of simple table syntax. + +Multiline table with caption: + +: Here's the caption. +It may span multiple lines. + +--------------------------------------------------------------- + Centered Left Right + Header Aligned Aligned Default aligned +---------- --------- ----------- --------------------------- + First row 12.0 Example of a row that spans + multiple lines. + + Second row 5.0 Here's another one. Note + the blank line between rows. +--------------------------------------------------------------- + +Multiline table without caption: + +--------------------------------------------------------------- + Centered Left Right + Header Aligned Aligned Default aligned +---------- --------- ----------- --------------------------- + First row 12.0 Example of a row that spans + multiple lines. + + Second row 5.0 Here's another one. Note + the blank line between rows. +--------------------------------------------------------------- + +Table without column headers: + +------- ------ ---------- ------- + 12 12 12 12 + 123 123 123 123 + 1 1 1 1 +------- ------ ---------- ------- + +Multiline table without column headers: + +---------- --------- ----------- --------------------------- + First row 12.0 Example of a row that spans + multiple lines. + + Second row 5.0 Here's another one. Note + the blank line between rows. +---------- --------- ----------- --------------------------- + diff --git a/test/tables.zimwiki b/test/tables.zimwiki new file mode 100644 index 0000000..2757055 --- /dev/null +++ b/test/tables.zimwiki @@ -0,0 +1,56 @@ +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| +|----:|:----|:-----:|----:| +| 12|12 | 12 | 12| +| 123|123 | 123 | 123| +| 1|1 | 1 | 1| + +Multiline table without column headers: + +| First |row | 12.0|Example of a row that spans multiple lines. | +|:--------:|:----|-----:|-----------------------------------------------------| +| First |row | 12.0|Example of a row that spans multiple lines. | +| Second |row | 5.0|Here’s another one. Note the blank line between rows.| + diff --git a/test/test-pandoc.hs b/test/test-pandoc.hs new file mode 100644 index 0000000..4cf1a95 --- /dev/null +++ b/test/test-pandoc.hs @@ -0,0 +1,83 @@ +{-# OPTIONS_GHC -Wall #-} + +module Main where + +import GHC.IO.Encoding +import Test.Tasty +import qualified Tests.Command +import qualified Tests.Lua +import qualified Tests.Old +import qualified Tests.Readers.Creole +import qualified Tests.Readers.Docx +import qualified Tests.Readers.EPUB +import qualified Tests.Readers.HTML +import qualified Tests.Readers.JATS +import qualified Tests.Readers.LaTeX +import qualified Tests.Readers.Markdown +import qualified Tests.Readers.Muse +import qualified Tests.Readers.Odt +import qualified Tests.Readers.Org +import qualified Tests.Readers.RST +import qualified Tests.Readers.Txt2Tags +import qualified Tests.Shared +import qualified Tests.Writers.AsciiDoc +import qualified Tests.Writers.ConTeXt +import qualified Tests.Writers.Docbook +import qualified Tests.Writers.Docx +import qualified Tests.Writers.FB2 +import qualified Tests.Writers.HTML +import qualified Tests.Writers.JATS +import qualified Tests.Writers.LaTeX +import qualified Tests.Writers.Markdown +import qualified Tests.Writers.Muse +import qualified Tests.Writers.Native +import qualified Tests.Writers.Org +import qualified Tests.Writers.Plain +import qualified Tests.Writers.Powerpoint +import qualified Tests.Writers.RST +import qualified Tests.Writers.TEI +import Text.Pandoc.Shared (inDirectory) + +tests :: TestTree +tests = testGroup "pandoc tests" [ Tests.Command.tests + , testGroup "Old" Tests.Old.tests + , testGroup "Shared" Tests.Shared.tests + , testGroup "Writers" + [ testGroup "Native" Tests.Writers.Native.tests + , testGroup "ConTeXt" Tests.Writers.ConTeXt.tests + , testGroup "LaTeX" Tests.Writers.LaTeX.tests + , testGroup "HTML" Tests.Writers.HTML.tests + , testGroup "JATS" Tests.Writers.JATS.tests + , testGroup "Docbook" Tests.Writers.Docbook.tests + , testGroup "Markdown" Tests.Writers.Markdown.tests + , testGroup "Org" Tests.Writers.Org.tests + , testGroup "Plain" Tests.Writers.Plain.tests + , testGroup "AsciiDoc" Tests.Writers.AsciiDoc.tests + , testGroup "Docx" Tests.Writers.Docx.tests + , testGroup "RST" Tests.Writers.RST.tests + , testGroup "TEI" Tests.Writers.TEI.tests + , testGroup "Muse" Tests.Writers.Muse.tests + , testGroup "FB2" Tests.Writers.FB2.tests + , testGroup "PowerPoint" Tests.Writers.Powerpoint.tests + ] + , testGroup "Readers" + [ testGroup "LaTeX" Tests.Readers.LaTeX.tests + , testGroup "Markdown" Tests.Readers.Markdown.tests + , testGroup "HTML" Tests.Readers.HTML.tests + , testGroup "JATS" Tests.Readers.JATS.tests + , testGroup "Org" Tests.Readers.Org.tests + , testGroup "RST" Tests.Readers.RST.tests + , testGroup "Docx" Tests.Readers.Docx.tests + , testGroup "Odt" Tests.Readers.Odt.tests + , testGroup "Txt2Tags" Tests.Readers.Txt2Tags.tests + , testGroup "EPUB" Tests.Readers.EPUB.tests + , testGroup "Muse" Tests.Readers.Muse.tests + , testGroup "Creole" Tests.Readers.Creole.tests + ] + , testGroup "Lua filters" Tests.Lua.tests + ] + +main :: IO () +main = do + setLocaleEncoding utf8 + inDirectory "test" $ defaultMain tests diff --git a/test/testsuite.native b/test/testsuite.native new file mode 100644 index 0000000..0587bdd --- /dev/null +++ b/test/testsuite.native @@ -0,0 +1,409 @@ +Pandoc (Meta {unMeta = fromList [("author",MetaList [MetaInlines [Str "John",Space,Str "MacFarlane"],MetaInlines [Str "Anonymous"]]),("date",MetaInlines [Str "July",Space,Str "17,",Space,Str "2006"]),("title",MetaInlines [Str "Pandoc",Space,Str "Test",Space,Str "Suite"])]}) +[Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "set",Space,Str "of",Space,Str "tests",Space,Str "for",Space,Str "pandoc.",Space,Str "Most",Space,Str "of",Space,Str "them",Space,Str "are",Space,Str "adapted",Space,Str "from",SoftBreak,Str "John",Space,Str "Gruber\8217s",Space,Str "markdown",Space,Str "test",Space,Str "suite."] +,HorizontalRule +,Header 1 ("headers",[],[]) [Str "Headers"] +,Header 2 ("level-2-with-an-embedded-link",[],[]) [Str "Level",Space,Str "2",Space,Str "with",Space,Str "an",Space,Link ("",[],[]) [Str "embedded",Space,Str "link"] ("/url","")] +,Header 3 ("level-3-with-emphasis",[],[]) [Str "Level",Space,Str "3",Space,Str "with",Space,Emph [Str "emphasis"]] +,Header 4 ("level-4",[],[]) [Str "Level",Space,Str "4"] +,Header 5 ("level-5",[],[]) [Str "Level",Space,Str "5"] +,Header 1 ("level-1",[],[]) [Str "Level",Space,Str "1"] +,Header 2 ("level-2-with-emphasis",[],[]) [Str "Level",Space,Str "2",Space,Str "with",Space,Emph [Str "emphasis"]] +,Header 3 ("level-3",[],[]) [Str "Level",Space,Str "3"] +,Para [Str "with",Space,Str "no",Space,Str "blank",Space,Str "line"] +,Header 2 ("level-2",[],[]) [Str "Level",Space,Str "2"] +,Para [Str "with",Space,Str "no",Space,Str "blank",Space,Str "line"] +,HorizontalRule +,Header 1 ("paragraphs",[],[]) [Str "Paragraphs"] +,Para [Str "Here\8217s",Space,Str "a",Space,Str "regular",Space,Str "paragraph."] +,Para [Str "In",Space,Str "Markdown",Space,Str "1.0.0",Space,Str "and",Space,Str "earlier.",Space,Str "Version",SoftBreak,Str "8.",Space,Str "This",Space,Str "line",Space,Str "turns",Space,Str "into",Space,Str "a",Space,Str "list",Space,Str "item.",SoftBreak,Str "Because",Space,Str "a",Space,Str "hard-wrapped",Space,Str "line",Space,Str "in",Space,Str "the",SoftBreak,Str "middle",Space,Str "of",Space,Str "a",Space,Str "paragraph",Space,Str "looked",Space,Str "like",Space,Str "a",SoftBreak,Str "list",Space,Str "item."] +,Para [Str "Here\8217s",Space,Str "one",Space,Str "with",Space,Str "a",Space,Str "bullet.",SoftBreak,Str "*",Space,Str "criminey."] +,Para [Str "There",Space,Str "should",Space,Str "be",Space,Str "a",Space,Str "hard",Space,Str "line",Space,Str "break",LineBreak,Str "here."] +,HorizontalRule +,Header 1 ("block-quotes",[],[]) [Str "Block",Space,Str "Quotes"] +,Para [Str "E-mail",Space,Str "style:"] +,BlockQuote + [Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "block",Space,Str "quote.",SoftBreak,Str "It",Space,Str "is",Space,Str "pretty",Space,Str "short."]] +,BlockQuote + [Para [Str "Code",Space,Str "in",Space,Str "a",Space,Str "block",Space,Str "quote:"] + ,CodeBlock ("",[],[]) "sub status {\n print \"working\";\n}" + ,Para [Str "A",Space,Str "list:"] + ,OrderedList (1,Decimal,Period) + [[Plain [Str "item",Space,Str "one"]] + ,[Plain [Str "item",Space,Str "two"]]] + ,Para [Str "Nested",Space,Str "block",Space,Str "quotes:"] + ,BlockQuote + [Para [Str "nested"]] + ,BlockQuote + [Para [Str "nested"]]] +,Para [Str "This",Space,Str "should",Space,Str "not",Space,Str "be",Space,Str "a",Space,Str "block",Space,Str "quote:",Space,Str "2",SoftBreak,Str ">",Space,Str "1."] +,Para [Str "And",Space,Str "a",Space,Str "following",Space,Str "paragraph."] +,HorizontalRule +,Header 1 ("code-blocks",[],[]) [Str "Code",Space,Str "Blocks"] +,Para [Str "Code:"] +,CodeBlock ("",[],[]) "---- (should be four hyphens)\n\nsub status {\n print \"working\";\n}\n\nthis code block is indented by one tab" +,Para [Str "And:"] +,CodeBlock ("",[],[]) " this code block is indented by two tabs\n\nThese should not be escaped: \\$ \\\\ \\> \\[ \\{" +,HorizontalRule +,Header 1 ("lists",[],[]) [Str "Lists"] +,Header 2 ("unordered",[],[]) [Str "Unordered"] +,Para [Str "Asterisks",Space,Str "tight:"] +,BulletList + [[Plain [Str "asterisk",Space,Str "1"]] + ,[Plain [Str "asterisk",Space,Str "2"]] + ,[Plain [Str "asterisk",Space,Str "3"]]] +,Para [Str "Asterisks",Space,Str "loose:"] +,BulletList + [[Para [Str "asterisk",Space,Str "1"]] + ,[Para [Str "asterisk",Space,Str "2"]] + ,[Para [Str "asterisk",Space,Str "3"]]] +,Para [Str "Pluses",Space,Str "tight:"] +,BulletList + [[Plain [Str "Plus",Space,Str "1"]] + ,[Plain [Str "Plus",Space,Str "2"]] + ,[Plain [Str "Plus",Space,Str "3"]]] +,Para [Str "Pluses",Space,Str "loose:"] +,BulletList + [[Para [Str "Plus",Space,Str "1"]] + ,[Para [Str "Plus",Space,Str "2"]] + ,[Para [Str "Plus",Space,Str "3"]]] +,Para [Str "Minuses",Space,Str "tight:"] +,BulletList + [[Plain [Str "Minus",Space,Str "1"]] + ,[Plain [Str "Minus",Space,Str "2"]] + ,[Plain [Str "Minus",Space,Str "3"]]] +,Para [Str "Minuses",Space,Str "loose:"] +,BulletList + [[Para [Str "Minus",Space,Str "1"]] + ,[Para [Str "Minus",Space,Str "2"]] + ,[Para [Str "Minus",Space,Str "3"]]] +,Header 2 ("ordered",[],[]) [Str "Ordered"] +,Para [Str "Tight:"] +,OrderedList (1,Decimal,Period) + [[Plain [Str "First"]] + ,[Plain [Str "Second"]] + ,[Plain [Str "Third"]]] +,Para [Str "and:"] +,OrderedList (1,Decimal,Period) + [[Plain [Str "One"]] + ,[Plain [Str "Two"]] + ,[Plain [Str "Three"]]] +,Para [Str "Loose",Space,Str "using",Space,Str "tabs:"] +,OrderedList (1,Decimal,Period) + [[Para [Str "First"]] + ,[Para [Str "Second"]] + ,[Para [Str "Third"]]] +,Para [Str "and",Space,Str "using",Space,Str "spaces:"] +,OrderedList (1,Decimal,Period) + [[Para [Str "One"]] + ,[Para [Str "Two"]] + ,[Para [Str "Three"]]] +,Para [Str "Multiple",Space,Str "paragraphs:"] +,OrderedList (1,Decimal,Period) + [[Para [Str "Item",Space,Str "1,",Space,Str "graf",Space,Str "one."] + ,Para [Str "Item",Space,Str "1.",Space,Str "graf",Space,Str "two.",Space,Str "The",Space,Str "quick",Space,Str "brown",Space,Str "fox",Space,Str "jumped",Space,Str "over",Space,Str "the",Space,Str "lazy",Space,Str "dog\8217s",SoftBreak,Str "back."]] + ,[Para [Str "Item",Space,Str "2."]] + ,[Para [Str "Item",Space,Str "3."]]] +,Header 2 ("nested",[],[]) [Str "Nested"] +,BulletList + [[Plain [Str "Tab"] + ,BulletList + [[Plain [Str "Tab"] + ,BulletList + [[Plain [Str "Tab"]]]]]]] +,Para [Str "Here\8217s",Space,Str "another:"] +,OrderedList (1,Decimal,Period) + [[Plain [Str "First"]] + ,[Plain [Str "Second:"] + ,BulletList + [[Plain [Str "Fee"]] + ,[Plain [Str "Fie"]] + ,[Plain [Str "Foe"]]]] + ,[Plain [Str "Third"]]] +,Para [Str "Same",Space,Str "thing",Space,Str "but",Space,Str "with",Space,Str "paragraphs:"] +,OrderedList (1,Decimal,Period) + [[Para [Str "First"]] + ,[Para [Str "Second:"] + ,BulletList + [[Plain [Str "Fee"]] + ,[Plain [Str "Fie"]] + ,[Plain [Str "Foe"]]]] + ,[Para [Str "Third"]]] +,Header 2 ("tabs-and-spaces",[],[]) [Str "Tabs",Space,Str "and",Space,Str "spaces"] +,BulletList + [[Para [Str "this",Space,Str "is",Space,Str "a",Space,Str "list",Space,Str "item",SoftBreak,Str "indented",Space,Str "with",Space,Str "tabs"]] + ,[Para [Str "this",Space,Str "is",Space,Str "a",Space,Str "list",Space,Str "item",SoftBreak,Str "indented",Space,Str "with",Space,Str "spaces"] + ,BulletList + [[Para [Str "this",Space,Str "is",Space,Str "an",Space,Str "example",Space,Str "list",Space,Str "item",SoftBreak,Str "indented",Space,Str "with",Space,Str "tabs"]] + ,[Para [Str "this",Space,Str "is",Space,Str "an",Space,Str "example",Space,Str "list",Space,Str "item",SoftBreak,Str "indented",Space,Str "with",Space,Str "spaces"]]]]] +,Header 2 ("fancy-list-markers",[],[]) [Str "Fancy",Space,Str "list",Space,Str "markers"] +,OrderedList (2,Decimal,TwoParens) + [[Plain [Str "begins",Space,Str "with",Space,Str "2"]] + ,[Para [Str "and",Space,Str "now",Space,Str "3"] + ,Para [Str "with",Space,Str "a",Space,Str "continuation"] + ,OrderedList (4,LowerRoman,Period) + [[Plain [Str "sublist",Space,Str "with",Space,Str "roman",Space,Str "numerals,",SoftBreak,Str "starting",Space,Str "with",Space,Str "4"]] + ,[Plain [Str "more",Space,Str "items"] + ,OrderedList (1,UpperAlpha,TwoParens) + [[Plain [Str "a",Space,Str "subsublist"]] + ,[Plain [Str "a",Space,Str "subsublist"]]]]]]] +,Para [Str "Nesting:"] +,OrderedList (1,UpperAlpha,Period) + [[Plain [Str "Upper",Space,Str "Alpha"] + ,OrderedList (1,UpperRoman,Period) + [[Plain [Str "Upper",Space,Str "Roman."] + ,OrderedList (6,Decimal,TwoParens) + [[Plain [Str "Decimal",Space,Str "start",Space,Str "with",Space,Str "6"] + ,OrderedList (3,LowerAlpha,OneParen) + [[Plain [Str "Lower",Space,Str "alpha",Space,Str "with",Space,Str "paren"]]]]]]]]] +,Para [Str "Autonumbering:"] +,OrderedList (1,DefaultStyle,DefaultDelim) + [[Plain [Str "Autonumber."]] + ,[Plain [Str "More."] + ,OrderedList (1,DefaultStyle,DefaultDelim) + [[Plain [Str "Nested."]]]]] +,Para [Str "Should",Space,Str "not",Space,Str "be",Space,Str "a",Space,Str "list",Space,Str "item:"] +,Para [Str "M.A.\160\&2007"] +,Para [Str "B.",Space,Str "Williams"] +,HorizontalRule +,Header 1 ("definition-lists",[],[]) [Str "Definition",Space,Str "Lists"] +,Para [Str "Tight",Space,Str "using",Space,Str "spaces:"] +,DefinitionList + [([Str "apple"], + [[Plain [Str "red",Space,Str "fruit"]]]) + ,([Str "orange"], + [[Plain [Str "orange",Space,Str "fruit"]]]) + ,([Str "banana"], + [[Plain [Str "yellow",Space,Str "fruit"]]])] +,Para [Str "Tight",Space,Str "using",Space,Str "tabs:"] +,DefinitionList + [([Str "apple"], + [[Plain [Str "red",Space,Str "fruit"]]]) + ,([Str "orange"], + [[Plain [Str "orange",Space,Str "fruit"]]]) + ,([Str "banana"], + [[Plain [Str "yellow",Space,Str "fruit"]]])] +,Para [Str "Loose:"] +,DefinitionList + [([Str "apple"], + [[Para [Str "red",Space,Str "fruit"]]]) + ,([Str "orange"], + [[Para [Str "orange",Space,Str "fruit"]]]) + ,([Str "banana"], + [[Para [Str "yellow",Space,Str "fruit"]]])] +,Para [Str "Multiple",Space,Str "blocks",Space,Str "with",Space,Str "italics:"] +,DefinitionList + [([Emph [Str "apple"]], + [[Para [Str "red",Space,Str "fruit"] + ,Para [Str "contains",Space,Str "seeds,",SoftBreak,Str "crisp,",Space,Str "pleasant",Space,Str "to",Space,Str "taste"]]]) + ,([Emph [Str "orange"]], + [[Para [Str "orange",Space,Str "fruit"] + ,CodeBlock ("",[],[]) "{ orange code block }" + ,BlockQuote + [Para [Str "orange",Space,Str "block",Space,Str "quote"]]]])] +,Para [Str "Multiple",Space,Str "definitions,",Space,Str "tight:"] +,DefinitionList + [([Str "apple"], + [[Plain [Str "red",Space,Str "fruit"]] + ,[Plain [Str "computer"]]]) + ,([Str "orange"], + [[Plain [Str "orange",Space,Str "fruit"]] + ,[Plain [Str "bank"]]])] +,Para [Str "Multiple",Space,Str "definitions,",Space,Str "loose:"] +,DefinitionList + [([Str "apple"], + [[Para [Str "red",Space,Str "fruit"]] + ,[Para [Str "computer"]]]) + ,([Str "orange"], + [[Para [Str "orange",Space,Str "fruit"]] + ,[Para [Str "bank"]]])] +,Para [Str "Blank",Space,Str "line",Space,Str "after",Space,Str "term,",Space,Str "indented",Space,Str "marker,",Space,Str "alternate",Space,Str "markers:"] +,DefinitionList + [([Str "apple"], + [[Para [Str "red",Space,Str "fruit"]] + ,[Para [Str "computer"]]]) + ,([Str "orange"], + [[Para [Str "orange",Space,Str "fruit"] + ,OrderedList (1,Decimal,Period) + [[Plain [Str "sublist"]] + ,[Plain [Str "sublist"]]]]])] +,Header 1 ("html-blocks",[],[]) [Str "HTML",Space,Str "Blocks"] +,Para [Str "Simple",Space,Str "block",Space,Str "on",Space,Str "one",Space,Str "line:"] +,Div ("",[],[]) + [Plain [Str "foo"]] +,Para [Str "And",Space,Str "nested",Space,Str "without",Space,Str "indentation:"] +,Div ("",[],[]) + [Div ("",[],[]) + [Div ("",[],[]) + [Para [Str "foo"]]] + ,Div ("",[],[]) + [Plain [Str "bar"]]] +,Para [Str "Interpreted",Space,Str "markdown",Space,Str "in",Space,Str "a",Space,Str "table:"] +,RawBlock (Format "html") "" +,RawBlock (Format "html") "" +,RawBlock (Format "html") "" +,RawBlock (Format "html") "" +,RawBlock (Format "html") "" +,RawBlock (Format "html") "
    " +,Plain [Str "This",Space,Str "is",Space,Emph [Str "emphasized"]] +,RawBlock (Format "html") "" +,Plain [Str "And",Space,Str "this",Space,Str "is",Space,Strong [Str "strong"]] +,RawBlock (Format "html") "
    " +,RawBlock (Format "html") "" +,Para [Str "Here\8217s",Space,Str "a",Space,Str "simple",Space,Str "block:"] +,Div ("",[],[]) + [Para [Str "foo"]] +,Para [Str "This",Space,Str "should",Space,Str "be",Space,Str "a",Space,Str "code",Space,Str "block,",Space,Str "though:"] +,CodeBlock ("",[],[]) "
    \n foo\n
    " +,Para [Str "As",Space,Str "should",Space,Str "this:"] +,CodeBlock ("",[],[]) "
    foo
    " +,Para [Str "Now,",Space,Str "nested:"] +,Div ("",[],[]) + [Div ("",[],[]) + [Div ("",[],[]) + [Plain [Str "foo"]]]] +,Para [Str "This",Space,Str "should",Space,Str "just",Space,Str "be",Space,Str "an",Space,Str "HTML",Space,Str "comment:"] +,RawBlock (Format "html") "" +,Para [Str "Multiline:"] +,RawBlock (Format "html") "" +,RawBlock (Format "html") "" +,Para [Str "Code",Space,Str "block:"] +,CodeBlock ("",[],[]) "" +,Para [Str "Just",Space,Str "plain",Space,Str "comment,",Space,Str "with",Space,Str "trailing",Space,Str "spaces",Space,Str "on",Space,Str "the",Space,Str "line:"] +,RawBlock (Format "html") "" +,Para [Str "Code:"] +,CodeBlock ("",[],[]) "
    " +,Para [Str "Hr\8217s:"] +,RawBlock (Format "html") "
    " +,RawBlock (Format "html") "
    " +,RawBlock (Format "html") "
    " +,RawBlock (Format "html") "
    " +,RawBlock (Format "html") "
    " +,RawBlock (Format "html") "
    " +,RawBlock (Format "html") "
    " +,RawBlock (Format "html") "
    " +,RawBlock (Format "html") "
    " +,HorizontalRule +,Header 1 ("inline-markup",[],[]) [Str "Inline",Space,Str "Markup"] +,Para [Str "This",Space,Str "is",Space,Emph [Str "emphasized"],Str ",",Space,Str "and",Space,Str "so",Space,Emph [Str "is",Space,Str "this"],Str "."] +,Para [Str "This",Space,Str "is",Space,Strong [Str "strong"],Str ",",Space,Str "and",Space,Str "so",Space,Strong [Str "is",Space,Str "this"],Str "."] +,Para [Str "An",Space,Emph [Link ("",[],[]) [Str "emphasized",Space,Str "link"] ("/url","")],Str "."] +,Para [Strong [Emph [Str "This",Space,Str "is",Space,Str "strong",Space,Str "and",Space,Str "em."]]] +,Para [Str "So",Space,Str "is",Space,Strong [Emph [Str "this"]],Space,Str "word."] +,Para [Strong [Emph [Str "This",Space,Str "is",Space,Str "strong",Space,Str "and",Space,Str "em."]]] +,Para [Str "So",Space,Str "is",Space,Strong [Emph [Str "this"]],Space,Str "word."] +,Para [Str "This",Space,Str "is",Space,Str "code:",Space,Code ("",[],[]) ">",Str ",",Space,Code ("",[],[]) "$",Str ",",Space,Code ("",[],[]) "\\",Str ",",Space,Code ("",[],[]) "\\$",Str ",",Space,Code ("",[],[]) "",Str "."] +,Para [Strikeout [Str "This",Space,Str "is",Space,Emph [Str "strikeout"],Str "."]] +,Para [Str "Superscripts:",Space,Str "a",Superscript [Str "bc"],Str "d",Space,Str "a",Superscript [Emph [Str "hello"]],Space,Str "a",Superscript [Str "hello\160there"],Str "."] +,Para [Str "Subscripts:",Space,Str "H",Subscript [Str "2"],Str "O,",Space,Str "H",Subscript [Str "23"],Str "O,",Space,Str "H",Subscript [Str "many\160of\160them"],Str "O."] +,Para [Str "These",Space,Str "should",Space,Str "not",Space,Str "be",Space,Str "superscripts",Space,Str "or",Space,Str "subscripts,",SoftBreak,Str "because",Space,Str "of",Space,Str "the",Space,Str "unescaped",Space,Str "spaces:",Space,Str "a^b",Space,Str "c^d,",Space,Str "a~b",Space,Str "c~d."] +,HorizontalRule +,Header 1 ("smart-quotes-ellipses-dashes",[],[]) [Str "Smart",Space,Str "quotes,",Space,Str "ellipses,",Space,Str "dashes"] +,Para [Quoted DoubleQuote [Str "Hello,"],Space,Str "said",Space,Str "the",Space,Str "spider.",Space,Quoted DoubleQuote [Quoted SingleQuote [Str "Shelob"],Space,Str "is",Space,Str "my",Space,Str "name."]] +,Para [Quoted SingleQuote [Str "A"],Str ",",Space,Quoted SingleQuote [Str "B"],Str ",",Space,Str "and",Space,Quoted SingleQuote [Str "C"],Space,Str "are",Space,Str "letters."] +,Para [Quoted SingleQuote [Str "Oak,"],Space,Quoted SingleQuote [Str "elm,"],Space,Str "and",Space,Quoted SingleQuote [Str "beech"],Space,Str "are",Space,Str "names",Space,Str "of",Space,Str "trees.",SoftBreak,Str "So",Space,Str "is",Space,Quoted SingleQuote [Str "pine."]] +,Para [Quoted SingleQuote [Str "He",Space,Str "said,",Space,Quoted DoubleQuote [Str "I",Space,Str "want",Space,Str "to",Space,Str "go."]],Space,Str "Were",Space,Str "you",Space,Str "alive",Space,Str "in",Space,Str "the",SoftBreak,Str "70\8217s?"] +,Para [Str "Here",Space,Str "is",Space,Str "some",Space,Str "quoted",Space,Quoted SingleQuote [Code ("",[],[]) "code"],Space,Str "and",Space,Str "a",Space,Quoted DoubleQuote [Link ("",[],[]) [Str "quoted",Space,Str "link"] ("http://example.com/?foo=1&bar=2","")],Str "."] +,Para [Str "Some",Space,Str "dashes:",Space,Str "one\8212two",Space,Str "\8212",Space,Str "three\8212four",Space,Str "\8212",Space,Str "five."] +,Para [Str "Dashes",Space,Str "between",Space,Str "numbers:",Space,Str "5\8211\&7,",Space,Str "255\8211\&66,",Space,Str "1987\8211\&1999."] +,Para [Str "Ellipses\8230and\8230and\8230."] +,HorizontalRule +,Header 1 ("latex",[],[]) [Str "LaTeX"] +,BulletList + [[Plain [RawInline (Format "tex") "\\cite[22-23]{smith.1899}"]] + ,[Plain [Math InlineMath "2+2=4"]] + ,[Plain [Math InlineMath "x \\in y"]] + ,[Plain [Math InlineMath "\\alpha \\wedge \\omega"]] + ,[Plain [Math InlineMath "223"]] + ,[Plain [Math InlineMath "p",Str "-Tree"]] + ,[Plain [Str "Here\8217s",Space,Str "some",Space,Str "display",Space,Str "math:",SoftBreak,Math DisplayMath "\\frac{d}{dx}f(x)=\\lim_{h\\to 0}\\frac{f(x+h)-f(x)}{h}"]] + ,[Plain [Str "Here\8217s",Space,Str "one",Space,Str "that",Space,Str "has",Space,Str "a",Space,Str "line",Space,Str "break",Space,Str "in",Space,Str "it:",Space,Math InlineMath "\\alpha + \\omega \\times x^2",Str "."]]] +,Para [Str "These",Space,Str "shouldn\8217t",Space,Str "be",Space,Str "math:"] +,BulletList + [[Plain [Str "To",Space,Str "get",Space,Str "the",Space,Str "famous",Space,Str "equation,",Space,Str "write",Space,Code ("",[],[]) "$e = mc^2$",Str "."]] + ,[Plain [Str "$22,000",Space,Str "is",Space,Str "a",Space,Emph [Str "lot"],Space,Str "of",Space,Str "money.",Space,Str "So",Space,Str "is",Space,Str "$34,000.",SoftBreak,Str "(It",Space,Str "worked",Space,Str "if",Space,Quoted DoubleQuote [Str "lot"],Space,Str "is",Space,Str "emphasized.)"]] + ,[Plain [Str "Shoes",Space,Str "($20)",Space,Str "and",Space,Str "socks",Space,Str "($5)."]] + ,[Plain [Str "Escaped",Space,Code ("",[],[]) "$",Str ":",Space,Str "$73",Space,Emph [Str "this",Space,Str "should",Space,Str "be",Space,Str "emphasized"],Space,Str "23$."]]] +,Para [Str "Here\8217s",Space,Str "a",Space,Str "LaTeX",Space,Str "table:"] +,RawBlock (Format "latex") "\\begin{tabular}{|l|l|}\\hline\nAnimal & Number \\\\ \\hline\nDog & 2 \\\\\nCat & 1 \\\\ \\hline\n\\end{tabular}" +,HorizontalRule +,Header 1 ("special-characters",[],[]) [Str "Special",Space,Str "Characters"] +,Para [Str "Here",Space,Str "is",Space,Str "some",Space,Str "unicode:"] +,BulletList + [[Plain [Str "I",Space,Str "hat:",Space,Str "\206"]] + ,[Plain [Str "o",Space,Str "umlaut:",Space,Str "\246"]] + ,[Plain [Str "section:",Space,Str "\167"]] + ,[Plain [Str "set",Space,Str "membership:",Space,Str "\8712"]] + ,[Plain [Str "copyright:",Space,Str "\169"]]] +,Para [Str "AT&T",Space,Str "has",Space,Str "an",Space,Str "ampersand",Space,Str "in",Space,Str "their",Space,Str "name."] +,Para [Str "AT&T",Space,Str "is",Space,Str "another",Space,Str "way",Space,Str "to",Space,Str "write",Space,Str "it."] +,Para [Str "This",Space,Str "&",Space,Str "that."] +,Para [Str "4",Space,Str "<",Space,Str "5."] +,Para [Str "6",Space,Str ">",Space,Str "5."] +,Para [Str "Backslash:",Space,Str "\\"] +,Para [Str "Backtick:",Space,Str "`"] +,Para [Str "Asterisk:",Space,Str "*"] +,Para [Str "Underscore:",Space,Str "_"] +,Para [Str "Left",Space,Str "brace:",Space,Str "{"] +,Para [Str "Right",Space,Str "brace:",Space,Str "}"] +,Para [Str "Left",Space,Str "bracket:",Space,Str "["] +,Para [Str "Right",Space,Str "bracket:",Space,Str "]"] +,Para [Str "Left",Space,Str "paren:",Space,Str "("] +,Para [Str "Right",Space,Str "paren:",Space,Str ")"] +,Para [Str "Greater-than:",Space,Str ">"] +,Para [Str "Hash:",Space,Str "#"] +,Para [Str "Period:",Space,Str "."] +,Para [Str "Bang:",Space,Str "!"] +,Para [Str "Plus:",Space,Str "+"] +,Para [Str "Minus:",Space,Str "-"] +,HorizontalRule +,Header 1 ("links",[],[]) [Str "Links"] +,Header 2 ("explicit",[],[]) [Str "Explicit"] +,Para [Str "Just",Space,Str "a",Space,Link ("",[],[]) [Str "URL"] ("/url/",""),Str "."] +,Para [Link ("",[],[]) [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","title"),Str "."] +,Para [Link ("",[],[]) [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","title preceded by two spaces"),Str "."] +,Para [Link ("",[],[]) [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","title preceded by a tab"),Str "."] +,Para [Link ("",[],[]) [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","title with \"quotes\" in it")] +,Para [Link ("",[],[]) [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","title with single quotes")] +,Para [Link ("",[],[]) [Str "with_underscore"] ("/url/with_underscore","")] +,Para [Link ("",[],[]) [Str "Email",Space,Str "link"] ("mailto:nobody@nowhere.net","")] +,Para [Link ("",[],[]) [Str "Empty"] ("",""),Str "."] +,Header 2 ("reference",[],[]) [Str "Reference"] +,Para [Str "Foo",Space,Link ("",[],[]) [Str "bar"] ("/url/",""),Str "."] +,Para [Str "With",Space,Link ("",[],[]) [Str "embedded",Space,Str "[brackets]"] ("/url/",""),Str "."] +,Para [Link ("",[],[]) [Str "b"] ("/url/",""),Space,Str "by",Space,Str "itself",Space,Str "should",Space,Str "be",Space,Str "a",Space,Str "link."] +,Para [Str "Indented",Space,Link ("",[],[]) [Str "once"] ("/url",""),Str "."] +,Para [Str "Indented",Space,Link ("",[],[]) [Str "twice"] ("/url",""),Str "."] +,Para [Str "Indented",Space,Link ("",[],[]) [Str "thrice"] ("/url",""),Str "."] +,Para [Str "This",Space,Str "should",Space,Str "[not][]",Space,Str "be",Space,Str "a",Space,Str "link."] +,CodeBlock ("",[],[]) "[not]: /url" +,Para [Str "Foo",Space,Link ("",[],[]) [Str "bar"] ("/url/","Title with \"quotes\" inside"),Str "."] +,Para [Str "Foo",Space,Link ("",[],[]) [Str "biz"] ("/url/","Title with \"quote\" inside"),Str "."] +,Header 2 ("with-ampersands",[],[]) [Str "With",Space,Str "ampersands"] +,Para [Str "Here\8217s",Space,Str "a",Space,Link ("",[],[]) [Str "link",Space,Str "with",Space,Str "an",Space,Str "ampersand",Space,Str "in",Space,Str "the",Space,Str "URL"] ("http://example.com/?foo=1&bar=2",""),Str "."] +,Para [Str "Here\8217s",Space,Str "a",Space,Str "link",Space,Str "with",Space,Str "an",Space,Str "amersand",Space,Str "in",Space,Str "the",Space,Str "link",Space,Str "text:",Space,Link ("",[],[]) [Str "AT&T"] ("http://att.com/","AT&T"),Str "."] +,Para [Str "Here\8217s",Space,Str "an",Space,Link ("",[],[]) [Str "inline",Space,Str "link"] ("/script?foo=1&bar=2",""),Str "."] +,Para [Str "Here\8217s",Space,Str "an",Space,Link ("",[],[]) [Str "inline",Space,Str "link",Space,Str "in",Space,Str "pointy",Space,Str "braces"] ("/script?foo=1&bar=2",""),Str "."] +,Header 2 ("autolinks",[],[]) [Str "Autolinks"] +,Para [Str "With",Space,Str "an",Space,Str "ampersand:",Space,Link ("",[],[]) [Str "http://example.com/?foo=1&bar=2"] ("http://example.com/?foo=1&bar=2","")] +,BulletList + [[Plain [Str "In",Space,Str "a",Space,Str "list?"]] + ,[Plain [Link ("",[],[]) [Str "http://example.com/"] ("http://example.com/","")]] + ,[Plain [Str "It",Space,Str "should."]]] +,Para [Str "An",Space,Str "e-mail",Space,Str "address:",Space,Link ("",[],[]) [Str "nobody@nowhere.net"] ("mailto:nobody@nowhere.net","")] +,BlockQuote + [Para [Str "Blockquoted:",Space,Link ("",[],[]) [Str "http://example.com/"] ("http://example.com/","")]] +,Para [Str "Auto-links",Space,Str "should",Space,Str "not",Space,Str "occur",Space,Str "here:",Space,Code ("",[],[]) ""] +,CodeBlock ("",[],[]) "or here: " +,HorizontalRule +,Header 1 ("images",[],[]) [Str "Images"] +,Para [Str "From",Space,Quoted DoubleQuote [Str "Voyage",Space,Str "dans",Space,Str "la",Space,Str "Lune"],Space,Str "by",Space,Str "Georges",Space,Str "Melies",Space,Str "(1902):"] +,Para [Image ("",[],[]) [Str "lalune"] ("lalune.jpg","fig:Voyage dans la Lune")] +,Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "movie",Space,Image ("",[],[]) [Str "movie"] ("movie.jpg",""),Space,Str "icon."] +,HorizontalRule +,Header 1 ("footnotes",[],[]) [Str "Footnotes"] +,Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "footnote",Space,Str "reference,",Note [Para [Str "Here",Space,Str "is",Space,Str "the",Space,Str "footnote.",Space,Str "It",Space,Str "can",Space,Str "go",Space,Str "anywhere",Space,Str "after",Space,Str "the",Space,Str "footnote",SoftBreak,Str "reference.",Space,Str "It",Space,Str "need",Space,Str "not",Space,Str "be",Space,Str "placed",Space,Str "at",Space,Str "the",Space,Str "end",Space,Str "of",Space,Str "the",Space,Str "document."]],Space,Str "and",Space,Str "another.",Note [Para [Str "Here\8217s",Space,Str "the",Space,Str "long",Space,Str "note.",Space,Str "This",Space,Str "one",Space,Str "contains",Space,Str "multiple",SoftBreak,Str "blocks."],Para [Str "Subsequent",Space,Str "blocks",Space,Str "are",Space,Str "indented",Space,Str "to",Space,Str "show",Space,Str "that",Space,Str "they",Space,Str "belong",Space,Str "to",Space,Str "the",SoftBreak,Str "footnote",Space,Str "(as",Space,Str "with",Space,Str "list",Space,Str "items)."],CodeBlock ("",[],[]) " { }",Para [Str "If",Space,Str "you",Space,Str "want,",Space,Str "you",Space,Str "can",Space,Str "indent",Space,Str "every",Space,Str "line,",Space,Str "but",Space,Str "you",Space,Str "can",Space,Str "also",Space,Str "be",SoftBreak,Str "lazy",Space,Str "and",Space,Str "just",Space,Str "indent",Space,Str "the",Space,Str "first",Space,Str "line",Space,Str "of",Space,Str "each",Space,Str "block."]],SoftBreak,Str "This",Space,Str "should",Space,Emph [Str "not"],Space,Str "be",Space,Str "a",Space,Str "footnote",Space,Str "reference,",Space,Str "because",Space,Str "it",SoftBreak,Str "contains",Space,Str "a",Space,Str "space.[^my",Space,Str "note]",Space,Str "Here",Space,Str "is",Space,Str "an",Space,Str "inline",Space,Str "note.",Note [Para [Str "This",SoftBreak,Str "is",Space,Emph [Str "easier"],Space,Str "to",Space,Str "type.",Space,Str "Inline",Space,Str "notes",Space,Str "may",Space,Str "contain",SoftBreak,Link ("",[],[]) [Str "links"] ("http://google.com",""),Space,Str "and",Space,Code ("",[],[]) "]",Space,Str "verbatim",Space,Str "characters,",SoftBreak,Str "as",Space,Str "well",Space,Str "as",Space,Str "[bracketed",Space,Str "text]."]]] +,BlockQuote + [Para [Str "Notes",Space,Str "can",Space,Str "go",Space,Str "in",Space,Str "quotes.",Note [Para [Str "In",Space,Str "quote."]]]] +,OrderedList (1,Decimal,Period) + [[Plain [Str "And",Space,Str "in",Space,Str "list",Space,Str "items.",Note [Para [Str "In",Space,Str "list."]]]]] +,Para [Str "This",Space,Str "paragraph",Space,Str "should",Space,Str "not",Space,Str "be",Space,Str "part",Space,Str "of",Space,Str "the",Space,Str "note,",Space,Str "as",Space,Str "it",Space,Str "is",Space,Str "not",Space,Str "indented."]] diff --git a/test/testsuite.txt b/test/testsuite.txt new file mode 100644 index 0000000..9413cc8 --- /dev/null +++ b/test/testsuite.txt @@ -0,0 +1,725 @@ +% Pandoc Test Suite +% John MacFarlane; Anonymous +% July 17, 2006 + +This is a set of tests for pandoc. Most of them are adapted from +John Gruber's markdown test suite. + +----- + +# Headers + +## Level 2 with an [embedded link](/url) + +### Level 3 with *emphasis* + +#### Level 4 + +##### Level 5 + +Level 1 +======= + +Level 2 with *emphasis* +----------------------- + +### Level 3 +with no blank line + +Level 2 +------- +with no blank line + +---------- + +# Paragraphs + +Here's a regular paragraph. + +In Markdown 1.0.0 and earlier. Version +8. This line turns into a list item. +Because a hard-wrapped line in the +middle of a paragraph looked like a +list item. + +Here's one with a bullet. +* criminey. + +There should be a hard line break +here. + +--- + +# Block Quotes + +E-mail style: + +> This is a block quote. +> It is pretty short. + +> Code in a block quote: +> +> sub status { +> print "working"; +> } +> +> A list: +> +> 1. item one +> 2. item two +> +> Nested block quotes: +> +> > nested +> +>> nested +> + +This should not be a block quote: 2 +> 1. + +And a following paragraph. + +* * * * + +# Code Blocks + +Code: + + ---- (should be four hyphens) + + sub status { + print "working"; + } + + this code block is indented by one tab + +And: + + this code block is indented by two tabs + + These should not be escaped: \$ \\ \> \[ \{ + +___________ + +# Lists + +## Unordered + +Asterisks tight: + +* asterisk 1 +* asterisk 2 +* asterisk 3 + +Asterisks loose: + +* asterisk 1 + +* asterisk 2 + +* asterisk 3 + +Pluses tight: + ++ Plus 1 ++ Plus 2 ++ Plus 3 + +Pluses loose: + ++ Plus 1 + ++ Plus 2 + ++ Plus 3 + +Minuses tight: + +- Minus 1 +- Minus 2 +- Minus 3 + +Minuses loose: + +- Minus 1 + +- Minus 2 + +- Minus 3 + +## Ordered + +Tight: + +1. First +2. Second +3. Third + +and: + +1. One +2. Two +3. Three + +Loose using tabs: + +1. First + +2. Second + +3. Third + +and using spaces: + +1. One + +2. Two + +3. Three + +Multiple paragraphs: + +1. Item 1, graf one. + + Item 1. graf two. The quick brown fox jumped over the lazy dog's + back. + +2. Item 2. + +3. Item 3. + +## Nested + +* Tab + * Tab + * Tab + +Here's another: + +1. First +2. Second: + * Fee + * Fie + * Foe +3. Third + +Same thing but with paragraphs: + +1. First + +2. Second: + + * Fee + * Fie + * Foe + +3. Third + +## Tabs and spaces + ++ this is a list item + indented with tabs + ++ this is a list item + indented with spaces + + + this is an example list item + indented with tabs + + + this is an example list item + indented with spaces + +## Fancy list markers + +(2) begins with 2 +(3) and now 3 + + with a continuation + + iv. sublist with roman numerals, + starting with 4 + v. more items + (A) a subsublist + (B) a subsublist + +Nesting: + +A. Upper Alpha + I. Upper Roman. + (6) Decimal start with 6 + c) Lower alpha with paren + +Autonumbering: + + #. Autonumber. + #. More. + #. Nested. + +Should not be a list item: + +M.A. 2007 + +B. Williams + + * * * * * + +# Definition Lists + +Tight using spaces: + +apple +: red fruit + +orange +: orange fruit + +banana +: yellow fruit + +Tight using tabs: + +apple +: red fruit + +orange +: orange fruit + +banana +: yellow fruit + +Loose: + +apple + +: red fruit + +orange + +: orange fruit + +banana + +: yellow fruit + +Multiple blocks with italics: + +*apple* + +: red fruit + + contains seeds, + crisp, pleasant to taste + +*orange* + +: orange fruit + + { orange code block } + + > orange block quote + +Multiple definitions, tight: + +apple +: red fruit +: computer + +orange +: orange fruit +: bank + +Multiple definitions, loose: + +apple + +: red fruit + +: computer + +orange + +: orange fruit + +: bank + +Blank line after term, indented marker, alternate markers: + +apple + + ~ red fruit + + ~ computer + +orange + + ~ orange fruit + + 1. sublist + 2. sublist + +# HTML Blocks + +Simple block on one line: + +
    foo
    + +And nested without indentation: + +
    +
    +
    +foo +
    +
    +
    bar
    +
    + +Interpreted markdown in a table: + + + + + + +
    This is *emphasized*And this is **strong**
    + + + +Here's a simple block: + +
    +foo +
    + +This should be a code block, though: + +
    + foo +
    + +As should this: + +
    foo
    + +Now, nested: + +
    +
    +
    + foo +
    +
    +
    + +This should just be an HTML comment: + + + +Multiline: + + + + + +Code block: + + + +Just plain comment, with trailing spaces on the line: + + + +Code: + +
    + +Hr's: + +
    + +
    + +
    + +
    + +
    + +
    + +
    + +
    + +
    + +----- + +# Inline Markup + +This is *emphasized*, and so _is this_. + +This is **strong**, and so __is this__. + +An *[emphasized link](/url)*. + +***This is strong and em.*** + +So is ***this*** word. + +___This is strong and em.___ + +So is ___this___ word. + +This is code: `>`, `$`, `\`, `\$`, ``. + +~~This is *strikeout*.~~ + +Superscripts: a^bc^d a^*hello*^ a^hello\ there^. + +Subscripts: H~2~O, H~23~O, H~many\ of\ them~O. + +These should not be superscripts or subscripts, +because of the unescaped spaces: a^b c^d, a~b c~d. + +----- + +# Smart quotes, ellipses, dashes + +"Hello," said the spider. "'Shelob' is my name." + +'A', 'B', and 'C' are letters. + +'Oak,' 'elm,' and 'beech' are names of trees. +So is 'pine.' + +'He said, "I want to go."' Were you alive in the +70's? + +Here is some quoted '`code`' and a "[quoted link][1]". + +Some dashes: one---two --- three---four --- five. + +Dashes between numbers: 5--7, 255--66, 1987--1999. + +Ellipses...and...and.... + +----- + +# LaTeX + +- \cite[22-23]{smith.1899} +- $2+2=4$ +- $x \in y$ +- $\alpha \wedge \omega$ +- $223$ +- $p$-Tree +- Here's some display math: + $$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$$ +- Here's one that has a line break in it: $\alpha + \omega \times +x^2$. + +These shouldn't be math: + +- To get the famous equation, write `$e = mc^2$`. +- $22,000 is a *lot* of money. So is $34,000. + (It worked if "lot" is emphasized.) +- Shoes ($20) and socks ($5). +- Escaped `$`: $73 *this should be emphasized* 23\$. + +Here's a LaTeX table: + +\begin{tabular}{|l|l|}\hline +Animal & Number \\ \hline +Dog & 2 \\ +Cat & 1 \\ \hline +\end{tabular} + +* * * * * + +# Special Characters + +Here is some unicode: + +- I hat: Î +- o umlaut: ö +- section: § +- set membership: ∈ +- copyright: © + +AT&T has an ampersand in their name. + +AT&T is another way to write it. + +This & that. + +4 < 5. + +6 > 5. + +Backslash: \\ + +Backtick: \` + +Asterisk: \* + +Underscore: \_ + +Left brace: \{ + +Right brace: \} + +Left bracket: \[ + +Right bracket: \] + +Left paren: \( + +Right paren: \) + +Greater-than: \> + +Hash: \# + +Period: \. + +Bang: \! + +Plus: \+ + +Minus: \- + +- - - - - - - - - - - - - + +# Links + +## Explicit + +Just a [URL](/url/). + +[URL and title](/url/ "title"). + +[URL and title](/url/ "title preceded by two spaces"). + +[URL and title](/url/ "title preceded by a tab"). + +[URL and title](/url/ "title with "quotes" in it") + +[URL and title](/url/ 'title with single quotes') + +[with\_underscore](/url/with_underscore) + +[Email link](mailto:nobody@nowhere.net) + +[Empty](). + +## Reference + +Foo [bar][a]. + +[a]: /url/ + +With [embedded [brackets]][b]. + +[b] by itself should be a link. + +Indented [once][]. + +Indented [twice][]. + +Indented [thrice][]. + +This should [not][] be a link. + + [once]: /url + [twice]: /url + + [thrice]: /url + + [not]: /url + +[b]: /url/ + +Foo [bar][]. + +Foo [biz](/url/ "Title with "quote" inside"). + + [bar]: /url/ "Title with "quotes" inside" + +## With ampersands + +Here's a [link with an ampersand in the URL][1]. + +Here's a link with an amersand in the link text: [AT&T][2]. + +Here's an [inline link](/script?foo=1&bar=2). + +Here's an [inline link in pointy braces](). + +[1]: http://example.com/?foo=1&bar=2 +[2]: http://att.com/ "AT&T" + +## Autolinks + +With an ampersand: + +* In a list? +* +* It should. + +An e-mail address: + +> Blockquoted: + +Auto-links should not occur here: `` + + or here: + +---- + +# Images + +From "Voyage dans la Lune" by Georges Melies (1902): + +![lalune][] + + [lalune]: lalune.jpg "Voyage dans la Lune" + +Here is a movie ![movie](movie.jpg) icon. + +---- + +# Footnotes + +Here is a footnote reference,[^1] and another.[^longnote] +This should *not* be a footnote reference, because it +contains a space.[^my note] Here is an inline note.^[This +is *easier* to type. Inline notes may contain +[links](http://google.com) and `]` verbatim characters, +as well as [bracketed text].] + +> Notes can go in quotes.^[In quote.] + +1. And in list items.^[In list.] + +[^longnote]: Here's the long note. This one contains multiple +blocks. + + Subsequent blocks are indented to show that they belong to the +footnote (as with list items). + + { } + + If you want, you can indent every line, but you can also be + lazy and just indent the first line of each block. + +This paragraph should not be part of the note, as it is not indented. + + [^1]: Here is the footnote. It can go anywhere after the footnote + reference. It need not be placed at the end of the document. diff --git a/test/textile-reader.native b/test/textile-reader.native new file mode 100644 index 0000000..10bf2c8 --- /dev/null +++ b/test/textile-reader.native @@ -0,0 +1,180 @@ +Pandoc (Meta {unMeta = fromList []}) +[Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "set",Space,Str "of",Space,Str "tests",Space,Str "for",Space,Str "pandoc",Space,Str "Textile",Space,Str "Reader.",Space,Str "Part",Space,Str "of",Space,Str "it",Space,Str "comes",LineBreak,Str "from",Space,Str "John",Space,Str "Gruber\8217s",Space,Str "markdown",Space,Str "test",Space,Str "suite."] +,HorizontalRule +,Header 1 ("headers",[],[]) [Str "Headers"] +,Header 2 ("level-2-with-an-embeded-link",[],[]) [Str "Level",Space,Str "2",Space,Str "with",Space,Str "an",Space,Link ("",[],[]) [Str "embeded",Space,Str "link"] ("http://www.example.com","")] +,Header 3 ("level-3-with-emphasis",[],[]) [Str "Level",Space,Str "3",Space,Str "with",Space,Strong [Str "emphasis"]] +,Header 4 ("level-4",[],[]) [Str "Level",Space,Str "4"] +,Header 5 ("level-5",[],[]) [Str "Level",Space,Str "5"] +,Header 6 ("level-6",[],[]) [Str "Level",Space,Str "6"] +,Header 1 ("paragraphs",[],[]) [Str "Paragraphs"] +,Para [Str "Here\8217s",Space,Str "a",Space,Str "regular",Space,Str "paragraph."] +,Para [Str "Line",Space,Str "breaks",Space,Str "are",Space,Str "preserved",Space,Str "in",Space,Str "textile,",Space,Str "so",Space,Str "you",Space,Str "can",Space,Str "not",Space,Str "wrap",Space,Str "your",Space,Str "very",LineBreak,Str "long",Space,Str "paragraph",Space,Str "with",Space,Str "your",Space,Str "favourite",Space,Str "text",Space,Str "editor",Space,Str "and",Space,Str "have",Space,Str "it",Space,Str "rendered",LineBreak,Str "with",Space,Str "no",Space,Str "break."] +,Para [Str "Here\8217s",Space,Str "one",Space,Str "with",Space,Str "a",Space,Str "bullet."] +,BulletList + [[Plain [Str "criminey."]]] +,Para [Str "There",Space,Str "should",Space,Str "be",Space,Str "a",Space,Str "paragraph",Space,Str "break",Space,Str "between",Space,Str "here"] +,Para [Str "and",Space,Str "here."] +,Para [Str "pandoc",Space,Str "converts",Space,Str "textile."] +,Header 1 ("block-quotes",[],[]) [Str "Block",Space,Str "Quotes"] +,BlockQuote + [Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "famous",Space,Str "quote",Space,Str "from",Space,Str "somebody.",Space,Str "He",Space,Str "had",Space,Str "a",Space,Str "lot",Space,Str "of",Space,Str "things",Space,Str "to",LineBreak,Str "say,",Space,Str "so",Space,Str "the",Space,Str "text",Space,Str "is",Space,Str "really",Space,Str "really",Space,Str "long",Space,Str "and",Space,Str "spans",Space,Str "on",Space,Str "multiple",Space,Str "lines."]] +,Para [Str "And",Space,Str "a",Space,Str "following",Space,Str "paragraph."] +,Header 1 ("code-blocks",[],[]) [Str "Code",Space,Str "Blocks"] +,Para [Str "Code:"] +,CodeBlock ("",[],[]) " ---- (should be four hyphens)\n\n sub status {\n print \"working\";\n }\n\n this code block is indented by one tab" +,Para [Str "And:"] +,CodeBlock ("",[],[]) " this code block is indented by two tabs\n\n These should not be escaped: \\$ \\\\ \\> \\[ \\{" +,CodeBlock ("",[],[]) "Code block with .bc\n continued\n @",Str ",",Space,Code ("",[],[]) "@",Str "."] +,Header 1 ("notextile",[],[]) [Str "Notextile"] +,Para [Str "A",Space,Str "block",Space,Str "of",Space,Str "text",Space,Str "can",Space,Str "be",Space,Str "protected",Space,Str "with",Space,Str "notextile",Space,Str ":"] +,Para [Str "\nNo *bold* and\n* no bullet\n"] +,Para [Str "and",Space,Str "inlines",Space,Str "can",Space,Str "be",Space,Str "protected",Space,Str "with",Space,Str "double *equals (=)* markup."] +,Header 1 ("lists",[],[]) [Str "Lists"] +,Header 2 ("unordered",[],[]) [Str "Unordered"] +,Para [Str "Asterisks",Space,Str "tight:"] +,BulletList + [[Plain [Str "asterisk",Space,Str "1"]] + ,[Plain [Str "asterisk",Space,Str "2"]] + ,[Plain [Str "asterisk",Space,Str "3"]]] +,Para [Str "With",Space,Str "line",Space,Str "breaks:"] +,BulletList + [[Plain [Str "asterisk",Space,Str "1",LineBreak,Str "newline"]] + ,[Plain [Str "asterisk",Space,Str "2"]]] +,Header 2 ("ordered",[],[]) [Str "Ordered"] +,Para [Str "Tight:"] +,OrderedList (1,DefaultStyle,DefaultDelim) + [[Plain [Str "First"]] + ,[Plain [Str "Second"]] + ,[Plain [Str "Third"]]] +,Header 2 ("nested",[],[]) [Str "Nested"] +,BulletList + [[Plain [Str "ui",Space,Str "1"] + ,BulletList + [[Plain [Str "ui",Space,Str "1.1"] + ,OrderedList (1,DefaultStyle,DefaultDelim) + [[Plain [Str "oi",Space,Str "1.1.1"]] + ,[Plain [Str "oi",Space,Str "1.1.2"]]]] + ,[Plain [Str "ui",Space,Str "1.2"]]]] + ,[Plain [Str "ui",Space,Str "2"] + ,OrderedList (1,DefaultStyle,DefaultDelim) + [[Plain [Str "oi",Space,Str "2.1"] + ,BulletList + [[Plain [Str "ui",Space,Str "2.1.1"]] + ,[Plain [Str "ui",Space,Str "2.1.2"]]]]]]] +,Header 2 ("issue-1500",[],[]) [Str "Issue",Space,Str "#1500"] +,BulletList + [[Plain [Str "one"]] + ,[Plain [Str "two",LineBreak,Str "->",Space,Str "and",Space,Str "more"]]] +,Header 2 ("issue-1513",[],[]) [Str "Issue",Space,Str "#1513"] +,Para [Str "List:"] +,BulletList + [[Plain [Str "one"]] + ,[Plain [Str "two"]]] +,Header 2 ("definition-list",[],[]) [Str "Definition",Space,Str "List"] +,DefinitionList + [([Str "coffee"], + [[Plain [Str "Hot",Space,Str "and",Space,Str "black"]]]) + ,([Str "tea"], + [[Plain [Str "Also",Space,Str "hot,",Space,Str "but",Space,Str "a",Space,Str "little",Space,Str "less",Space,Str "black"]]]) + ,([Str "milk"], + [[Para [Str "Nourishing",Space,Str "beverage",Space,Str "for",Space,Str "baby",Space,Str "cows."] + ,Para [Str "Cold",Space,Str "drink",Space,Str "that",Space,Str "goes",Space,Str "great",Space,Str "with",Space,Str "cookies."]]]) + ,([Str "beer"], + [[Plain [Str "fresh",Space,Str "and",Space,Str "bitter"]]])] +,Header 1 ("inline-markup",[],[]) [Str "Inline",Space,Str "Markup"] +,Para [Str "This",Space,Str "is",Space,Emph [Str "emphasized"],Str ",",Space,Str "and",Space,Str "so",Space,Emph [Str "is",Space,Str "this"],Str ".",LineBreak,Str "This",Space,Str "is",Space,Strong [Str "strong"],Str ",",Space,Str "and",Space,Str "so",Space,Strong [Str "is",Space,Str "this"],Str ".",LineBreak,Str "This",Space,Str "is",Space,Span ("",["underline"],[]) [Str "inserted"],Str ",",Space,Str "and",Space,Str "this",Space,Str "is",Space,Strikeout [Str "deleted"],Str ".",LineBreak,Str "Hyphenated-words-are-ok,",Space,Str "as",Space,Str "well",Space,Str "as",Space,Str "strange_underscore_notation.",LineBreak,Str "A",Space,Link ("",[],[]) [Strong [Str "strong",Space,Str "link"]] ("http://www.foobar.com",""),Str "."] +,Para [Emph [Strong [Str "This",Space,Str "is",Space,Str "strong",Space,Str "and",Space,Str "em."]],LineBreak,Str "So",Space,Str "is",Space,Strong [Emph [Str "this"]],Space,Str "word",Space,Str "and",Space,Emph [Strong [Str "that",Space,Str "one"]],Str ".",LineBreak,Strikeout [Str "This",Space,Str "is",Space,Str "strikeout",Space,Str "and",Space,Strong [Str "strong"]]] +,Para [Str "Superscripts:",Space,Str "a",Superscript [Str "bc"],Str "d",Space,Str "a",Space,Superscript [Strong [Str "hello"]],Space,Str "a",Superscript [Str "hello",Space,Str "there"],Str ".",LineBreak,Str "Subscripts:",Space,Subscript [Str "here"],Space,Str "H",Space,Subscript [Str "2"],Str "O,",Space,Str "H",Space,Subscript [Str "23"],Str "O,",Space,Str "H",Space,Subscript [Str "many",Space,Str "of",Space,Str "them"],Str "O."] +,Para [Str "Dashes",Space,Str ":",Space,Str "How",Space,Str "cool",Space,Str "\8212",Space,Str "automatic",Space,Str "dashes."] +,Para [Str "Elipses",Space,Str ":",Space,Str "He",Space,Str "thought",Space,Str "and",Space,Str "thought",Space,Str "\8230",Space,Str "and",Space,Str "then",Space,Str "thought",Space,Str "some",Space,Str "more."] +,Para [Str "Quotes",Space,Str "and",Space,Str "apostrophes",Space,Str ":",Space,Quoted DoubleQuote [Str "I\8217d",Space,Str "like",Space,Str "to",Space,Str "thank",Space,Str "you"],Space,Str "for",Space,Str "example."] +,Header 1 ("links",[],[]) [Str "Links"] +,Header 2 ("explicit",[],[]) [Str "Explicit"] +,Para [Str "Just",Space,Str "a",Space,Link ("",[],[]) [Str "url"] ("http://www.url.com","")] +,Para [Link ("",[],[]) [Str "Email",Space,Str "link"] ("mailto:nobody@nowhere.net","")] +,Para [Quoted DoubleQuote [Str "not",Space,Str "a",Space,Str "link"],Str ":",Space,Str "foo"] +,Para [Str "Automatic",Space,Str "linking",Space,Str "to",Space,Link ("",[],[]) [Str "http://www.example.com"] ("http://www.example.com",""),Str "."] +,Para [Link ("",[],[]) [Str "Example"] ("http://www.example.com/",""),Str ":",Space,Str "Example",Space,Str "of",Space,Str "a",Space,Str "link",Space,Str "followed",Space,Str "by",Space,Str "a",Space,Str "colon."] +,Para [Str "A",Space,Str "link",Link ("",[],[]) [Str "with",Space,Str "brackets"] ("http://www.example.com",""),Str "and",Space,Str "no",Space,Str "spaces."] +,Header 1 ("tables",[],[]) [Str "Tables"] +,Para [Str "Textile",Space,Str "allows",Space,Str "tables",Space,Str "with",Space,Str "and",Space,Str "without",Space,Str "headers",Space,Str ":"] +,Header 2 ("without-headers",[],[]) [Str "Without",Space,Str "headers"] +,Table [] [AlignDefault,AlignDefault,AlignDefault] [0.0,0.0,0.0] + [[] + ,[] + ,[]] + [[[Plain [Str "name"]] + ,[Plain [Str "age"]] + ,[Plain [Str "sex"]]] + ,[[Plain [Str "joan"]] + ,[Plain [Str "24"]] + ,[Plain [Str "f"]]] + ,[[Plain [Str "archie"]] + ,[Plain [Str "29"]] + ,[Plain [Str "m"]]] + ,[[Plain [Str "bella"]] + ,[Plain [Str "45"]] + ,[Plain [Str "f"]]]] +,Para [Str "and",Space,Str "some",Space,Str "text",Space,Str "following",Space,Str "\8230"] +,Header 2 ("with-headers",[],[]) [Str "With",Space,Str "headers"] +,Table [] [AlignDefault,AlignDefault,AlignDefault] [0.0,0.0,0.0] + [[Plain [Str "name"]] + ,[Plain [Str "age"]] + ,[Plain [Str "sex"]]] + [[[Plain [Str "joan"]] + ,[Plain [Str "24"]] + ,[Plain [Str "f"]]] + ,[[Plain [Str "archie"]] + ,[Plain [Str "29"]] + ,[Plain [Str "m"]]] + ,[[Plain [Str "bella"]] + ,[Plain [Str "45"]] + ,[Plain [Str "f"]]]] +,Header 1 ("images",[],[]) [Str "Images"] +,Para [Str "Textile",Space,Str "inline",Space,Str "image",Space,Str "syntax,",Space,Str "like",LineBreak,Str "here",Space,Image ("",[],[]) [Str "this is the alt text"] ("this_is_an_image.png","this is the alt text"),LineBreak,Str "and",Space,Str "here",Space,Image ("",[],[]) [Str ""] ("this_is_an_image.png",""),Str "."] +,Header 1 ("attributes",[],[]) [Str "Attributes"] +,Header 2 ("ident",["bar","foo"],[("style","color:red;"),("lang","en")]) [Str "HTML",Space,Str "and",Space,Str "CSS",Space,Str "attributes",Space,Str "are",Space,Str "parsed",Space,Str "in",Space,Str "headers."] +,Header 2 ("centered",[],[("style","text-align:center;")]) [Str "Centered"] +,Header 2 ("right",[],[("style","text-align:right;")]) [Str "Right"] +,Header 2 ("justified",[],[("lang","en"),("style","color:blue;text-align:justify;")]) [Str "Justified"] +,Para [Str "as",Space,Str "well",Space,Str "as",Space,Strong [Span ("",["foo"],[]) [Str "inline",Space,Str "attributes"]],Space,Str "of",Space,Span ("",[],[("style","color:red;")]) [Str "all",Space,Str "kind"]] +,Para [Str "and",Space,Str "paragraph",Space,Str "attributes,",Space,Str "and",Space,Str "table",Space,Str "attributes."] +,Table [] [AlignDefault,AlignDefault,AlignDefault] [0.0,0.0,0.0] + [[] + ,[] + ,[]] + [[[Plain [Str "name"]] + ,[Plain [Str "age"]] + ,[Plain [Str "sex"]]] + ,[[Plain [Str "joan"]] + ,[Plain [Str "24"]] + ,[Plain [Str "f"]]]] +,Para [Emph [Str "(class#id)",Space,Str "emph"]] +,Para [Emph [Str "(no",Space,Str "class#id)",Space,Str "emph"]] +,Header 1 ("entities",[],[]) [Str "Entities"] +,Para [Str "*",LineBreak,Str "&"] +,Header 1 ("raw-html",[],[]) [Str "Raw",Space,Str "HTML"] +,Para [Str "However,",Space,RawInline (Format "html") "",Space,Str "raw",Space,Str "HTML",Space,Str "inlines",Space,RawInline (Format "html") "",Space,Str "are",Space,Str "accepted,",Space,Str "as",Space,Str "well",Space,Str "as",Space,Str ":"] +,RawBlock (Format "html") "
    " +,Para [Str "any",Space,Strong [Str "Raw",Space,Str "HTML",Space,Str "Block"],Space,Str "with",Space,Str "bold"] +,RawBlock (Format "html") "
    " +,Para [Str "Html",Space,Str "blocks",Space,Str "can"] +,RawBlock (Format "html") "
    " +,Para [Str "interrupt",Space,Str "paragraphs"] +,RawBlock (Format "html") "
    " +,Para [Str "as",Space,Str "well."] +,Para [Str "Can",Space,Str "you",Space,Str "prove",Space,Str "that",Space,Str "2",Space,Str "<",Space,Str "3",Space,Str "?"] +,Header 1 ("acronyms-and-marks",[],[]) [Str "Acronyms",Space,Str "and",Space,Str "marks"] +,Para [Str "PBS (Public Broadcasting System)"] +,Para [Str "Hi\8482"] +,Para [Str "Hi",Space,Str "\8482"] +,Para [Str "\174",Space,Str "Hi\174"] +,Para [Str "Hi\169\&2008",Space,Str "\169",Space,Str "2008"] +,Header 1 ("footnotes",[],[]) [Str "Footnotes"] +,Para [Str "A",Space,Str "note.",Note [Para [Str "The",Space,Str "note",LineBreak,Str "is",Space,Str "here!"]],Space,Str "Another",Space,Str "note",Note [Para [Str "Other",Space,Str "note."]],Str "."] +,Header 1 ("comment-blocks",[],[]) [Str "Comment",Space,Str "blocks"] +,Para [Str "not",Space,Str "a",Space,Str "comment."]] diff --git a/test/textile-reader.textile b/test/textile-reader.textile new file mode 100644 index 0000000..cca0b83 --- /dev/null +++ b/test/textile-reader.textile @@ -0,0 +1,279 @@ +This is a set of tests for pandoc Textile Reader. Part of it comes +from John Gruber's markdown test suite. + +----- + +h1. Headers + +h2. Level 2 with an "embeded link":http://www.example.com + +h3. Level 3 with *emphasis* + +h4. Level 4 + +h5. Level 5 + +h6. Level 6 + + +h1. Paragraphs + +Here's a regular paragraph. + +Line breaks are preserved in textile, so you can not wrap your very +long paragraph with your favourite text editor and have it rendered +with no break. + + +Here's one with a bullet. + +* criminey. + +There should be a paragraph break between here + +and here. + +pandoc converts textile. + +h1. Block Quotes + +bq. This is a famous quote from somebody. He had a lot of things to +say, so the text is really really long and spans on multiple lines. + +And a following paragraph. + +h1. Code Blocks + +Code: + +
    +    ---- (should be four hyphens)
    +
    +    sub status {
    +        print "working";
    +    }
    +
    +	this code block is indented by one tab
    +
    + +And: + +
    +		this code block is indented by two tabs
    +
    +    These should not be escaped:  \$ \\ \> \[ \{
    +
    + +bc. Code block with .bc + continued + @@, @. + +h1. Notextile + +A block of text can be protected with notextile : + + +No *bold* and +* no bullet + + +and inlines can be protected with ==double *equals (=)* markup==. + +h1. Lists + +h2. Unordered + +Asterisks tight: + +* asterisk 1 +* asterisk 2 +* asterisk 3 + +With line breaks: + +* asterisk 1 +newline +* asterisk 2 + +h2. Ordered + +Tight: + +# First +# Second +# Third + +h2. Nested + +* ui 1 +** ui 1.1 +### oi 1.1.1 +### oi 1.1.2 +** ui 1.2 +* ui 2 +## oi 2.1 +*** ui 2.1.1 +*** ui 2.1.2 + +h2. Issue #1500 + +* one +* two +-> and more + +h2. Issue #1513 + +List: +* one +* two + +h2. Definition List + +- coffee := Hot and black +- tea := Also hot, but a little less black +- milk := +Nourishing beverage for baby cows. + +Cold drink that goes great with cookies.=: +- beer := fresh and bitter + + +h1. Inline Markup + +This is _emphasized_, and so __is this__. +This is *strong*, and so **is this**. +This is +inserted+, and this is -deleted-. +Hyphenated-words-are-ok, as well as strange_underscore_notation. +A "*strong link*":http://www.foobar.com. + +_*This is strong and em.*_ +So is *_this_* word and __**that one**__. +-This is strikeout and *strong*- + +Superscripts: a[^bc^]d a ^*hello*^ a[^hello there^]. +Subscripts: ~here~ H[ ~2~]O, H[ ~23~]O, H[ ~many of them~]O. + +Dashes : How cool -- automatic dashes. + +Elipses : He thought and thought ... and then thought some more. + +Quotes and apostrophes : "I'd like to thank you" for example. + + +h1. Links + +h2. Explicit + +Just a "url":http://www.url.com + +"Email link":mailto:nobody@nowhere.net + +"not a link": foo + +Automatic linking to "$":http://www.example.com. + +"Example":http://www.example.com/: Example of a link followed by a colon. + +A link["with brackets":http://www.example.com]and no spaces. + +h1. Tables + +Textile allows tables with and without headers : + +h2. Without headers + +| name | age | sex | +| joan | 24 | f | +| archie | 29 | m | +| bella | 45 | f | + +and some text following ... + +h2. With headers + +|_. name |_. age |_. sex | +| joan | 24 | f | +| archie | 29 | m | +| bella | 45 | f | + + + +h1. Images + +Textile inline image syntax, like +here !this_is_an_image.png(this is the alt text)! +and here !this_is_an_image.png!. + +h1. Attributes + +h2[en]{color:red}(foo bar #ident). HTML and CSS attributes are parsed in headers. + +h2=. Centered + +h2>. Right + +h2<>{color:blue}[en]. Justified + +as well as *(foo)inline attributes* of %{color:red}all kind% + +p{color:green}. and paragraph attributes, and table attributes. + +table{foo:bar}. +| name | age | sex | +| joan | 24 | f | + +_(class#id) emph_ + +_(no class#id) emph_ + +h1. Entities + +* +& + +h1. Raw HTML + +However, raw HTML inlines are accepted, as well as : + +
    + any *Raw HTML Block* with bold +
    + +Html blocks can
    interrupt paragraphs
    as well. + +Can you prove that 2 < 3 ? + +h1. Acronyms and marks + +PBS(Public Broadcasting System) + +Hi(tm) + +Hi (TM) + +(r) Hi(r) + +Hi(c)2008 (C) 2008 + +h1. Footnotes + +A note.[1] Another note[2]. + +fn1. The note +is here! + +fn2. Other note. + +h1. Comment blocks + +###. my comment +is here. + +not a comment. diff --git a/test/tikiwiki-reader.native b/test/tikiwiki-reader.native new file mode 100644 index 0000000..2ab0532 --- /dev/null +++ b/test/tikiwiki-reader.native @@ -0,0 +1,130 @@ +Pandoc (Meta {unMeta = fromList []}) +[Header 1 ("header",[],[]) [Str "header"] +,Header 2 ("header-level-two",[],[]) [Str "header",Space,Str "level",Space,Str "two"] +,Header 3 ("header-level-3",[],[]) [Str "header",Space,Str "level",Space,Str "3"] +,Header 4 ("header-_level_-four",[],[]) [Str "header",Space,Str "_level_",Space,Str "four"] +,Header 5 ("header-level-5",[],[]) [Str "header",Space,Str "level",Space,Str "5"] +,Header 6 ("header-level-6",[],[]) [Str "header",Space,Str "level",Space,Str "6"] +,Para [Str "!!!!!!!",Space,Str "not",Space,Str "a",Space,Str "header"] +,Para [Str "--++",Space,Str "not",Space,Str "a",Space,Str "header"] +,Header 1 ("emph-and-strong",[],[]) [Str "emph",Space,Str "and",Space,Str "strong"] +,Para [Emph [Str "emph"],Space,Strong [Str "strong"]] +,Para [Emph [Strong [Str "strong",Space,Str "and",Space,Str "emph",Space,Str "1"]]] +,Para [Strong [Emph [Str "strong",Space,Str "and",Space,Str "emph",Space,Str "2"]]] +,Para [Strong [Emph [Str "emph",Space,Str "inside"],Space,Str "strong"]] +,Para [Strong [Str "strong",Space,Str "with",Space,Emph [Str "emph"]]] +,Para [Emph [Strong [Str "strong",Space,Str "inside"],Space,Str "emph"]] +,Header 1 ("horizontal-rule",[],[]) [Str "horizontal",Space,Str "rule"] +,Para [Str "top"] +,HorizontalRule +,Para [Str "bottom"] +,HorizontalRule +,Header 1 ("nop",[],[]) [Str "nop"] +,Para [Str "__not emph__"] +,Header 1 ("entities",[],[]) [Str "entities"] +,Para [Str "hi",Space,Str "&",Space,Str "low"] +,Para [Str "hi",Space,Str "&",Space,Str "low"] +,Para [Str "G\246del"] +,Para [Str "\777\2730"] +,Header 1 ("linebreaks",[],[]) [Str "linebreaks"] +,Para [Str "hi",LineBreak,Str "there"] +,Para [Str "hi",LineBreak,Str "there"] +,Header 1 ("inline-code",[],[]) [Str "inline",Space,Str "code"] +,Para [Code ("",[],[]) "*\8594*",Space,Code ("",[],[]) "typed",Space,Code ("",[],[]) ">>="] +,Header 1 ("code-blocks",[],[]) [Str "code",Space,Str "blocks"] +,CodeBlock ("",[],[]) "\ncase xs of\n (_:_) -> reverse xs\n [] -> ['*']\n" +,CodeBlock ("",["haskell"],[("colors","haskell"),("ln","0")]) "\ncase xs of\n (_:_) -> reverse xs\n [] -> ['*']\n" +,Header 1 ("external-links",[],[]) [Str "external",Space,Str "links"] +,Para [Link ("",[],[]) [Emph [Str "Google"],Space,Str "search",Space,Str "engine"] ("http://google.com","")] +,Para [Link ("",[],[]) [Str "http://pandoc.org"] ("http://pandoc.org","")] +,Para [Link ("",[],[]) [Str "http://google.com"] ("http://google.com",""),Space,Link ("",[],[]) [Str "http://yahoo.com"] ("http://yahoo.com","")] +,Para [Link ("",[],[]) [Str "email",Space,Str "me"] ("mailto:info@example.org","")] +,Para [Str "http://google.com"] +,Para [Str "info@example.org"] +,Header 1 ("lists",[],[]) [Str "lists"] +,BulletList + [[Plain [Str "Start",Space,Str "each",Space,Str "line",Space]] + ,[Plain [Str "with",Space,Str "an",Space,Str "asterisk",Space,Str "(*).",Space] + ,BulletList + [[Plain [Str "More",Space,Str "asterisks",Space,Str "gives",Space,Str "deeper",Space] + ,BulletList + [[Plain [Str "and",Space,Str "deeper",Space,Str "levels.",Space]]]]]] + ,[Plain [Str "Line",Space,Str "breaks",LineBreak,Str "don't",Space,Str "break",Space,Str "levels.",Space]] + ,[Plain [Str "Continuations",Space,Str "are",Space,Str "also",Space,Str "possible",Space] + ,BulletList + [[Plain [Str "and",Space,Str "do",Space,Str "not",Space,Str "break",Space,Str "the",Space,Str "list",Space,Str "flow",Space]]]] + ,[Plain [Str "Level",Space,Str "one",Space]]] +,Para [Str "Any",Space,Str "other",Space,Str "start",Space,Str "ends",Space,Str "the",Space,Str "list."] +,OrderedList (1,DefaultStyle,DefaultDelim) + [[Plain [Str "Start",Space,Str "each",Space,Str "line",Space]] + ,[Plain [Str "with",Space,Str "a",Space,Str "number",Space,Str "(1.).",Space] + ,OrderedList (1,DefaultStyle,DefaultDelim) + [[Plain [Str "More",Space,Str "number",Space,Str "signs",Space,Str "gives",Space,Str "deeper",Space] + ,OrderedList (1,DefaultStyle,DefaultDelim) + [[Plain [Str "and",Space,Str "deeper",Space]] + ,[Plain [Str "levels.",Space]]]]]] + ,[Plain [Str "Line",Space,Str "breaks",LineBreak,Str "don't",Space,Str "break",Space,Str "levels.",Space]] + ,[Plain [Str "Blank",Space,Str "lines",Space]]] +,OrderedList (1,DefaultStyle,DefaultDelim) + [[Plain [Str "end",Space,Str "the",Space,Str "list",Space,Str "and",Space,Str "start",Space,Str "another.",Space]]] +,Para [Str "Any",Space,Str "other",Space,Str "start",Space,Str "also",Space,Str "ends",Space,Str "the",Space,Str "list."] +,DefinitionList + [([Str "item",Space,Str "1"], + [[Plain [Str "definition",Space,Str "1",Space]]]) + ,([Str "item",Space,Str "2"], + [[Plain [Str "definition",Space,Str "2-1",Space,Str "definition",Space,Str "2-2",Space]]]) + ,([Str "item",Space,Emph [Str "3"]], + [[Plain [Str "definition",Space,Emph [Str "3"],Space]]])] +,OrderedList (1,DefaultStyle,DefaultDelim) + [[Plain [Str "one",Space]] + ,[Plain [Str "two",Space] + ,BulletList + [[Plain [Str "two",Space,Str "point",Space,Str "one",Space]] + ,[Plain [Str "two",Space,Str "point",Space,Str "two",Space]]]] + ,[Plain [Str "three",Space]] + ,[Plain [Str "four",Space]] + ,[Plain [Str "five",Space] + ,OrderedList (1,DefaultStyle,DefaultDelim) + [[Plain [Str "five",Space,Str "sub",Space,Str "1",Space] + ,OrderedList (1,DefaultStyle,DefaultDelim) + [[Plain [Str "five",Space,Str "sub",Space,Str "1",Space,Str "sub",Space,Str "1",Space]]]] + ,[Plain [Str "five",Space,Str "sub",Space,Str "2",Space]]]]] +,Header 1 ("tables",[],[]) [Str "tables"] +,Table [] [AlignDefault,AlignDefault] [0.0,0.0] + [[Plain [Str ""]] + ,[Plain [Str ""]]] + [[[Plain [Str "Orange"]] + ,[Plain [Str "Apple"]]] + ,[[Plain [Str "Bread"]] + ,[Plain [Str "Pie"]]] + ,[[Plain [Str "Butter"]] + ,[Plain [Str "Ice",Space,Str "cream"]]]] +,Table [] [AlignDefault,AlignDefault] [0.0,0.0] + [[Plain [Str ""]] + ,[Plain [Str ""]]] + [[[Plain [Str "Orange"]] + ,[Plain [Str "Apple"]]] + ,[[Plain [Str "Bread"]] + ,[Plain [Str "Pie"]]] + ,[[Plain [Strong [Str "Butter"]]] + ,[Plain [Str "Ice",Space,Str "cream"]]]] +,Table [] [AlignDefault,AlignDefault] [0.0,0.0] + [[Plain [Str ""]] + ,[Plain [Str ""]]] + [[[Plain [Str "Orange"]] + ,[Plain [Str "Apple"]]] + ,[[Plain [Str "Bread",LineBreak,LineBreak,Str "and",Space,Str "cheese"]] + ,[Plain [Str "Pie",LineBreak,LineBreak,Strong [Str "apple"],Space,Str "and",Space,Emph [Str "carrot"],Space]]]] +,Table [] [AlignDefault,AlignDefault,AlignDefault] [0.0,0.0,0.0] + [[Plain [Str ""]] + ,[Plain [Str ""]] + ,[Plain [Str ""]]] + [[[Plain [Space,Str "Orange",Space]] + ,[Plain [Space,Str "Apple",Space]] + ,[Plain [Space,Str "more"]]] + ,[[Plain [Space,Str "Bread",Space]] + ,[Plain [Space,Str "Pie",Space]] + ,[Plain [Space,Str "more"]]] + ,[[Plain [Space,Str "Butter",Space]] + ,[Plain [Space,Str "Ice",Space,Str "cream",Space]] + ,[Plain [Space,Str "and",Space,Str "more",Space]]]]] diff --git a/test/tikiwiki-reader.tikiwiki b/test/tikiwiki-reader.tikiwiki new file mode 100644 index 0000000..d1971fe --- /dev/null +++ b/test/tikiwiki-reader.tikiwiki @@ -0,0 +1,148 @@ +! header + +!! header level two + +!!! header level 3 + +!!!! header _level_ four + +!!!!! header level 5 + +!!!!!! header level 6 + +!!!!!!! not a header + + --++ not a header + +! emph and strong + +''emph'' __strong__ + +''__strong and emph 1__'' + +__''strong and emph 2''__ + +__''emph inside'' strong__ + +__strong with ''emph''__ + +''__strong inside__ emph'' + +! horizontal rule + +top +---- +bottom + +---- + +! nop + +~np~__not emph__~/np~ + +! entities + +hi & low + +hi & low + +Gödel + +̉પ + +! linebreaks + +hi%%%there + +hi%%% +there + +! inline code + +-+*→*+- -+typed+- -+>>=+- + +! code blocks + +{CODE()} +case xs of + (_:_) -> reverse xs + [] -> ['*'] +{CODE} + +{CODE(colors="haskell" ln=0)} +case xs of + (_:_) -> reverse xs + [] -> ['*'] +{CODE} + +! external links + +[http://google.com|''Google'' search engine] + +[http://pandoc.org] + +[http://google.com] [http://yahoo.com] + +[mailto:info@example.org|email me] + +http://google.com + +info@example.org + +! lists + +* Start each line +* with an asterisk (*). +** More asterisks gives deeper +*** and deeper levels. +* Line breaks%%%don't break levels. +* Continuations ++ are also possible +** and do not break the list flow +* Level one +Any other start ends the list. + +# Start each line +# with a number (1.). +## More number signs gives deeper +### and deeper +### levels. +# Line breaks%%%don't break levels. +# Blank lines + +# end the list and start another. +Any other start also +ends the list. + +;item 1: definition 1 +;item 2: definition 2-1 ++ definition 2-2 +;item ''3'': definition ''3'' + +# one +# two +** two point one +** two point two +# three +# four +# five +## five sub 1 +### five sub 1 sub 1 +## five sub 2 + +! tables + +||Orange|Apple +Bread|Pie +Butter|Ice cream|| + +||Orange|Apple +Bread|Pie +__Butter__|Ice cream|| + +||Orange|Apple +Bread%%%%%%and cheese|Pie%%%%%%__apple__ and ''carrot'' || + +|| Orange | Apple | more + Bread | Pie | more + Butter | Ice cream | and more || diff --git a/test/twiki-reader.native b/test/twiki-reader.native new file mode 100644 index 0000000..1447dcc --- /dev/null +++ b/test/twiki-reader.native @@ -0,0 +1,174 @@ +Pandoc (Meta {unMeta = fromList []}) +[Header 1 ("header",[],[]) [Str "header"] +,Header 2 ("header-level-two",[],[]) [Str "header",Space,Str "level",Space,Str "two"] +,Header 3 ("header-level-3",[],[]) [Str "header",Space,Str "level",Space,Str "3"] +,Header 4 ("header-level-four",[],[]) [Str "header",Space,Emph [Str "level"],Space,Str "four"] +,Header 5 ("header-level-5",[],[]) [Str "header",Space,Str "level",Space,Str "5"] +,Header 6 ("header-level-6",[],[]) [Str "header",Space,Str "level",Space,Str "6"] +,Para [Str "---+++++++",Space,Str "not",Space,Str "a",Space,Str "header"] +,Para [Str "--++",Space,Str "not",Space,Str "a",Space,Str "header"] +,Header 1 ("emph-and-strong",[],[]) [Str "emph",Space,Str "and",Space,Str "strong"] +,Para [Emph [Str "emph"],Space,Strong [Str "strong"]] +,Para [Emph [Strong [Str "strong",Space,Str "and",Space,Str "emph"]]] +,Para [Strong [Emph [Str "emph",Space,Str "inside"],Space,Str "strong"]] +,Para [Strong [Str "strong",Space,Str "with",Space,Emph [Str "emph"]]] +,Para [Emph [Strong [Str "strong",Space,Str "inside"],Space,Str "emph"]] +,Header 1 ("horizontal-rule",[],[]) [Str "horizontal",Space,Str "rule"] +,Para [Str "top"] +,HorizontalRule +,Para [Str "bottom"] +,HorizontalRule +,Header 1 ("nop",[],[]) [Str "nop"] +,Para [Str "_not",Space,Str "emph_"] +,Header 1 ("entities",[],[]) [Str "entities"] +,Para [Str "hi",Space,Str "&",Space,Str "low"] +,Para [Str "hi",Space,Str "&",Space,Str "low"] +,Para [Str "G\246del"] +,Para [Str "\777\2730"] +,Header 1 ("comments",[],[]) [Str "comments"] +,Para [Str "inline",Space,Str "comment"] +,Para [Str "between",Space,Str "blocks"] +,Header 1 ("linebreaks",[],[]) [Str "linebreaks"] +,Para [Str "hi",LineBreak,Str "there"] +,Para [Str "hi",LineBreak,Str "there"] +,Header 1 ("inline-code",[],[]) [Str "inline",Space,Str "code"] +,Para [Code ("",[],[]) "*\8594*",Space,Code ("",[],[]) "typed",Space,Code ("",["haskell"],[]) ">>="] +,Header 1 ("code-blocks",[],[]) [Str "code",Space,Str "blocks"] +,CodeBlock ("",[],[]) "case xs of\n (_:_) -> reverse xs\n [] -> ['*']" +,CodeBlock ("",["haskell"],[]) "case xs of\n (_:_) -> reverse xs\n [] -> ['*']" +,Header 1 ("block-quotes",[],[]) [Str "block",Space,Str "quotes"] +,Para [Str "Regular",Space,Str "paragraph"] +,BlockQuote + [Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "block",Space,Str "quote."] + ,Para [Str "With",Space,Str "two",Space,Str "paragraphs."]] +,Para [Str "Nother",Space,Str "paragraph."] +,Header 1 ("external-links",[],[]) [Str "external",Space,Str "links"] +,Para [Link ("",[],[]) [Emph [Str "Google"],Space,Str "search",Space,Str "engine"] ("http://google.com","")] +,Para [Link ("",[],[]) [Str "http://pandoc.org"] ("http://pandoc.org","")] +,Para [Link ("",[],[]) [Str "http://google.com"] ("http://google.com",""),Space,Link ("",[],[]) [Str "http://yahoo.com"] ("http://yahoo.com","")] +,Para [Link ("",[],[]) [Str "email",Space,Str "me"] ("mailto:info@example.org","")] +,Para [Str "http://google.com"] +,Para [Str "http://google.com"] +,Para [Str "http://google.com"] +,Para [Str "info@example.org"] +,Para [Str "info@example.org"] +,Para [Str "info@example.org"] +,Header 1 ("lists",[],[]) [Str "lists"] +,BulletList + [[Plain [Str "Start",Space,Str "each",Space,Str "line"]] + ,[Plain [Str "with",Space,Str "an",Space,Str "asterisk",Space,Str "(*)."] + ,BulletList + [[Plain [Str "More",Space,Str "asterisks",Space,Str "gives",Space,Str "deeper"] + ,BulletList + [[Plain [Str "and",Space,Str "deeper",Space,Str "levels."]]]]]] + ,[Plain [Str "Line",Space,Str "breaks",LineBreak,Str "don't",Space,Str "break",Space,Str "levels."]] + ,[Plain [Str "Continuations",Space,Str "are",Space,Str "also",Space,Str "possible"] + ,BulletList + [[Plain [Str "and",Space,Str "do",Space,Str "not",Space,Str "break",Space,Str "the",Space,Str "list",Space,Str "flow"]]]] + ,[Plain [Str "Level",Space,Str "one"]]] +,Para [Str "Any",Space,Str "other",Space,Str "start",Space,Str "ends",Space,Str "the",Space,Str "list."] +,OrderedList (1,DefaultStyle,DefaultDelim) + [[Plain [Str "Start",Space,Str "each",Space,Str "line"]] + ,[Plain [Str "with",Space,Str "a",Space,Str "number",Space,Str "(1.)."] + ,OrderedList (1,DefaultStyle,DefaultDelim) + [[Plain [Str "More",Space,Str "number",Space,Str "signs",Space,Str "gives",Space,Str "deeper"] + ,OrderedList (1,DefaultStyle,DefaultDelim) + [[Plain [Str "and",Space,Str "deeper"]] + ,[Plain [Str "levels."]]]]]] + ,[Plain [Str "Line",Space,Str "breaks",LineBreak,Str "don't",Space,Str "break",Space,Str "levels."]] + ,[Plain [Str "Blank",Space,Str "lines"]]] +,OrderedList (1,DefaultStyle,DefaultDelim) + [[Plain [Str "end",Space,Str "the",Space,Str "list",Space,Str "and",Space,Str "start",Space,Str "another."]]] +,Para [Str "Any",Space,Str "other",Space,Str "start",Space,Str "also",Space,Str "ends",Space,Str "the",Space,Str "list."] +,DefinitionList + [([Str "item",Space,Str "1"], + [[Plain [Str "definition",Space,Str "1"]]]) + ,([Str "item",Space,Str "2"], + [[Plain [Str "definition",Space,Str "2-1",Space,Str "definition",Space,Str "2-2"]]]) + ,([Str "item",Space,Emph [Str "3"]], + [[Plain [Str "definition",Space,Emph [Str "3"]]]])] +,OrderedList (1,DefaultStyle,DefaultDelim) + [[Plain [Str "one"]] + ,[Plain [Str "two"] + ,BulletList + [[Plain [Str "two",Space,Str "point",Space,Str "one"]] + ,[Plain [Str "two",Space,Str "point",Space,Str "two"]]]] + ,[Plain [Str "three"] + ,DefinitionList + [([Str "three",Space,Str "item",Space,Str "one"], + [[Plain [Str "three",Space,Str "def",Space,Str "one"]]])]] + ,[Plain [Str "four"] + ,DefinitionList + [([Str "four",Space,Str "def",Space,Str "one"], + [[Plain [Str "this",Space,Str "is",Space,Str "a",Space,Str "continuation"]]])]] + ,[Plain [Str "five"] + ,OrderedList (1,DefaultStyle,DefaultDelim) + [[Plain [Str "five",Space,Str "sub",Space,Str "1"] + ,OrderedList (1,DefaultStyle,DefaultDelim) + [[Plain [Str "five",Space,Str "sub",Space,Str "1",Space,Str "sub",Space,Str "1"]]]] + ,[Plain [Str "five",Space,Str "sub",Space,Str "2"]]]]] +,OrderedList (1,DefaultStyle,DefaultDelim) + [[Plain [Str "other"] + ,OrderedList (1,UpperRoman,DefaultDelim) + [[Plain [Str "list"]] + ,[Plain [Str "styles"]]]] + ,[Plain [Str "are"] + ,OrderedList (1,LowerRoman,DefaultDelim) + [[Plain [Str "also"]] + ,[Plain [Str "possible"]]]] + ,[Plain [Str "all"] + ,OrderedList (1,LowerAlpha,DefaultDelim) + [[Plain [Str "the"]] + ,[Plain [Str "different"]] + ,[Plain [Str "styles"]]]] + ,[Plain [Str "are"] + ,OrderedList (1,UpperAlpha,DefaultDelim) + [[Plain [Str "implemented"]] + ,[Plain [Str "and"]] + ,[Plain [Str "supported"]]]]] +,Header 1 ("tables",[],[]) [Str "tables"] +,Table [] [AlignDefault,AlignDefault] [0.0,0.0] + [[] + ,[]] + [[[Plain [Str "Orange"]] + ,[Plain [Str "Apple"]]] + ,[[Plain [Str "Bread"]] + ,[Plain [Str "Pie"]]] + ,[[Plain [Str "Butter"]] + ,[Plain [Str "Ice",Space,Str "cream"]]]] +,Table [] [AlignLeft,AlignLeft] [0.0,0.0] + [[Plain [Str "Orange"]] + ,[Plain [Str "Apple"]]] + [[[Plain [Str "Bread"]] + ,[Plain [Str "Pie"]]] + ,[[Plain [Strong [Str "Butter"]]] + ,[Plain [Str "Ice",Space,Str "cream"]]]] +,Table [] [AlignLeft,AlignLeft] [0.0,0.0] + [[Plain [Str "Orange"]] + ,[Plain [Str "Apple"]]] + [[[Plain [Str "Bread",LineBreak,LineBreak,Str "and",Space,Str "cheese"]] + ,[Plain [Str "Pie",LineBreak,LineBreak,Strong [Str "apple"],Space,Str "and",Space,Emph [Str "carrot"]]]]] +,Table [] [AlignDefault,AlignDefault,AlignDefault] [0.0,0.0,0.0] + [[] + ,[] + ,[]] + [[[Plain [Str "Orange"]] + ,[Plain [Str "Apple"]] + ,[Plain [Str "more"]]] + ,[[Plain [Str "Bread"]] + ,[Plain [Str "Pie"]] + ,[Plain [Str "more"]]] + ,[[Plain [Str "Butter"]] + ,[Plain [Str "Ice",Space,Str "cream"]] + ,[Plain [Str "and",Space,Str "more"]]]] +,Header 1 ("macros",[],[]) [Str "macros"] +,Para [Span ("",["twiki-macro","TEST"],[]) []] +,Para [Span ("",["twiki-macro","TEST"],[]) [Str ""]] +,Para [Span ("",["twiki-macro","TEST"],[]) [Str "content with spaces"]] +,Para [Span ("",["twiki-macro","TEST"],[]) [Str "content with spaces"]] +,Para [Span ("",["twiki-macro","TEST"],[("ARG1","test")]) [Str "content with spaces"]] +,Para [Span ("",["twiki-macro","TEST"],[]) [Str "content with spaces ARG1=test"]] +,Para [Span ("",["twiki-macro","TEST"],[("ARG1","test")]) [Str "content with spaces"]] +,Para [Span ("",["twiki-macro","TEST"],[("ARG1","test"),("ARG2","test2")]) [Str ""]] +,Para [Span ("",["twiki-macro","TEST"],[("ARG1","test"),("ARG2","test2")]) [Str ""]] +,Para [Span ("",["twiki-macro","TEST"],[("ARG1","test"),("ARG2","test2")]) [Str "multiline\ndoes also work"]]] diff --git a/test/twiki-reader.twiki b/test/twiki-reader.twiki new file mode 100644 index 0000000..c2df105 --- /dev/null +++ b/test/twiki-reader.twiki @@ -0,0 +1,221 @@ +---+ header + +---++ header level two + +---+++ header level 3 + +---++++ header _level_ four + +---+++++ header level 5 + +---++++++ header level 6 + +---+++++++ not a header + + --++ not a header + +---+ emph and strong + +_emph_ *strong* + +__strong and emph__ + +*emph inside strong* + +*strong with emph* + +_strong inside emph_ + +---+ horizontal rule + +top +--- +bottom + +--- + +---+ nop + +_not emph_ + +---+ entities + +hi & low + +hi & low + +Gödel + +̉પ + +---+ comments + +inline comment + + + +between blocks + + + +---+ linebreaks + +hi%BR%there + +hi%BR% +there + +---+ inline code + +*→* =typed= >>= + +---+ code blocks + + +case xs of + (_:_) -> reverse xs + [] -> ['*'] + + + +case xs of + (_:_) -> reverse xs + [] -> ['*'] + + +---+ block quotes + +Regular paragraph +
    +This is a block quote. + +With two paragraphs. +
    +Nother paragraph. + +---+ external links + +[[http://google.com][Google search engine]] + +http://pandoc.org + +[[http://google.com]] [[http://yahoo.com]] + +[[mailto:info@example.org][email me]] + +!http://google.com + +http://google.com + + +http://google.com + + +!info@example.org + +info@example.org + + +info@example.org + + +---+ lists + + * Start each line + * with an asterisk (*). + * More asterisks gives deeper + * and deeper levels. + * Line breaks%BR%don't break levels. + * Continuations + are also possible + * and do not break the list flow + * Level one +Any other start ends the list. + + 1. Start each line + 1. with a number (1.). + 1. More number signs gives deeper + 1. and deeper + 1. levels. + 1. Line breaks%BR%don't break levels. + 1. Blank lines + + 1. end the list and start another. +Any other start also +ends the list. + + $ item 1: definition 1 + $ item 2: definition 2-1 + definition 2-2 + $ item _3_: definition _3_ + + 1. one + 1. two + * two point one + * two point two + 1. three + $ three item one: three def one + 1. four + $ four def one: this + is a continuation + 1. five + 1. five sub 1 + 1. five sub 1 sub 1 + 1. five sub 2 + + 1. other + I. list + I. styles + 1. are + i. also + i. possible + 1. all + a. the + a. different + a. styles + 1. are + A. implemented + A. and + A. supported + +---+ tables + +|Orange|Apple| +|Bread|Pie| +|Butter|Ice cream| + +|*Orange*|*Apple*| +|Bread|Pie| +|*Butter*|Ice cream| + +|*Orange*|*Apple*| +|Bread%BR%%BR%and cheese|Pie%BR%%BR%*apple* and carrot| + +| Orange | Apple | more | +| Bread | Pie | more | +| Butter | Ice cream | and more | + +---+ macros + +%TEST% + +%TEST{}% + +%TEST{content with spaces}% + +%TEST{"content with spaces"}% + +%TEST{"content with spaces" ARG1="test"}% + +%TEST{content with spaces ARG1=test}% + +%TEST{ARG1=test content with spaces}% + +%TEST{ARG1=test ARG2=test2}% + +%TEST{ARG1="test" ARG2="test2"}% + +%TEST{ARG1="test" +ARG2="test2" +multiline +does also work}% diff --git a/test/txt2tags.native b/test/txt2tags.native new file mode 100644 index 0000000..f5134b8 --- /dev/null +++ b/test/txt2tags.native @@ -0,0 +1,611 @@ +Pandoc (Meta {unMeta = fromList [("author",MetaList [MetaInlines [Str "author"]]),("date",MetaInlines [Str "date"]),("includeconf",MetaString "rules.conf"),("title",MetaInlines [Str "Txt2tags",Space,Str "Markup",Space,Str "Rules"])]}) +[Para [Str "This",Space,Str "document",Space,Str "describes",Space,Str "all",Space,Str "the",Space,Str "details",Space,Str "about",Space,Str "each",Space,Str "txt2tags",Space,Str "mark.",SoftBreak,Str "The",Space,Str "target",Space,Str "audience",Space,Str "are",Space,Strong [Str "experienced"],Space,Str "users.",Space,Str "You",Space,Str "may",Space,Str "find",Space,Str "it",SoftBreak,Str "useful",Space,Str "if",Space,Str "you",Space,Str "want",Space,Str "to",Space,Str "master",Space,Str "the",Space,Str "marks",Space,Str "or",Space,Str "solve",Space,Str "a",Space,Str "specific",Space,Str "problem",SoftBreak,Str "about",Space,Str "a",Space,Str "mark."] +,Para [Str "If",Space,Str "you",Space,Str "are",Space,Str "new",Space,Str "to",Space,Str "txt2tags",Space,Str "or",Space,Str "just",Space,Str "want",Space,Str "to",Space,Str "know",Space,Str "which",Space,Str "are",Space,Str "the",SoftBreak,Str "available",Space,Str "marks,",Space,Str "please",Space,Str "read",Space,Str "the",Space,Link ("",[],[]) [Str "Markup",Space,Str "Demo"] ("MARKUPDEMO",""),Str "."] +,Para [Str "Note",Space,Str "1:",Space,Str "This",Space,Str "document",Space,Str "is",Space,Str "generated",Space,Str "directly",Space,Str "from",Space,Str "the",Space,Str "txt2tags",SoftBreak,Str "test-suite.",Space,Str "All",Space,Str "the",Space,Str "rules",Space,Str "mentioned",Space,Str "here",Space,Str "are",Space,Str "100%",Space,Str "in",Space,Str "sync",Space,Str "with",Space,Str "the",SoftBreak,Str "current",Space,Str "program",Space,Str "code."] +,Para [Str "Note",Space,Str "2:",Space,Str "A",Space,Str "good",Space,Str "practice",Space,Str "is",Space,Str "to",Space,Str "consult",Space,Link ("",[],[]) [Str "the",Space,Str "sources"] ("rules.t2t",""),Space,Str "when",SoftBreak,Str "reading,",Space,Str "to",Space,Str "see",Space,Str "how",Space,Str "the",Space,Str "texts",Space,Str "were",Space,Str "made."] +,Para [Str "Table",Space,Str "of",Space,Str "Contents:"] +,HorizontalRule +,Header 1 ("paragraph",[],[]) [Str "Paragraph"] +,Para [Str "A",Space,Str "paragraph",Space,Str "is",Space,Str "composed",Space,Str "by",Space,Str "one",Space,Str "or",Space,Str "more",Space,Str "lines.",SoftBreak,Str "A",Space,Str "blank",Space,Str "line",Space,Str "(or",Space,Str "a",Space,Str "table,",Space,Str "or",Space,Str "a",Space,Str "list)",Space,Str "ends",Space,Str "the",SoftBreak,Str "current",Space,Str "paragraph."] +,Para [Str "Leading",Space,Str "and",Space,Str "trailing",Space,Str "spaces",Space,Str "are",Space,Str "ignored."] +,Para [Str "A",Space,Str "comment",Space,Str "line",Space,Str "can",Space,Str "be",Space,Str "placed",Space,Str "inside",Space,Str "a",Space,Str "paragraph.",SoftBreak,Str "It",Space,Str "will",Space,Str "not",Space,Str "affect",Space,Str "it."] +,Para [Str "The",Space,Str "end",Space,Str "of",Space,Str "the",Space,Str "file",Space,Str "(EOF)",Space,Str "closes",Space,Str "the",SoftBreak,Str "currently",Space,Str "open",Space,Str "paragraph."] +,Header 1 ("comment",[],[]) [Str "Comment"] +,Para [Str "%",Space,Str "not",Space,Str "on",Space,Str "the",Space,Str "line",Space,Str "beginning",Space,Str "(at",Space,Str "column",Space,Str "2)"] +,Para [Str "some",Space,Str "text",Space,Str "%",Space,Str "half",Space,Str "line",Space,Str "comments",Space,Str "are",Space,Str "not",Space,Str "allowed"] +,Header 1 ("line",[],[]) [Str "Line"] +,HorizontalRule +,HorizontalRule +,HorizontalRule +,HorizontalRule +,HorizontalRule +,HorizontalRule +,HorizontalRule +,HorizontalRule +,HorizontalRule +,HorizontalRule +,HorizontalRule +,Para [Strikeout [Str "-----"],SoftBreak,Strikeout [Str "-------",Space,Str "--------"]] +,Para [Strikeout [Str "-------+--------"]] +,Para [Str "(",Space,Strikeout [Str "----------------"],Space,Str ")"] +,Header 1 ("inline",[],[]) [Str "Inline"] +,Para [Str "i)",Space,Strong [Str "b"],Space,Emph [Str "i"],Space,Span ("",["underline"],[]) [Str "u"],Space,Strikeout [Str "s"],Space,Code ("",[],[]) "m",Space,Str "r",Space,RawInline (Format "html") "t",SoftBreak,Str "i)",Space,Strong [Str "bo"],Space,Emph [Str "it"],Space,Span ("",["underline"],[]) [Str "un"],Space,Strikeout [Str "st"],Space,Code ("",[],[]) "mo",Space,Str "ra",Space,RawInline (Format "html") "tg",SoftBreak,Str "i)",Space,Strong [Str "bold"],Space,Emph [Str "ital"],Space,Span ("",["underline"],[]) [Str "undr"],Space,Strikeout [Str "strk"],Space,Code ("",[],[]) "mono",Space,Str "raw",Space,RawInline (Format "html") "tggd",SoftBreak,Str "i)",Space,Strong [Str "bo",Space,Str "ld"],Space,Emph [Str "it",Space,Str "al"],Space,Span ("",["underline"],[]) [Str "un",Space,Str "dr"],Space,Strikeout [Str "st",Space,Str "rk"],Space,Code ("",[],[]) "mo no",Space,Str "r",Space,Str "aw",Space,RawInline (Format "html") "tg gd",SoftBreak,Str "i)",Space,Strong [Str "bo",Space,Str "*",Space,Str "ld"],Space,Emph [Str "it",Space,Str "/",Space,Str "al"],Space,Span ("",["underline"],[]) [Str "un",Space,Str "_",Space,Str "dr"],Space,Strikeout [Str "st",Space,Str "-",Space,Str "rk"],Space,Code ("",[],[]) "mo ` no",Space,Str "r",Space,Str "\"",Space,Str "aw",Space,RawInline (Format "html") "tg ' gd",SoftBreak,Str "i)",Space,Strong [Str "bo",Space,Str "**ld"],Space,Emph [Str "it",Space,Str "//al"],Space,Span ("",["underline"],[]) [Str "un",Space,Str "__dr"],Space,Strikeout [Str "st",Space,Str "--rk"],Space,Code ("",[],[]) "mo ``no",Space,Str "r",Space,Str "\"\"aw",Space,RawInline (Format "html") "tg ''gd",SoftBreak,Str "i)",Space,Strong [Str "bo",Space,Str "**",Space,Str "ld"],Space,Emph [Str "it",Space,Str "//",Space,Str "al"],Space,Span ("",["underline"],[]) [Str "un",Space,Str "__",Space,Str "dr"],Space,Strikeout [Str "st",Space,Str "--",Space,Str "rk"],Space,Code ("",[],[]) "mo `` no",Space,Str "r",Space,Str "\"\"",Space,Str "aw",Space,RawInline (Format "html") "tg '' gd",SoftBreak,Str "i)",Space,Strong [Str "**bold**"],Space,Emph [Str "//ital//"],Space,Span ("",["underline"],[]) [Str "__undr__"],Space,Strikeout [Str "--strk--"],Space,Code ("",[],[]) "``mono``",Space,Str "\"\"raw\"\"",Space,RawInline (Format "html") "''tggd''",SoftBreak,Str "i)",Space,Strong [Str "*bold*"],Space,Emph [Str "/ital/"],Space,Span ("",["underline"],[]) [Str "_undr_"],Space,Strikeout [Str "-strk-"],Space,Code ("",[],[]) "`mono`",Space,Str "\"raw\"",Space,RawInline (Format "html") "'tggd'"] +,Para [Str "i)",Space,Strong [Str "*"],Space,Emph [Str "/"],Space,Span ("",["underline"],[]) [Str "_"],Space,Strikeout [Str "-"],Space,Code ("",[],[]) "`",Space,Str "\"",Space,RawInline (Format "html") "'",SoftBreak,Str "i)",Space,Strong [Str "**"],Space,Emph [Str "//"],Space,Span ("",["underline"],[]) [Str "__"],Space,Strikeout [Str "--"],Space,Code ("",[],[]) "``",Space,Str "\"\"",Space,RawInline (Format "html") "''",SoftBreak,Str "i)",Space,Strong [Str "***"],Space,Emph [Str "///"],Space,Span ("",["underline"],[]) [Str "___"],Space,Strikeout [Str "---"],Space,Code ("",[],[]) "```",Space,Str "\"\"\"",Space,RawInline (Format "html") "'''",SoftBreak,Str "i)",Space,Strong [Str "****"],Space,Emph [Str "////"],Space,Span ("",["underline"],[]) [Str "____"],Space,Strikeout [Str "----"],Space,Code ("",[],[]) "````",Space,Str "\"\"\"\"",Space,RawInline (Format "html") "''''",SoftBreak,Str "i)",Space,Strong [Str "*****"],Space,Emph [Str "/////"],Space,Span ("",["underline"],[]) [Str "_____"],Space,Strikeout [Str "-----"],Space,Code ("",[],[]) "`````",Space,Str "\"\"\"\"\"",Space,RawInline (Format "html") "'''''",SoftBreak,Str "i)",Space,Strong [Str "******"],Space,Emph [Str "//////"],Space,Span ("",["underline"],[]) [Str "______"],Space,Strikeout [Str "------"],Space,Code ("",[],[]) "``````",Space,Str "\"\"\"\"\"\"",Space,RawInline (Format "html") "''''''"] +,Para [Str "i)",Space,Str "****",Space,Str "////",Space,Str "____",Space,Str "----",Space,Str "````",Space,Str "\"\"\"\"",Space,Str "''''",SoftBreak,Str "i)",Space,Str "**",Space,Str "**",Space,Str "//",Space,Str "//",Space,Str "__",Space,Str "__",Space,Str "--",Space,Str "--",Space,Str "``",Space,Str "``",Space,Str "\"\"",Space,Str "\"\"",Space,Str "''",Space,Str "''"] +,Para [Str "i)",Space,Str "**",Space,Str "bold**",Space,Str "//",Space,Str "ital//",Space,Str "__",Space,Str "undr__",Space,Str "--",Space,Str "strk--",Space,Str "``",Space,Str "mono``",Space,Str "\"\"",Space,Str "raw\"\"",Space,Str "''",Space,Str "tggd''",SoftBreak,Str "i)",Space,Str "**bold",Space,Str "**",Space,Str "//ital",Space,Str "//",Space,Str "__undr",Space,Str "__",Space,Str "--strk",Space,Str "--",Space,Str "``mono",Space,Str "``",Space,Str "\"\"raw",Space,Str "\"\"",Space,Str "''tggd",Space,Str "''",SoftBreak,Str "i)",Space,Str "**",Space,Str "bold",Space,Str "**",Space,Str "//",Space,Str "ital",Space,Str "//",Space,Str "__",Space,Str "undr",Space,Str "__",Space,Str "--",Space,Str "strk",Space,Str "--",Space,Str "``",Space,Str "mono",Space,Str "``",Space,Str "\"\"",Space,Str "raw",Space,Str "\"\"",Space,Str "''",Space,Str "tggd",Space,Str "''"] +,Header 1 ("link",[],[]) [Str "Link"] +,Para [Link ("",[],[]) [Str "mailto:user@domain.com"] ("user@domain.com",""),SoftBreak,Link ("",[],[]) [Str "mailto:user@domain.com"] ("user@domain.com",""),Str ".",SoftBreak,Link ("",[],[]) [Str "mailto:user@domain.com"] ("user@domain.com",""),Str ".",Space,Str "any",Space,Str "text.",SoftBreak,Str "any",Space,Str "text:",Space,Link ("",[],[]) [Str "mailto:user@domain.com"] ("user@domain.com",""),Str ".",Space,Str "any",Space,Str "text.",SoftBreak,Link ("",[],[]) [Str "label"] ("user@domain.com",""),SoftBreak,Link ("",[],[]) [Str "mailto:user@domain.com?subject=bla"] ("user@domain.com?subject=bla",""),SoftBreak,Link ("",[],[]) [Str "mailto:user@domain.com?subject=bla"] ("user@domain.com?subject=bla",""),Str ".",SoftBreak,Link ("",[],[]) [Str "mailto:user@domain.com?subject=bla"] ("user@domain.com?subject=bla",""),Str ",",SoftBreak,Link ("",[],[]) [Str "mailto:user@domain.com?subject=bla&cc=otheruser@domain.com"] ("user@domain.com?subject=bla&cc=otheruser@domain.com",""),SoftBreak,Link ("",[],[]) [Str "mailto:user@domain.com?subject=bla&cc=otheruser@domain.com"] ("user@domain.com?subject=bla&cc=otheruser@domain.com",""),Str ".",SoftBreak,Link ("",[],[]) [Str "mailto:user@domain.com?subject=bla&cc=otheruser@domain.com"] ("user@domain.com?subject=bla&cc=otheruser@domain.com",""),Str ",",SoftBreak,Link ("",[],[]) [Str "label"] ("user@domain.com?subject=bla&cc=otheruser@domain.com",""),Str ".",SoftBreak,Link ("",[],[]) [Str "label"] ("user@domain.com?subject=bla&cc=otheruser@domain.com.",""),Str ".",SoftBreak,Link ("",[],[]) [Str "http://www.domain.com"] ("http://www.domain.com",""),SoftBreak,Link ("",[],[]) [Str "http://www.domain.com/dir/"] ("http://www.domain.com/dir/",""),SoftBreak,Link ("",[],[]) [Str "http://www.domain.com/dir///"] ("http://www.domain.com/dir///",""),SoftBreak,Link ("",[],[]) [Str "http://www.domain.com."] ("http://www.domain.com.",""),SoftBreak,Link ("",[],[]) [Str "http://www.domain.com,"] ("http://www.domain.com,",""),SoftBreak,Link ("",[],[]) [Str "http://www.domain.com."] ("http://www.domain.com.",""),Space,Str "any",Space,Str "text.",SoftBreak,Link ("",[],[]) [Str "http://www.domain.com,"] ("http://www.domain.com,",""),Space,Str "any",Space,Str "text.",SoftBreak,Link ("",[],[]) [Str "http://www.domain.com/dir/."] ("http://www.domain.com/dir/.",""),Space,Str "any",Space,Str "text.",SoftBreak,Str "any",Space,Str "text:",Space,Link ("",[],[]) [Str "http://www.domain.com."] ("http://www.domain.com.",""),Space,Str "any",Space,Str "text.",SoftBreak,Str "any",Space,Str "text:",Space,Link ("",[],[]) [Str "http://www.domain.com/dir/."] ("http://www.domain.com/dir/.",""),Space,Str "any",Space,Str "text.",SoftBreak,Str "any",Space,Str "text:",Space,Link ("",[],[]) [Str "http://www.domain.com/dir/index.html."] ("http://www.domain.com/dir/index.html.",""),Space,Str "any",Space,Str "text.",SoftBreak,Str "any",Space,Str "text:",Space,Link ("",[],[]) [Str "http://www.domain.com/dir/index.html,"] ("http://www.domain.com/dir/index.html,",""),Space,Str "any",Space,Str "text.",SoftBreak,Link ("",[],[]) [Str "http://www.domain.com/dir/#anchor"] ("http://www.domain.com/dir/#anchor",""),SoftBreak,Link ("",[],[]) [Str "http://www.domain.com/dir/index.html#anchor"] ("http://www.domain.com/dir/index.html#anchor",""),SoftBreak,Link ("",[],[]) [Str "http://www.domain.com/dir/index.html#anchor."] ("http://www.domain.com/dir/index.html#anchor.",""),SoftBreak,Link ("",[],[]) [Str "http://www.domain.com/dir/#anchor."] ("http://www.domain.com/dir/#anchor.",""),Space,Str "any",Space,Str "text.",SoftBreak,Link ("",[],[]) [Str "http://www.domain.com/dir/index.html#anchor."] ("http://www.domain.com/dir/index.html#anchor.",""),Space,Str "any",Space,Str "text.",SoftBreak,Str "any",Space,Str "text:",Space,Link ("",[],[]) [Str "http://www.domain.com/dir/#anchor."] ("http://www.domain.com/dir/#anchor.",""),Space,Str "any",Space,Str "text.",SoftBreak,Str "any",Space,Str "text:",Space,Link ("",[],[]) [Str "http://www.domain.com/dir/index.html#anchor."] ("http://www.domain.com/dir/index.html#anchor.",""),Space,Str "any",Space,Str "text.",SoftBreak,Link ("",[],[]) [Str "http://domain.com?a=a@a.a&b=a+b+c."] ("http://domain.com?a=a@a.a&b=a+b+c.",""),SoftBreak,Link ("",[],[]) [Str "http://domain.com?a=a@a.a&b=a+b+c,"] ("http://domain.com?a=a@a.a&b=a+b+c,",""),SoftBreak,Link ("",[],[]) [Str "http://domain.com/bla.cgi?a=a@a.a&b=a+b+c."] ("http://domain.com/bla.cgi?a=a@a.a&b=a+b+c.",""),SoftBreak,Link ("",[],[]) [Str "http://domain.com/bla.cgi?a=a@a.a&b=a+b+c@."] ("http://domain.com/bla.cgi?a=a@a.a&b=a+b+c@.",""),SoftBreak,Link ("",[],[]) [Str "http://domain.com?a=a@a.a&b=a+b+c.#anchor"] ("http://domain.com?a=a@a.a&b=a+b+c.#anchor",""),SoftBreak,Link ("",[],[]) [Str "http://domain.com/bla.cgi?a=a@a.a&b=a+b+c.#anchor"] ("http://domain.com/bla.cgi?a=a@a.a&b=a+b+c.#anchor",""),SoftBreak,Link ("",[],[]) [Str "http://domain.com/bla.cgi?a=a@a.a&b=a+b+c@.#anchor"] ("http://domain.com/bla.cgi?a=a@a.a&b=a+b+c@.#anchor",""),SoftBreak,Link ("",[],[]) [Str "http://user:password@domain.com/bla.html."] ("http://user:password@domain.com/bla.html.",""),SoftBreak,Link ("",[],[]) [Str "http://user:password@domain.com/dir/."] ("http://user:password@domain.com/dir/.",""),SoftBreak,Link ("",[],[]) [Str "http://user:password@domain.com."] ("http://user:password@domain.com.",""),SoftBreak,Link ("",[],[]) [Str "http://user:@domain.com."] ("http://user:@domain.com.",""),SoftBreak,Link ("",[],[]) [Str "http://user@domain.com."] ("http://user@domain.com.",""),SoftBreak,Link ("",[],[]) [Str "http://user:password@domain.com/bla.cgi?a=a@a.a&b=a+b+c.#anchor"] ("http://user:password@domain.com/bla.cgi?a=a@a.a&b=a+b+c.#anchor",""),SoftBreak,Link ("",[],[]) [Str "http://user:password@domain.com/bla.cgi?a=a@a.a&b=a+b+c@#anchor"] ("http://user:password@domain.com/bla.cgi?a=a@a.a&b=a+b+c@#anchor",""),SoftBreak,Link ("",[],[]) [Str "label"] ("www.domain.com",""),SoftBreak,Str "[",Space,Str "label",Space,Link ("",[],[]) [Str "www.domain.com"] ("www.domain.com",""),Str "]",SoftBreak,Link ("",[],[]) [Str "label",Space] ("www.domain.com",""),SoftBreak,Link ("",[],[]) [Str "anchor",Space] ("http://www.domain.com/dir/index.html#anchor.",""),SoftBreak,Link ("",[],[]) [Str "login",Space] ("http://user:password@domain.com/bla.html",""),SoftBreak,Link ("",[],[]) [Str "form",Space] ("http://www.domain.com/bla.cgi?a=a@a.a&b=a+b+c.",""),SoftBreak,Link ("",[],[]) [Str "form",Space,Str "&",Space,Str "anchor"] ("http://www.domain.com/bla.cgi?a=a@a.a&b=a+b+c.#anchor",""),SoftBreak,Link ("",[],[]) [Str "login",Space,Str "&",Space,Str "form",Space] ("http://user:password@domain.com/bla.cgi?a=a@a.a&b=a+b+c.",""),SoftBreak,Link ("",[],[]) [Str "local",Space,Str "link",Space,Str "up",Space] ("..",""),SoftBreak,Link ("",[],[]) [Str "local",Space,Str "link",Space,Str "file",Space] ("bla.html",""),SoftBreak,Link ("",[],[]) [Str "local",Space,Str "link",Space,Str "anchor",Space] ("#anchor",""),SoftBreak,Link ("",[],[]) [Str "local",Space,Str "link",Space,Str "file/anchor"] ("bla.html#anchor",""),SoftBreak,Link ("",[],[]) [Str "local",Space,Str "link",Space,Str "file/anchor"] ("bla.html#anchor.",""),SoftBreak,Link ("",[],[]) [Str "local",Space,Str "link",Space,Str "img",Space] ("abc.gif",""),SoftBreak,Link ("",[],[]) [Str "www.fake.com"] ("www.domain.com",""),SoftBreak,Link ("",[],[]) [Str "http://domain.com:8080/~user/_st-r@a=n$g,e/index%20new.htm"] ("http://domain.com:8080/~user/_st-r@a=n$g,e/index%20new.htm",""),SoftBreak,Link ("",[],[]) [Str "http://domain.com:8080/~user/_st-r@a=n$g,e/index%20new.htm?a=/%22&b=+.@*_-"] ("http://domain.com:8080/~user/_st-r@a=n$g,e/index%20new.htm?a=/%22&b=+.@*_-",""),SoftBreak,Link ("",[],[]) [Str "http://domain.com:8080/~user/_st-r@a=n$g,e/index%20new.htm?a=/%22&b=+.@*_-#anchor_"] ("http://domain.com:8080/~user/_st-r@a=n$g,e/index%20new.htm?a=/%22&b=+.@*_-#anchor_",""),Str "-1%.",SoftBreak,Link ("",[],[]) [Str "http://foo._user-9:pass!#$%&*()+word@domain.com:8080/~user/_st-r@a=n$g,e/index%20new.htm?a=/%22&b=+.@*_-#anchor_"] ("http://foo._user-9:pass!#$%&*()+word@domain.com:8080/~user/_st-r@a=n$g,e/index%20new.htm?a=/%22&b=+.@*_-#anchor_",""),Str "-1%.",SoftBreak,Link ("",[],[]) [Str "http://L1.com"] ("http://L1.com",""),Space,Str "!",Space,Link ("",[],[]) [Str "mailto:L2@www.com"] ("L2@www.com",""),Space,Str "!",Space,Link ("",[],[]) [Str "L3"] ("www.com",""),Space,Str "!",Space,Link ("",[],[]) [Str "L4"] ("w@ww.com",""),Space,Str "!",Space,Link ("",[],[]) [Str "www.L5.com"] ("www.L5.com",""),SoftBreak,Link ("",[],[]) [Str "www.domain.com"] ("www.domain.com",""),SoftBreak,Link ("",[],[]) [Str "www2.domain.com"] ("www2.domain.com",""),SoftBreak,Link ("",[],[]) [Str "ftp.domain.com"] ("ftp.domain.com",""),SoftBreak,Link ("",[],[]) [Str "WWW.DOMAIN.COM"] ("WWW.DOMAIN.COM",""),SoftBreak,Link ("",[],[]) [Str "FTP.DOMAIN.COM"] ("FTP.DOMAIN.COM",""),SoftBreak,Link ("",[],[]) [Str "label"] ("www.domain.com",""),SoftBreak,Link ("",[],[]) [Str "label"] ("ftp.domain.com",""),SoftBreak,Link ("",[],[]) [Str "label"] ("WWW.DOMAIN.COM",""),SoftBreak,Link ("",[],[]) [Str "label"] ("FTP.DOMAIN.COM",""),SoftBreak,Str "[label",Space,Link ("",[],[]) [Str "www.domain.com"] ("www.domain.com",""),Space,Str "]",SoftBreak,Str "[label]",Space,Link ("",[],[]) [Str "www.domain.com"] ("www.domain.com",""),Str "]"] +,Header 1 ("image",[],[]) [Str "Image"] +,Para [Image ("",[],[]) [] ("img.png","")] +,Para [Link ("",[],[]) [Image ("",[],[]) [] ("img.png","")] ("http://txt2tags.org","")] +,Para [Image ("",[],[]) [] ("img.png",""),Space,Str "Image",Space,Str "at",Space,Str "the",Space,Str "line",Space,Str "beginning."] +,Para [Str "Image",Space,Str "in",Space,Str "the",Space,Str "middle",Space,Image ("",[],[]) [] ("img.png",""),Space,Str "of",Space,Str "the",Space,Str "line."] +,Para [Str "Image",Space,Str "at",Space,Str "the",Space,Str "line",Space,Str "end.",Space,Image ("",[],[]) [] ("img.png","")] +,Para [Image ("",[],[]) [] ("img.png",""),SoftBreak,Image ("",[],[]) [] ("img.png",""),SoftBreak,Image ("",[],[]) [] ("img.png","")] +,Para [Image ("",[],[]) [] ("img.png",""),Image ("",[],[]) [] ("img.png","")] +,Para [Str "Images",Space,Image ("",[],[]) [] ("img.png",""),Space,Str "mixed",Space,Image ("",[],[]) [] ("img.png",""),Space,Str "with",Space,Image ("",[],[]) [] ("img.png",""),Space,Str "text."] +,Para [Str "Images",Space,Str "glued",Space,Str "together:",Space,Image ("",[],[]) [] ("img.png",""),Image ("",[],[]) [] ("img.png",""),Image ("",[],[]) [] ("img.png",""),Str "."] +,Para [Str "[img.png",Space,Str "]"] +,Para [Str "[",Space,Str "img.png]"] +,Para [Str "[",Space,Str "img.png",Space,Str "]"] +,Header 1 ("numtitle",[],[]) [Str "Numbered",Space,Str "Title"] +,Header 1 ("",[],[]) [Str "Title",Space,Str "Level",Space,Str "1"] +,Header 2 ("",[],[]) [Str "Title",Space,Str "Level",Space,Str "2"] +,Header 3 ("",[],[]) [Str "Title",Space,Str "Level",Space,Str "3"] +,Header 4 ("",[],[]) [Str "Title",Space,Str "Level",Space,Str "4"] +,Header 5 ("",[],[]) [Str "Title",Space,Str "Level",Space,Str "5"] +,Header 1 ("lab_el-1",[],[]) [Str "Title",Space,Str "Level",Space,Str "1"] +,Header 2 ("lab_el-2",[],[]) [Str "Title",Space,Str "Level",Space,Str "2"] +,Header 3 ("lab_el-3",[],[]) [Str "Title",Space,Str "Level",Space,Str "3"] +,Header 4 ("lab_el-4",[],[]) [Str "Title",Space,Str "Level",Space,Str "4"] +,Header 5 ("lab_el-5",[],[]) [Str "Title",Space,Str "Level",Space,Str "5"] +,Header 3 ("",[],[]) [Str "Title",Space,Str "Level",Space,Str "3"] +,Header 3 ("",[],[]) [Str "Title",Space,Str "Level",Space,Str "3"] +,Header 3 ("",[],[]) [Str "Title",Space,Str "Level",Space,Str "3"] +,Header 3 ("",[],[]) [Str "Title",Space,Str "Level",Space,Str "3"] +,Header 3 ("",[],[]) [Str "Title",Space,Str "Level",Space,Str "3"] +,Header 3 ("lab_el-9",[],[]) [Str "Title",Space,Str "Level",Space,Str "3"] +,Para [Str "+Not",Space,Str "Title"] +,Para [Str "++Not",Space,Str "Title+"] +,Para [Str "+++Not",Space,Str "Title++++",SoftBreak,Str "++++++Not",Space,Str "Title",Space,Str "6++++++"] +,Para [Str "+++++++Not",Space,Str "Title",Space,Str "7+++++++",SoftBreak,Str "+Not",Space,Str "Title+",Space,Str "[label1]",SoftBreak,Str "+Not",Space,Str "Title+[",Space,Str "label",Space,Str "]",SoftBreak,Str "+Not",Space,Str "Title+[la/bel]"] +,Header 1 ("title",[],[]) [Str "Title"] +,Header 1 ("",[],[]) [Str "Title",Space,Str "Level",Space,Str "1"] +,Header 2 ("",[],[]) [Str "Title",Space,Str "Level",Space,Str "2"] +,Header 3 ("",[],[]) [Str "Title",Space,Str "Level",Space,Str "3"] +,Header 4 ("",[],[]) [Str "Title",Space,Str "Level",Space,Str "4"] +,Header 5 ("",[],[]) [Str "Title",Space,Str "Level",Space,Str "5"] +,Header 1 ("lab_el-1",[],[]) [Str "Title",Space,Str "Level",Space,Str "1"] +,Header 2 ("lab_el-2",[],[]) [Str "Title",Space,Str "Level",Space,Str "2"] +,Header 3 ("lab_el-3",[],[]) [Str "Title",Space,Str "Level",Space,Str "3"] +,Header 4 ("lab_el-4",[],[]) [Str "Title",Space,Str "Level",Space,Str "4"] +,Header 5 ("lab_el-5",[],[]) [Str "Title",Space,Str "Level",Space,Str "5"] +,Header 3 ("",[],[]) [Str "Title",Space,Str "Level",Space,Str "3"] +,Header 3 ("",[],[]) [Str "Title",Space,Str "Level",Space,Str "3"] +,Header 3 ("",[],[]) [Str "Title",Space,Str "Level",Space,Str "3"] +,Header 3 ("",[],[]) [Str "Title",Space,Str "Level",Space,Str "3"] +,Header 3 ("",[],[]) [Str "Title",Space,Str "Level",Space,Str "3"] +,Header 3 ("lab_el-9",[],[]) [Str "Title",Space,Str "Level",Space,Str "3"] +,Para [Str "=Not",Space,Str "Title"] +,Para [Str "==Not",Space,Str "Title="] +,Para [Str "===Not",Space,Str "Title====",SoftBreak,Str "======Not",Space,Str "Title",Space,Str "6======"] +,Para [Str "=======Not",Space,Str "Title",Space,Str "7=======",SoftBreak,Str "=Not",Space,Str "Title=",Space,Str "[label1]",SoftBreak,Str "=Not",Space,Str "Title=[",Space,Str "label",Space,Str "]",SoftBreak,Str "=Not",Space,Str "Title=[la/bel]"] +,Header 1 ("quote",[],[]) [Str "Quote"] +,BlockQuote + [Para [Str "To",Space,Str "quote",Space,Str "a",Space,Str "paragraph,",Space,Str "just",Space,Str "prefix",Space,Str "it",Space,Str "by",Space,Str "a",Space,Str "TAB",SoftBreak,Str "character.",Space,Str "All",Space,Str "the",Space,Str "lines",Space,Str "of",Space,Str "the",Space,Str "paragraph",Space,Str "must",SoftBreak,Str "begin",Space,Str "with",Space,Str "a",Space,Str "TAB."]] +,Para [Str "Any",Space,Str "non-tabbed",Space,Str "line",Space,Str "closes",Space,Str "the",Space,Str "quote",Space,Str "block."] +,BlockQuote + [Para [Str "The",Space,Str "number",Space,Str "of",Space,Str "leading",Space,Str "TABs",Space,Str "identifies",Space,Str "the",Space,Str "quote",SoftBreak,Str "block",Space,Str "depth.",Space,Str "This",Space,Str "is",Space,Str "quote",Space,Str "level",Space,Str "1."] + ,BlockQuote + [Para [Str "With",Space,Str "two",Space,Str "TABs,",Space,Str "we",Space,Str "are",Space,Str "on",Space,Str "the",Space,Str "quote",SoftBreak,Str "level",Space,Str "2."] + ,BlockQuote + [Para [Str "The",Space,Str "more",Space,Str "TABs,",Space,Str "more",Space,Str "deep",Space,Str "is",SoftBreak,Str "the",Space,Str "quote",Space,Str "level."] + ,BlockQuote + [Para [Str "There",Space,Str "isn't",Space,Str "a",Space,Str "limit."]]]]] +,BlockQuote + [BlockQuote + [BlockQuote + [BlockQuote + [Para [Str "This",Space,Str "quote",Space,Str "starts",Space,Str "at",SoftBreak,Str "level",Space,Str "4."]] + ,Para [Str "Then",Space,Str "its",Space,Str "depth",Space,Str "is",Space,Str "decreased."]] + ,Para [Str "Counting",Space,Str "down,",Space,Str "one",Space,Str "by",Space,Str "one."]] + ,Para [Str "Until",Space,Str "the",Space,Str "level",Space,Str "1."]] +,BlockQuote + [BlockQuote + [BlockQuote + [Para [Str "Unlike",Space,Str "lists,",Space,Str "any",Space,Str "quote",Space,Str "block",Space,Str "is",SoftBreak,Str "independent,",Space,Str "not",Space,Str "part",Space,Str "of",Space,Str "a",Space,Str "tree."]]] + ,Para [Str "The",Space,Str "TAB",Space,Str "count",Space,Str "don't",Space,Str "need",Space,Str "to",Space,Str "be",Space,Str "incremental",SoftBreak,Str "by",Space,Str "one."] + ,BlockQuote + [BlockQuote + [BlockQuote + [Para [Str "The",Space,Str "nesting",Space,Str "don't",Space,Str "need",SoftBreak,Str "to",Space,Str "follow",Space,Str "any",Space,Str "rule."]]] + ,Para [Str "Quotes",Space,Str "can",Space,Str "be",Space,Str "opened",Space,Str "and",Space,Str "closed",SoftBreak,Str "in",Space,Str "any",Space,Str "way."] + ,BlockQuote + [BlockQuote + [BlockQuote + [Para [Str "You",Space,Str "choose."]]]]]] +,BlockQuote + [Para [Str "Some",Space,Str "targets",Space,Str "(as",Space,Str "sgml)",Space,Str "don't",Space,Str "support",Space,Str "the",SoftBreak,Str "nesting",Space,Str "of",Space,Str "quotes.",Space,Str "There",Space,Str "is",Space,Str "only",Space,Str "one",Space,Str "quote",SoftBreak,Str "level."] + ,BlockQuote + [Para [Str "In",Space,Str "this",Space,Str "case,",Space,Str "no",Space,Str "matter",Space,Str "how",Space,Str "much",SoftBreak,Str "TABs",Space,Str "are",Space,Str "used",Space,Str "to",Space,Str "define",Space,Str "the",Space,Str "quote",SoftBreak,Str "block,",Space,Str "it",Space,Str "always",Space,Str "will",Space,Str "be",Space,Str "level",Space,Str "1."]]] +,BlockQuote + [Para [Str "Spaces",Space,Str "AFTER",Space,Str "the",Space,Str "TAB",Space,Str "character",Space,Str "are",Space,Str "allowed.",SoftBreak,Str "But",Space,Str "be",Space,Str "careful,",Space,Str "it",Space,Str "can",Space,Str "be",Space,Str "confusing."]] +,Para [Str "Spaces",Space,Str "BEFORE",Space,Str "the",Space,Str "TAB",Space,Str "character",SoftBreak,Str "invalidate",Space,Str "the",Space,Str "mark.",Space,Str "It's",Space,Str "not",Space,Str "quote."] +,BlockQuote + [Para [Str "Paragraph",Space,Str "breaks",Space,Str "inside",Space,Str "a",Space,Str "quote",Space,Str "aren't",SoftBreak,Str "possible."] + ,Para [Str "This",Space,Str "sample",Space,Str "are",Space,Str "two",Space,Str "separated",Space,Str "quoted",SoftBreak,Str "paragraphs,",Space,Str "not",Space,Str "a",Space,Str "quote",Space,Str "block",Space,Str "with",SoftBreak,Str "two",Space,Str "paragraphs",Space,Str "inside."]] +,BlockQuote + [Para [Str "The",Space,Str "end",Space,Str "of",Space,Str "the",Space,Str "file",Space,Str "(EOF)",Space,Str "closes",Space,Str "the",SoftBreak,Str "currently",Space,Str "open",Space,Str "quote",Space,Str "block."]] +,Header 1 ("raw",[],[]) [Str "Raw"] +,Para [Str "A raw line.\n"] +,Para [Str " Another raw line, with leading spaces.\n"] +,Para [Str "A raw area delimited\n by lines with marks.\n"] +,Para [Str "Trailing spaces and TABs after the area marks\nare allowed, but not encouraged nor documented.\n"] +,Para [Str "\"\"\"Not",Space,Str "a",Space,Str "raw",Space,Str "line,",Space,Str "need",Space,Str "one",Space,Str "space",Space,Str "after",Space,Str "mark."] +,Para [Str "\"\"\"",SoftBreak,Str "Not",Space,Str "a",Space,Str "raw",Space,Str "area.",SoftBreak,Str "The",Space,Str "marks",Space,Str "must",Space,Str "be",Space,Str "at",Space,Str "the",Space,Str "line",Space,Str "beginning,",SoftBreak,Str "no",Space,Str "leading",Space,Str "spaces.",SoftBreak,Str "\"\"\""] +,Para [Str "The end of the file (EOF) closes\nthe currently open raw area.\n"] +,Header 1 ("verbatim",[],[]) [Str "Verbatim"] +,CodeBlock ("",[],[]) "A verbatim line.\n" +,CodeBlock ("",[],[]) " Another verbatim line, with leading spaces.\n" +,CodeBlock ("",[],[]) "A verbatim area delimited\n by lines with marks.\n" +,CodeBlock ("",[],[]) "Trailing spaces and TABs after the area marks\nare allowed, but not encouraged nor documented.\n" +,Para [Str "```Not",Space,Str "a",Space,Str "verbatim",Space,Str "line,",Space,Str "need",Space,Str "one",Space,Str "space",Space,Str "after",Space,Str "mark."] +,Para [Str "```",SoftBreak,Str "Not",Space,Str "a",Space,Str "verbatim",Space,Str "area.",SoftBreak,Str "The",Space,Str "marks",Space,Str "must",Space,Str "be",Space,Str "at",Space,Str "the",Space,Str "line",Space,Str "beginning,",SoftBreak,Str "no",Space,Str "leading",Space,Str "spaces.",SoftBreak,Str "```"] +,CodeBlock ("",[],[]) "The end of the file (EOF) closes\nthe currently open verbatim area.\n" +,Header 1 ("deflist",[],[]) [Str "Definition",Space,Str "List"] +,DefinitionList + [([Str "Definition",Space,Str "list"], + [[Plain [Str "A",Space,Str "list",Space,Str "with",Space,Str "terms"]]]) + ,([Str "Start",Space,Str "term",Space,Str "with",Space,Str "colon"], + [[Plain [Str "And",Space,Str "its",Space,Str "definition",Space,Str "follows"]]])] +,Header 1 ("numlist",[],[]) [Str "Numbered",Space,Str "List"] +,Para [Str "See",Space,Link ("",[],[]) [Str "List"] ("#list",""),Str ",",Space,Str "the",Space,Str "same",Space,Str "rules",Space,Str "apply."] +,Header 1 ("list",[],[]) [Str "List"] +,BulletList + [[Plain [Str "Use",Space,Str "the",Space,Str "hyphen",Space,Str "to",Space,Str "prefix",Space,Str "list",Space,Str "items."]] + ,[Plain [Str "There",Space,Str "must",Space,Str "be",Space,Str "one",Space,Str "space",Space,Str "after",Space,Str "the",Space,Str "hyphen."]] + ,[Plain [Str "The",Space,Str "list",Space,Str "is",Space,Str "closed",Space,Str "by",Space,Str "two",Space,Str "consecutive",Space,Str "blank",Space,Str "lines."]]] +,BulletList + [[Plain [Str "The",Space,Str "list",Space,Str "can",Space,Str "be",Space,Str "indented",Space,Str "on",Space,Str "the",Space,Str "source",Space,Str "document."]] + ,[Plain [Str "You",Space,Str "can",Space,Str "use",Space,Str "any",Space,Str "number",Space,Str "of",Space,Str "spaces."]] + ,[Plain [Str "The",Space,Str "result",Space,Str "will",Space,Str "be",Space,Str "the",Space,Str "same."]]] +,BulletList + [[Para [Str "Let",Space,Str "one",Space,Str "blank",Space,Str "line",Space,Str "between",Space,Str "the",Space,Str "list",Space,Str "items."]] + ,[Para [Str "It",Space,Str "will",Space,Str "be",Space,Str "maintained",Space,Str "on",Space,Str "the",Space,Str "conversion."]] + ,[Para [Str "Some",Space,Str "targets",Space,Str "don't",Space,Str "support",Space,Str "this",Space,Str "behavior."]] + ,[Para [Str "This",Space,Str "one",Space,Str "was",Space,Str "separated",Space,Str "by",Space,Str "a",Space,Str "line",Space,Str "with",Space,Str "blanks.",SoftBreak,Str "You",Space,Str "can",Space,Str "also",Space,Str "put",Space,Str "a",Space,Str "blank",Space,Str "line",Space,Str "inside"] + ,Para [Str "the",Space,Str "item",Space,Str "contents",Space,Str "and",Space,Str "it",Space,Str "will",Space,Str "be",Space,Str "preserved."]]] +,Para [Str "-This",Space,Str "is",Space,Str "not",Space,Str "a",Space,Str "list",Space,Str "(no",Space,Str "space)"] +,Para [Str "-",Space,Str "This",Space,Str "is",Space,Str "not",Space,Str "a",Space,Str "list",Space,Str "(more",Space,Str "than",Space,Str "one",Space,Str "space)"] +,Para [Str "-",Space,Str "This",Space,Str "is",Space,Str "not",Space,Str "a",Space,Str "list",Space,Str "(a",Space,Str "TAB",Space,Str "instead",Space,Str "the",Space,Str "space)"] +,BulletList + [[BulletList + [[Plain [Str "This",Space,Str "is",Space,Str "a",Space,Str "list"]]]] + ,[OrderedList (1,DefaultStyle,DefaultDelim) + [[Plain [Str "This",Space,Str "is",Space,Str "a",Space,Str "list"]]]] + ,[DefinitionList + [([Str "This",Space,Str "is",Space,Str "a",Space,Str "list"], + [[]])]]] +,BulletList + [[Plain [Str "This",Space,Str "is",Space,Str "the",Space,Str "\"mother\"",Space,Str "list",Space,Str "first",Space,Str "item."]] + ,[Plain [Str "Here",Space,Str "is",Space,Str "the",Space,Str "second,",Space,Str "but",Space,Str "inside",Space,Str "this",Space,Str "item,"] + ,BulletList + [[Plain [Str "there",Space,Str "is",Space,Str "a",Space,Str "sublist,",Space,Str "with",Space,Str "its",Space,Str "own",Space,Str "items."]] + ,[Plain [Str "Note",Space,Str "that",Space,Str "the",Space,Str "items",Space,Str "of",Space,Str "the",Space,Str "same",Space,Str "sublist"]] + ,[Plain [Str "must",Space,Str "have",Space,Str "the",Space,Str "same",Space,Str "indentation."] + ,BulletList + [[Plain [Str "And",Space,Str "this",Space,Str "can",Space,Str "go",Space,Str "on,",Space,Str "opening",Space,Str "sublists."] + ,BulletList + [[Plain [Str "Just",Space,Str "add",Space,Str "leading",Space,Str "spaces",Space,Str "before",Space,Str "the"]] + ,[Plain [Str "hyphen",Space,Str "and",Space,Str "sublists",Space,Str "will",Space,Str "be",Space,Str "opened."]] + ,[Plain [Str "The",Space,Str "two",Space,Str "blank",Space,Str "lines",Space,Str "closes",Space,Str "them",Space,Str "all."]]]]]]]]] +,BulletList + [[Plain [Str "When",Space,Str "nesting",Space,Str "lists,",Space,Str "the",Space,Str "additional",Space,Str "spaces",Space,Str "are",Space,Str "free."]] + ,[Plain [Str "You",Space,Str "can",Space,Str "add",Space,Str "just",Space,Str "one,"] + ,BulletList + [[Plain [Str "or",Space,Str "many."] + ,BulletList + [[Plain [Str "What",Space,Str "matters",Space,Str "is",Space,Str "to",Space,Str "put",Space,Str "more",Space,Str "than",Space,Str "the",Space,Str "previous."]] + ,[Plain [Str "But",Space,Str "remember",Space,Str "that",Space,Str "the",Space,Str "other",Space,Str "items",Space,Str "of",Space,Str "the",Space,Str "same",Space,Str "list"]] + ,[Plain [Str "must",Space,Str "use",Space,Str "the",Space,Str "same",Space,Str "indentation."]]]]]]] +,BulletList + [[Plain [Str "There",Space,Str "is",Space,Str "not",Space,Str "a",Space,Str "depth",Space,Str "limit,"] + ,BulletList + [[Plain [Str "you",Space,Str "can",Space,Str "go",Space,Str "deeper",Space,Str "and",Space,Str "deeper."] + ,BulletList + [[Plain [Str "But",Space,Str "some",Space,Str "targets",Space,Str "may",Space,Str "have",Space,Str "restrictions."] + ,BulletList + [[Plain [Str "The",Space,Str "LaTeX",Space,Str "maximum",Space,Str "is",Space,Str "here,",Space,Str "4",Space,Str "levels."]]]]]]]]] +,BulletList + [[Plain [Str "Reverse",Space,Str "nesting",Space,Str "doesn't",Space,Str "work."]] + ,[Plain [Str "Because",Space,Str "a",Space,Str "sublist",Space,Str "*must*",Space,Str "have",Space,Str "a",Space,Str "mother",Space,Str "list."]] + ,[Plain [Str "It's",Space,Str "the",Space,Str "list",Space,Str "concept,",Space,Str "not",Space,Str "a",Space,Str "txt2tags",Space,Str "limitation."]] + ,[Plain [Str "All",Space,Str "this",Space,Str "sublists",Space,Str "will",Space,Str "be",Space,Str "bumped",Space,Str "to",Space,Str "mother",Space,Str "lists."]] + ,[Plain [Str "At",Space,Str "level",Space,Str "1,",Space,Str "like",Space,Str "this",Space,Str "one."]]] +,BulletList + [[Plain [Str "Level",Space,Str "1"] + ,BulletList + [[Plain [Str "Level",Space,Str "2"] + ,BulletList + [[Plain [Str "Level",Space,Str "3"] + ,BulletList + [[Plain [Str "Level",Space,Str "4"]]]] + ,[Plain [Str "Level",Space,Str "3",Space,Str "--",Space,Str "(closed",Space,Str "Level",Space,Str "4)"]]]] + ,[Plain [Str "Level",Space,Str "2",Space,Str "--",Space,Str "(closed",Space,Str "Level",Space,Str "3)"]]]] + ,[Plain [Str "Level",Space,Str "1",Space,Str "--",Space,Str "(closed",Space,Str "Level",Space,Str "2)"]]] +,BulletList + [[Plain [Str "Level",Space,Str "1"] + ,BulletList + [[Plain [Str "Level",Space,Str "2"] + ,BulletList + [[Plain [Str "Level",Space,Str "3"] + ,BulletList + [[Plain [Str "Level",Space,Str "4"]]]]]]]] + ,[Plain [Str "Level",Space,Str "1",Space,Str "--",Space,Str "(closed",Space,Str "Level",Space,Str "4,",Space,Str "Level",Space,Str "3",Space,Str "and",Space,Str "Level",Space,Str "2)"]]] +,BulletList + [[Para [Str "Level",Space,Str "1"] + ,BulletList + [[Para [Str "Level",Space,Str "2",Space,Str "--",Space,Str "blank",Space,Str "BEFORE",Space,Str "and",Space,Str "AFTER",Space,Str "(in)"] + ,BulletList + [[Plain [Str "Level",Space,Str "3"]]]]]]] +,BulletList + [[Plain [Str "Level",Space,Str "4"]]] +,BulletList + [[Para [Str "Level",Space,Str "3"]] + ,[Para [Str "Level",Space,Str "2",Space,Str "--",Space,Str "blank",Space,Str "BEFORE",Space,Str "and",Space,Str "AFTER",Space,Str "(out)"]] + ,[Para [Str "Level",Space,Str "1"] + ,BulletList + [[Para [Str "Level",Space,Str "2",Space,Str "--",Space,Str "blank",Space,Str "BEFORE",Space,Str "(spaces)",Space,Str "and",Space,Str "AFTER",Space,Str "(TAB)"] + ,BulletList + [[Plain [Str "Level",Space,Str "3"]]]]]]] +,BulletList + [[Plain [Str "Level",Space,Str "1"] + ,BulletList + [[Plain [Str "Level",Space,Str "2"] + ,BulletList + [[Plain [Str "Level",Space,Str "3"] + ,BulletList + [[Plain [Str "Level",Space,Str "4"]] + ,[Plain [Str "Level",Space,Str "3.5",Space,Str "???"]]]] + ,[Plain [Str "Level",Space,Str "3"]] + ,[Plain [Str "Level",Space,Str "2.5",Space,Str "???"]]]] + ,[Plain [Str "Level",Space,Str "2"]] + ,[Plain [Str "Level",Space,Str "1.5",Space,Str "???"]]]] + ,[Plain [Str "Level",Space,Str "1"]]] +,BulletList + [[Plain [Str "This",Space,Str "list",Space,Str "is",Space,Str "closed",Space,Str "by",Space,Str "a",Space,Str "line",Space,Str "with",Space,Str "spaces",Space,Str "and",Space,Str "other",Space,Str "with",Space,Str "TABs"]]] +,BulletList + [[Plain [Str "This",Space,Str "list",Space,Str "is",Space,Str "NOT",Space,Str "closed",Space,Str "by",Space,Str "two",Space,Str "comment",Space,Str "lines"]]] +,BulletList + [[Plain [Str "This",Space,Str "list",Space,Str "is",Space,Str "closed",Space,Str "by",Space,Str "a",Space,Str "line",Space,Str "with",Space,Str "spaces",Space,Str "and",Space,Str "TAB,"]] + ,[Plain [Str "then",Space,Str "a",Space,Str "comment",Space,Str "line,",Space,Str "then",Space,Str "an",Space,Str "empty",Space,Str "line."]]] +,BulletList + [[Plain [Str "Level",Space,Str "1"] + ,BulletList + [[Plain [Str "Level",Space,Str "2"] + ,BulletList + [[Plain [Str "Level",Space,Str "3"]]] + ,Plain [Str "-",SoftBreak,Str "Level",Space,Str "2"]]] + ,Plain [Str "-",SoftBreak,Str "Level",Space,Str "1"]]] +,Para [Str "-"] +,BulletList + [[Plain [Str "Empty",Space,Str "item",Space,Str "with",Space,Str "trailing",Space,Str "spaces."]]] +,Para [Str "-"] +,BulletList + [[Plain [Str "Empty",Space,Str "item",Space,Str "with",Space,Str "trailing",Space,Str "TAB."]]] +,Para [Str "-"] +,BulletList + [[Plain [Str "If",Space,Str "the",Space,Str "end",Space,Str "of",Space,Str "the",Space,Str "file",Space,Str "(EOF)",Space,Str "is",Space,Str "hit,"] + ,BulletList + [[Plain [Str "all",Space,Str "the",Space,Str "currently",Space,Str "opened",Space,Str "list",Space,Str "are",Space,Str "closed,"] + ,BulletList + [[Plain [Str "just",Space,Str "like",Space,Str "when",Space,Str "using",Space,Str "the",Space,Str "two",Space,Str "blank",Space,Str "lines."]]]]]]] +,Header 1 ("table",[],[]) [Str "Table"] +,Table [] [AlignRight] [0.0] + [[]] + [[[Plain [Str "Cell",Space,Str "1"]]]] +,Table [] [AlignCenter,AlignCenter,AlignRight] [0.0,0.0,0.0] + [[] + ,[] + ,[]] + [[[Plain [Str "Cell",Space,Str "1"]] + ,[Plain [Str "Cell",Space,Str "2"]] + ,[Plain [Str "Cell",Space,Str "3"]]]] +,Table [] [AlignCenter,AlignCenter,AlignCenter] [0.0,0.0,0.0] + [[] + ,[] + ,[]] + [[[Plain [Str "Cell",Space,Str "1"]] + ,[Plain [Str "Cell",Space,Str "2"]] + ,[Plain [Str "Cell",Space,Str "3"]]]] +,Para [Str "||",Space,Str "Cell",Space,Str "1",Space,Str "|",Space,Str "Cell",Space,Str "2",Space,Str "|",Space,Str "Cell",Space,Str "3",Space,Str "|"] +,Table [] [AlignCenter,AlignCenter,AlignCenter] [0.0,0.0,0.0] + [[] + ,[] + ,[]] + [[[Plain [Str "Cell",Space,Str "1"]] + ,[Plain [Str "Cell",Space,Str "2"]] + ,[Plain [Str "Cell",Space,Str "3"]]]] +,Table [] [AlignDefault,AlignCenter,AlignDefault] [0.0,0.0,0.0] + [[Plain [Str "Heading"]] + ,[Plain [Str "Heading"]] + ,[Plain [Str "Heading"]]] + [[[Plain [Str "<-"]] + ,[Plain [Str "--"]] + ,[Plain [Str "->"]]] + ,[[Plain [Str "--"]] + ,[Plain [Str "--"]] + ,[Plain [Str "--"]]] + ,[[Plain [Str "->"]] + ,[Plain [Str "--"]] + ,[Plain [Str "<-"]]]] +,Table [] [AlignDefault,AlignDefault,AlignCenter,AlignCenter] [0.0,0.0,0.0,0.0] + [[Plain [Str "1"]] + ,[Plain [Str "2"]] + ,[Plain [Str "3+4"]] + ,[]] + [[[Plain [Str "1"]] + ,[Plain [Str "2"]] + ,[Plain [Str "3"]] + ,[Plain [Str "4"]]] + ,[[Plain [Str "1+2+3"]] + ,[Plain [Str "4"]] + ,[] + ,[]] + ,[[Plain [Str "1"]] + ,[Plain [Str "2+3"]] + ,[Plain [Str "4"]] + ,[]] + ,[[Plain [Str "1+2+3+4"]] + ,[] + ,[] + ,[]]] +,Table [] [AlignCenter,AlignCenter,AlignCenter,AlignCenter] [0.0,0.0,0.0,0.0] + [[] + ,[] + ,[] + ,[]] + [[[Plain [Str "0"]] + ,[Plain [Str "1"]] + ,[Plain [Str "2"]] + ,[]] + ,[[Plain [Str "4"]] + ,[Plain [Str "5"]] + ,[] + ,[Plain [Str "7"]]] + ,[[Plain [Str "8"]] + ,[] + ,[Plain [Str "A"]] + ,[Plain [Str "B"]]] + ,[[] + ,[Plain [Str "D"]] + ,[Plain [Str "E"]] + ,[Plain [Str "F"]]]] +,Table [] [AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter] [0.0,0.0,0.0,0.0,0.0] + [[] + ,[] + ,[] + ,[] + ,[]] + [[[Plain [Str "1"]] + ,[] + ,[] + ,[] + ,[]] + ,[[Plain [Str "1"]] + ,[Plain [Str "2"]] + ,[] + ,[] + ,[]] + ,[[Plain [Str "1"]] + ,[Plain [Str "2"]] + ,[Plain [Str "3"]] + ,[] + ,[]] + ,[[Plain [Str "1"]] + ,[Plain [Str "2"]] + ,[Plain [Str "3"]] + ,[Plain [Str "4"]] + ,[]] + ,[[Plain [Str "1"]] + ,[Plain [Str "2"]] + ,[Plain [Str "3"]] + ,[Plain [Str "4"]] + ,[Plain [Str "5"]]]] +,Table [] [AlignDefault,AlignCenter,AlignCenter,AlignCenter,AlignCenter] [0.0,0.0,0.0,0.0,0.0] + [[] + ,[] + ,[] + ,[] + ,[]] + [[[Plain [Str "Jan"]] + ,[] + ,[] + ,[] + ,[]] + ,[[Plain [Str "Fev"]] + ,[] + ,[] + ,[] + ,[]] + ,[[Plain [Str "Mar"]] + ,[] + ,[] + ,[] + ,[]] + ,[[Plain [Str "Apr"]] + ,[] + ,[] + ,[] + ,[]] + ,[[Plain [Str "May"]] + ,[] + ,[] + ,[] + ,[]] + ,[[Plain [Str "20%"]] + ,[Plain [Str "40%"]] + ,[Plain [Str "60%"]] + ,[Plain [Str "80%"]] + ,[Plain [Str "100%"]]]] +,Table [] [AlignCenter,AlignDefault,AlignDefault,AlignCenter,AlignCenter] [0.0,0.0,0.0,0.0,0.0] + [[] + ,[] + ,[] + ,[] + ,[]] + [[[] + ,[] + ,[Plain [Str "/"]] + ,[] + ,[]] + ,[[] + ,[Plain [Str "/",Space,Str "/",Space,Str "/",Space,Str "/",Space,Str "/"]] + ,[] + ,[] + ,[]] + ,[[Plain [Str "/",Space,Str "/",Space,Str "/",Space,Str "/",Space,Str "/",Space,Str "/",Space,Str "/",Space,Str "/",Space,Str "/"]] + ,[] + ,[] + ,[] + ,[]] + ,[[] + ,[Plain [Str "o"]] + ,[] + ,[Plain [Str "o"]] + ,[]] + ,[[] + ,[] + ,[Plain [Str "."]] + ,[] + ,[]] + ,[[] + ,[Plain [Str "=",Space,Str "=",Space,Str "=",Space,Str "="]] + ,[] + ,[] + ,[]]] +,Table [] [AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter] [0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0] + [[] + ,[] + ,[] + ,[] + ,[] + ,[] + ,[] + ,[]] + [[[Plain [Str "01"]] + ,[Plain [Str "02"]] + ,[] + ,[] + ,[Plain [Str "05"]] + ,[] + ,[Plain [Str "07"]] + ,[]] + ,[[] + ,[] + ,[Plain [Str "11"]] + ,[] + ,[Plain [Str "13"]] + ,[] + ,[] + ,[Plain [Str "16"]]] + ,[[Plain [Str "17"]] + ,[] + ,[Plain [Str "19"]] + ,[Plain [Str "20"]] + ,[] + ,[] + ,[Plain [Str "23"]] + ,[]] + ,[[Plain [Str "25"]] + ,[Plain [Str "26"]] + ,[] + ,[] + ,[Plain [Str "29"]] + ,[Plain [Str "30"]] + ,[] + ,[Plain [Str "32"]]] + ,[[] + ,[] + ,[Plain [Str "35"]] + ,[] + ,[Plain [Str "37"]] + ,[] + ,[Plain [Str "39"]] + ,[Plain [Str "40"]]]] +,Table [] [AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter,AlignCenter] [0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0] + [[] + ,[] + ,[] + ,[] + ,[] + ,[] + ,[] + ,[] + ,[] + ,[] + ,[] + ,[] + ,[] + ,[] + ,[] + ,[] + ,[] + ,[] + ,[] + ,[] + ,[] + ,[] + ,[] + ,[] + ,[] + ,[] + ,[] + ,[] + ,[] + ,[] + ,[] + ,[]] + [[[Plain [Str "0"]] + ,[Plain [Str "1"]] + ,[Plain [Str "2"]] + ,[Plain [Str "3"]] + ,[Plain [Str "4"]] + ,[Plain [Str "5"]] + ,[Plain [Str "6"]] + ,[Plain [Str "7"]] + ,[Plain [Str "8"]] + ,[Plain [Str "9"]] + ,[Plain [Str "A"]] + ,[Plain [Str "B"]] + ,[Plain [Str "C"]] + ,[Plain [Str "D"]] + ,[Plain [Str "E"]] + ,[Plain [Str "F"]] + ,[Plain [Str "0"]] + ,[Plain [Str "1"]] + ,[Plain [Str "2"]] + ,[Plain [Str "3"]] + ,[Plain [Str "4"]] + ,[Plain [Str "5"]] + ,[Plain [Str "6"]] + ,[Plain [Str "7"]] + ,[Plain [Str "8"]] + ,[Plain [Str "9"]] + ,[Plain [Str "A"]] + ,[Plain [Str "B"]] + ,[Plain [Str "C"]] + ,[Plain [Str "D"]] + ,[Plain [Str "E"]] + ,[Plain [Str "F"]]]] +,Table [] [AlignCenter] [0.0] + [[]] + [[[]] + ,[[]] + ,[[]]] +,Para [Str "|this|is|not|a|table|"] +,Para [Str "|this|",Space,Str "is|",Space,Str "not|",Space,Str "a|",Space,Str "table|"] +,Para [Str "|this",Space,Str "|is",Space,Str "|not",Space,Str "|a",Space,Str "|table",Space,Str "|"] +,Para [Str "|",Space,Str "this\t|",Space,Str "is\t|",Space,Str "not\t|",Space,Str "a\t|",Space,Str "table\t|"] +,HorizontalRule +,Para [Str "The",Space,Str "End."]] diff --git a/test/txt2tags.t2t b/test/txt2tags.t2t new file mode 100644 index 0000000..d374b7a --- /dev/null +++ b/test/txt2tags.t2t @@ -0,0 +1,797 @@ +Txt2tags Markup Rules +author +date +%!includeconf: rules.conf + +This document describes all the details about each txt2tags mark. +The target audience are **experienced** users. You may find it +useful if you want to master the marks or solve a specific problem +about a mark. + +If you are new to txt2tags or just want to know which are the +available marks, please read the [Markup Demo MARKUPDEMO]. + +Note 1: This document is generated directly from the txt2tags +test-suite. All the rules mentioned here are 100% in sync with the +current program code. + +Note 2: A good practice is to consult [the sources rules.t2t] when +reading, to see how the texts were made. + +Table of Contents: + +%%TOC + +------------------------------------------------------------- + += Paragraph =[paragraph] + +%INCLUDED(t2t) starts here: ../../../test/marks/paragraph.t2t + + +%%% Syntax: Lines grouped together +A paragraph is composed by one or more lines. +A blank line (or a table, or a list) ends the +current paragraph. + +%%% Syntax: Leading and trailing spaces are ignored + Leading and trailing spaces are ignored. + +%%% Syntax: A comment don't close a paragraph +A comment line can be placed inside a paragraph. +% this comment will be ignored +It will not affect it. + +%%% Closing: EOF closes the open paragraph +The end of the file (EOF) closes the +currently open paragraph. + += Comment =[comment] + +%INCLUDED(t2t) starts here: ../../../test/marks/comment.t2t + + +%%% Syntax: The % character at the line beginning (column 1) +%glued with the % mark +% separated from the % mark +% very distant from the % mark +%%%%%%% lots of % marks +% a blank comment, used for vertical spacing: +% +% NOTE: what matters is the first % being at the line beginning, +% the rest of the line is just ignored. + +%%% Syntax: Area (block) +%%% +You're not seeing this. +%%% + +%%% Syntax: Area (block) with trailing spaces +%%% +You're not seeing this. +%%% + +%%% Invalid: The % in any other position + % not on the line beginning (at column 2) + +some text % half line comments are not allowed + + += Line =[line] + +%INCLUDED(t2t) starts here: ../../../test/marks/line.t2t + + +%%% Syntax: At least 20 chars of - = _ +-------------------- +==================== +____________________ +%%% Syntax: Any kind of mixing is allowed +%% Free mixing is allowed to make the line, +%% but the first char is the identifier for +%% the difference between separator ( - _ ) +%% and strong ( = ) lines. +=========----------- +-_-_-_-_-_-_-_-_-_-_ +=-=-=-=-=-=-=-=-=-=- +=------------------= +--------====-------- +%%% Syntax: Leading and/or trailing spaces are allowed + -------------------- +-------------------- + -------------------- +%%% Invalid: Less than 20 chars (but strike matches) +--------- +%%% Invalid: Strange chars (but strike matches) +--------- ---------- + +---------+---------- + +( -------------------- ) + += Inline =[inline] + +%INCLUDED(t2t) starts here: ../../../test/marks/inline.t2t + + +%%% Syntax: Marks are greedy and must be "glued" with contents +%% GLUED: The contents must be glued with the marks, no spaces +%% between them. Right after the opening mark there must be a +%% non-blank character, as well as right before the closing mark. +%% +%% GREEDY: If the contents boundary character is the same as +%% the mark character, it is considered contents, not mark. +%% So ""****bold****"" turns to ""**bold**"" in HTML. + +i) **b** //i// __u__ --s-- ``m`` ""r"" ''t'' +i) **bo** //it// __un__ --st-- ``mo`` ""ra"" ''tg'' +i) **bold** //ital// __undr__ --strk-- ``mono`` ""raw"" ''tggd'' +i) **bo ld** //it al// __un dr__ --st rk-- ``mo no`` ""r aw"" ''tg gd'' +i) **bo * ld** //it / al// __un _ dr__ --st - rk-- ``mo ` no`` ""r " aw"" ''tg ' gd'' +i) **bo **ld** //it //al// __un __dr__ --st --rk-- ``mo ``no`` ""r ""aw"" ''tg ''gd'' +i) **bo ** ld** //it // al// __un __ dr__ --st -- rk-- ``mo `` no`` ""r "" aw"" ''tg '' gd'' +i) ****bold**** ////ital//// ____undr____ ----strk---- ````mono```` """"raw"""" ''''tggd'''' +i) ***bold*** ///ital/// ___undr___ ---strk--- ```mono``` """raw""" '''tggd''' + +%%% Syntax: Repetition is greedy +%% When the mark character is repeated many times, +%% the contents are expanded to the largest possible. +%% Thats why they are greedy, the outer marks are +%% the ones used. + +i) ***** ///// _____ ----- ````` """"" ''''' +i) ****** ////// ______ ------ `````` """""" '''''' +i) ******* /////// _______ ------- ``````` """"""" ''''''' +i) ******** //////// ________ -------- ```````` """""""" '''''''' +i) ********* ///////// _________ --------- ````````` """"""""" ''''''''' +i) ********** ////////// __________ ---------- `````````` """""""""" '''''''''' + +%%% Invalid: No contents + +i) **** //// ____ ---- ```` """" '''' +i) ** ** // // __ __ -- -- `` `` "" "" '' '' + +%%% Invalid: Contents not "glued" with marks +%% Spaces between the marks and the contents in any side +%% invalidate the mark. + +i) ** bold** // ital// __ undr__ -- strk-- `` mono`` "" raw"" '' tggd'' +i) **bold ** //ital // __undr __ --strk -- ``mono `` ""raw "" ''tggd '' +i) ** bold ** // ital // __ undr __ -- strk -- `` mono `` "" raw "" '' tggd '' + += Link =[link] + +%INCLUDED(t2t) starts here: ../../../test/marks/link.t2t + + +%%% Syntax: E-mail +user@domain.com +user@domain.com. +user@domain.com. any text. +any text: user@domain.com. any text. +[label user@domain.com] +%%% Syntax: E-mail with form data +user@domain.com?subject=bla +user@domain.com?subject=bla. +user@domain.com?subject=bla, +user@domain.com?subject=bla&cc=otheruser@domain.com +user@domain.com?subject=bla&cc=otheruser@domain.com. +user@domain.com?subject=bla&cc=otheruser@domain.com, +[label user@domain.com?subject=bla&cc=otheruser@domain.com]. +[label user@domain.com?subject=bla&cc=otheruser@domain.com.]. +%%% Syntax: URL +http://www.domain.com +http://www.domain.com/dir/ +http://www.domain.com/dir/// +http://www.domain.com. +http://www.domain.com, +http://www.domain.com. any text. +http://www.domain.com, any text. +http://www.domain.com/dir/. any text. +any text: http://www.domain.com. any text. +any text: http://www.domain.com/dir/. any text. +any text: http://www.domain.com/dir/index.html. any text. +any text: http://www.domain.com/dir/index.html, any text. +%%% Syntax: URL with anchor +http://www.domain.com/dir/#anchor +http://www.domain.com/dir/index.html#anchor +http://www.domain.com/dir/index.html#anchor. +http://www.domain.com/dir/#anchor. any text. +http://www.domain.com/dir/index.html#anchor. any text. +any text: http://www.domain.com/dir/#anchor. any text. +any text: http://www.domain.com/dir/index.html#anchor. any text. +%%% Syntax: URL with form data +http://domain.com?a=a@a.a&b=a+b+c. +http://domain.com?a=a@a.a&b=a+b+c, +http://domain.com/bla.cgi?a=a@a.a&b=a+b+c. +http://domain.com/bla.cgi?a=a@a.a&b=a+b+c@. +%%% Syntax: URL with form data and anchor +http://domain.com?a=a@a.a&b=a+b+c.#anchor +http://domain.com/bla.cgi?a=a@a.a&b=a+b+c.#anchor +http://domain.com/bla.cgi?a=a@a.a&b=a+b+c@.#anchor +%%% Syntax: URL with login data +http://user:password@domain.com/bla.html. +http://user:password@domain.com/dir/. +http://user:password@domain.com. +http://user:@domain.com. +http://user@domain.com. +%%% Syntax: URL with login, form and anchor +http://user:password@domain.com/bla.cgi?a=a@a.a&b=a+b+c.#anchor +http://user:password@domain.com/bla.cgi?a=a@a.a&b=a+b+c@#anchor +%%% Syntax: URL with label +[label www.domain.com] +%%% Syntax: URL with label (trailing spaces are discarded, leading are maintained) +%TODO normalize this behavior +[ label www.domain.com] +[label www.domain.com] +%%% Syntax: URL with label, stressing +[anchor http://www.domain.com/dir/index.html#anchor.] +[login http://user:password@domain.com/bla.html] +[form http://www.domain.com/bla.cgi?a=a@a.a&b=a+b+c.] +[form & anchor http://www.domain.com/bla.cgi?a=a@a.a&b=a+b+c.#anchor] +[login & form http://user:password@domain.com/bla.cgi?a=a@a.a&b=a+b+c.] +%%% Syntax: Link with label for local files +[local link up ..] +[local link file bla.html] +[local link anchor #anchor] +[local link file/anchor bla.html#anchor] +[local link file/anchor bla.html#anchor.] +[local link img abc.gif] +%%% Syntax: Another link as a label +[www.fake.com www.domain.com] +%%% Syntax: URL with funny chars +http://domain.com:8080/~user/_st-r@a=n$g,e/index%20new.htm +http://domain.com:8080/~user/_st-r@a=n$g,e/index%20new.htm?a=/%22&b=+.@*_- +http://domain.com:8080/~user/_st-r@a=n$g,e/index%20new.htm?a=/%22&b=+.@*_-#anchor_-1%. +http://foo._user-9:pass!#$%&*()+word@domain.com:8080/~user/_st-r@a=n$g,e/index%20new.htm?a=/%22&b=+.@*_-#anchor_-1%. +%%% Test: Various per line +http://L1.com ! L2@www.com ! [L3 www.com] ! [L4 w@ww.com] ! www.L5.com +%%% Feature: Guessed link, adding protocol automatically +www.domain.com +www2.domain.com +ftp.domain.com +WWW.DOMAIN.COM +FTP.DOMAIN.COM +[label www.domain.com] +[label ftp.domain.com] +[label WWW.DOMAIN.COM] +[label FTP.DOMAIN.COM] +%%% Invalid: Trailing space on link +[label www.domain.com ] +%%% Invalid: Label with ] char (use postproc) +[label] www.domain.com] + += Image =[image] + +%INCLUDED(t2t) starts here: ../../../test/marks/image.t2t + + +%%% Syntax: Image name inside brackets: [img] +[img.png] + +%%% Syntax: Image pointing to a link: [[img] link] +[[img.png] http://txt2tags.org] + +%%% Align: Image position is preserved when inside paragraph +[img.png] Image at the line beginning. + +Image in the middle [img.png] of the line. + +Image at the line end. [img.png] + +%%% Align: Image alone with spaces around is aligned +[img.png] + [img.png] + [img.png] + +%%% Test: Two glued images with no spaces (left & right) +[img.png][img.png] + +%%% Test: Various per line +Images [img.png] mixed [img.png] with [img.png] text. + +Images glued together: [img.png][img.png][img.png]. + +%%% Invalid: Spaces inside are not allowed +[img.png ] + +[ img.png] + +[ img.png ] + +% Ignored as they change every time when run + += Numbered Title =[numtitle] + +%%% Syntax: Balanced equal signs (from 1 to 5) ++ Title Level 1 + +++ Title Level 2 ++ ++++ Title Level 3 +++ +++++ Title Level 4 ++++ ++++++ Title Level 5 +++++ +%%% Label: Between brackets, alphanumeric [A-Za-z0-9_-] ++ Title Level 1 +[lab_el-1] +++ Title Level 2 ++[lab_el-2] ++++ Title Level 3 +++[lab_el-3] +++++ Title Level 4 ++++[lab_el-4] ++++++ Title Level 5 +++++[lab_el-5] +%%% Syntax: Spaces around and/or inside are allowed (and ignored) + +++Title Level 3+++ + +++ Title Level 3 +++ + +++ Title Level 3 +++ ++++ Title Level 3 +++ ++++ Title Level 3 +++ + +++ Title Level 3 +++[lab_el-9] +%%% Invalid: Unbalanced equal signs + +Not Title + + ++Not Title+ + + +++Not Title++++ +%%% Invalid: Level deeper than 5 + ++++++Not Title 6++++++ + ++++++++Not Title 7+++++++ +%%% Invalid: Space between title and label ++Not Title+ [label1] +%%% Invalid: Space inside label ++Not Title+[ label ] +%%% Invalid: Strange chars inside label ++Not Title+[la/bel] + += Title =[title] + +%INCLUDED(t2t) starts here: ../../../test/marks/title.t2t + + +%%% Syntax: Balanced equal signs (from 1 to 5) += Title Level 1 = +== Title Level 2 == +=== Title Level 3 === +==== Title Level 4 ==== +===== Title Level 5 ===== +%%% Label: Between brackets, alphanumeric [A-Za-z0-9_-] += Title Level 1 =[lab_el-1] +== Title Level 2 ==[lab_el-2] +=== Title Level 3 ===[lab_el-3] +==== Title Level 4 ====[lab_el-4] +===== Title Level 5 =====[lab_el-5] +%%% Syntax: Spaces around and/or inside are allowed (and ignored) + ===Title Level 3=== + === Title Level 3 === + === Title Level 3 === +=== Title Level 3 === +=== Title Level 3 === + === Title Level 3 ===[lab_el-9] +%%% Invalid: Unbalanced equal signs + =Not Title + + ==Not Title= + + ===Not Title==== +%%% Invalid: Level deeper than 5 + ======Not Title 6====== + +=======Not Title 7======= +%%% Invalid: Space between title and label +=Not Title= [label1] +%%% Invalid: Space inside label +=Not Title=[ label ] +%%% Invalid: Strange chars inside label +=Not Title=[la/bel] + += Quote =[quote] + +%INCLUDED(t2t) starts here: ../../../test/marks/quote.t2t + + + To quote a paragraph, just prefix it by a TAB + character. All the lines of the paragraph must + begin with a TAB. +Any non-tabbed line closes the quote block. + +%%% Nesting: Creating deeper quotes + The number of leading TABs identifies the quote + block depth. This is quote level 1. + With two TABs, we are on the quote + level 2. + The more TABs, more deep is + the quote level. + There isn't a limit. + +%%% Nesting: Reverse nesting works + This quote starts at + level 4. + Then its depth is decreased. + Counting down, one by one. + Until the level 1. + +%%% Nesting: Random count + Unlike lists, any quote block is + independent, not part of a tree. + The TAB count don't need to be incremental + by one. + The nesting don't need + to follow any rule. + Quotes can be opened and closed + in any way. + You choose. + +%%% Nesting: When not supported + Some targets (as sgml) don't support the + nesting of quotes. There is only one quote + level. + In this case, no matter how much + TABs are used to define the quote + block, it always will be level 1. + +%%% Syntax: Spaces after TAB + Spaces AFTER the TAB character are allowed. + But be careful, it can be confusing. + +%%% Invalid: Spaces before TAB + Spaces BEFORE the TAB character + invalidate the mark. It's not quote. + +%%% Invalid: Paragraphs inside + Paragraph breaks inside a quote aren't + possible. + + This sample are two separated quoted + paragraphs, not a quote block with + two paragraphs inside. + +%%% Closing: EOF closes the open block + The end of the file (EOF) closes the + currently open quote block. + += Raw =[raw] + +%%% Syntax: A single line +""" A raw line. + +%%% Syntax: A single line with leading spaces +""" Another raw line, with leading spaces. + +%%% Syntax: Area (block) +""" +A raw area delimited + by lines with marks. +""" + +%%% Syntax: Area (block) with trailing spaces +""" +Trailing spaces and TABs after the area marks +are allowed, but not encouraged nor documented. +""" + +%%% Invalid: No space between mark and contents +"""Not a raw line, need one space after mark. + +%%% Invalid: Leading spaces on block marks + """ + Not a raw area. + The marks must be at the line beginning, + no leading spaces. + """ + +%%% Closing: EOF closes the open block +""" +The end of the file (EOF) closes +the currently open raw area. +""" + += Verbatim =[verbatim] + +%INCLUDED(t2t) starts here: ../../../test/marks/verbatim.t2t + + +%%% Syntax: A single line +``` A verbatim line. + +%%% Syntax: A single line with leading spaces +``` Another verbatim line, with leading spaces. + +%%% Syntax: Area (block) +``` +A verbatim area delimited + by lines with marks. +``` + +%%% Syntax: Area (block) with trailing spaces +``` +Trailing spaces and TABs after the area marks +are allowed, but not encouraged nor documented. +``` + +%%% Invalid: No space between mark and contents +```Not a verbatim line, need one space after mark. + +%%% Invalid: Leading spaces on block marks + ``` + Not a verbatim area. + The marks must be at the line beginning, + no leading spaces. + ``` + +%%% Closing: EOF closes the open block +``` +The end of the file (EOF) closes +the currently open verbatim area. +``` + += Definition List =[deflist] + +: Definition list + A list with terms +: Start term with colon + And its definition follows + + += Numbered List =[numlist] + +See [List #list], the same rules apply. + += List =[list] + +%INCLUDED(t2t) starts here: ../../../test/marks/list.t2t + + +%%% Items: Prefixed by hyphen +- Use the hyphen to prefix list items. +- There must be one space after the hyphen. +- The list is closed by two consecutive blank lines. + + +%%% Items: Free leading spacing (indentation) + - The list can be indented on the source document. + - You can use any number of spaces. + - The result will be the same. + + +%%% Items: Vertical spacing between items +- Let one blank line between the list items. + +- It will be maintained on the conversion. + +- Some targets don't support this behavior. + +- This one was separated by a line with blanks. + You can also put a blank line inside + + the item contents and it will be preserved. + + +%%% Items: Exactly ONE space after the hyphen +-This is not a list (no space) + +- This is not a list (more than one space) + +- This is not a list (a TAB instead the space) + + +%%% Items: Catchy cases +- - This is a list +- + This is a list +- : This is a list + + +%%% Nesting: Creating sublists +- This is the "mother" list first item. +- Here is the second, but inside this item, + - there is a sublist, with its own items. + - Note that the items of the same sublist + - must have the same indentation. + - And this can go on, opening sublists. + - Just add leading spaces before the + - hyphen and sublists will be opened. + - The two blank lines closes them all. + + +%%% Nesting: Free leading spacing (indentation) +- When nesting lists, the additional spaces are free. + - You can add just one, + - or many. + - What matters is to put more than the previous. + - But remember that the other items of the same list + - must use the same indentation. + + +%%% Nesting: Maximum depth +- There is not a depth limit, + - you can go deeper and deeper. + - But some targets may have restrictions. + - The LaTeX maximum is here, 4 levels. + + +%%% Nesting: Reverse doesn't work + - Reverse nesting doesn't work. + - Because a sublist *must* have a mother list. + - It's the list concept, not a txt2tags limitation. + - All this sublists will be bumped to mother lists. +- At level 1, like this one. + + +%%% Nesting: Going deeper and back + +%% When nesting back to an upper level, the previous sublist +%% is automatically closed. +- Level 1 + - Level 2 + - Level 3 + - Level 4 + - Level 3 -- (closed Level 4) + - Level 2 -- (closed Level 3) +- Level 1 -- (closed Level 2) + + +%% More than one list can be closed when nesting back. +- Level 1 + - Level 2 + - Level 3 + - Level 4 +- Level 1 -- (closed Level 4, Level 3 and Level 2) + + +%%% Nesting: Vertical spacing between lists +- Level 1 + + - Level 2 -- blank BEFORE and AFTER (in) + + - Level 3 +% comment lines are NOT considered blank lines + - Level 4 +% comment lines are NOT considered blank lines + - Level 3 + + - Level 2 -- blank BEFORE and AFTER (out) + +- Level 1 + + - Level 2 -- blank BEFORE (spaces) and AFTER (TAB) + + - Level 3 + + +%%% Nesting: Messing up +%% Be careful when going back on the nesting, +%% it must be on a valid level! If not, it will +%% be bumped up to the previous valid level. +- Level 1 + - Level 2 + - Level 3 + - Level 4 + - Level 3.5 ??? + - Level 3 + - Level 2.5 ??? + - Level 2 + - Level 1.5 ??? +- Level 1 + + +%%% Closing: Two (not so) empty lines +- This list is closed by a line with spaces and other with TABs + + +- This list is NOT closed by two comment lines +% comment lines are NOT considered blank lines +% comment lines are NOT considered blank lines +- This list is closed by a line with spaces and TAB, +- then a comment line, then an empty line. + +% comment lines are NOT considered blank lines + +%%% Closing: Empty item closes current (sub)list + +%% The two blank lines closes ALL the lists. +%% To close just the current, use an empty item. +- Level 1 + - Level 2 + - Level 3 + - + Level 2 + - + Level 1 +- + +%% The empty item can have trailing blanks. +- Empty item with trailing spaces. +- + +- Empty item with trailing TAB. +- + +%%% Closing: EOF closes the lists +- If the end of the file (EOF) is hit, + - all the currently opened list are closed, + - just like when using the two blank lines. + + += Table =[table] + +%INCLUDED(t2t) starts here: ../../../test/marks/table.t2t + +%%% Syntax: Lines starting with a pipe | +| Cell 1 + +%%% Syntax: Extra pipes separate cells +| Cell 1 | Cell 2 | Cell 3 + +%%% Syntax: With a trailing pipe, make border +| Cell 1 | Cell 2 | Cell 3 | + +%%% Syntax: Table lines starting with double pipe are heading +|| Cell 1 | Cell 2 | Cell 3 | + +%%% Align: Spaces before the leading pipe centralize the table + | Cell 1 | Cell 2 | Cell 3 | + +%%% Align: Spaces inside the cell denote its alignment + || Heading | Heading | Heading | +% comments don't close an opened table + | <- | -- | -> | + | -- | -- | -- | + | -> | -- | <- | + +%%% Span: Column span is defined by extra pipes at cell closing + || 1 | 2 | 3+4 || + | 1 | 2 | 3 | 4 | + | 1+2+3 ||| 4 | + | 1 | 2+3 || 4 | + | 1+2+3+4 |||| + +%%% Test: Empty cells are placed as expected + | 0 | 1 | 2 | | + | 4 | 5 | | 7 | + | 8 | | A | B | + | | D | E | F | + +%%% Test: Lines with different number of cells + | 1 | + | 1 | 2 | + | 1 | 2 | 3 | + | 1 | 2 | 3 | 4 | + | 1 | 2 | 3 | 4 | 5 | + +%%% Test: Empty cells + Span + Messy cell number = Fun! + | Jan | + | Fev || + | Mar ||| + | Apr |||| + | May ||||| + | 20% | 40% | 60% | 80% | 100% | + + | | | / | | | + | | / / / / / ||| | + | / / / / / / / / / ||||| + | | o | | o | | + | | | . | | | + | | = = = = ||| | + + | 01 | 02 | | | 05 | | 07 | | + | | | 11 | | 13 | | | 16 | + | 17 | | 19 | 20 | | | 23 | | + | 25 | 26 | | | 29 | 30 | | 32 | + | | | 35 | | 37 | | 39 | 40 | + +%%% Test: Lots of cells at the same line +| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F | + +%%% Test: Empty lines +| | +| | +| | + +%%% Invalid: There must be at least one space around the pipe +|this|is|not|a|table| + +|this| is| not| a| table| + +|this |is |not |a |table | + +%%% Invalid: You must use spaces, not TABs +| this | is | not | a | table | + +------------------------------------------------------------ + +The End. diff --git a/test/vimwiki-reader.native b/test/vimwiki-reader.native new file mode 100644 index 0000000..8c9bff3 --- /dev/null +++ b/test/vimwiki-reader.native @@ -0,0 +1,309 @@ +Pandoc (Meta {unMeta = fromList [("date",MetaInlines [Str "2017-05-01"]),("title",MetaInlines [Str "title"])]}) +[Header 1 ("implemented",[],[]) [Emph [Span ("implemented",[],[]) [],Strong [Str "implemented"]]] +,Header 1 ("header",[],[]) [Str "header"] +,Header 2 ("header level two",[],[]) [Str "header",Space,Str "level",Space,Str "two"] +,Header 3 ("header level 3",[],[]) [Str "header",Space,Code ("",[],[]) "level",Space,Str "3"] +,Header 4 ("header level four",[],[]) [Str "header",Space,Strikeout [Str "level"],Space,Str "four"] +,Header 5 ("header level 5",[],[]) [Str "header",Space,Emph [Span ("level",[],[]) [],Strong [Str "level"],Space,Str "5"]] +,Header 6 ("header level 6",[],[]) [Str "header",Space,Str "level",Space,Str "6"] +,Para [Str "=======",Space,Str "not",Space,Str "a",Space,Str "header",Space,Str "========"] +,Para [Str "hi==",Space,Str "not",Space,Str "a",Space,Str "header",Space,Str "=="] +,Para [Str "===",Space,Str "not",Space,Str "a",Space,Str "header",Space,Str "=="] +,Para [Str "===",Space,Str "not",Space,Str "a",Space,Str "header",Space,Str "===-"] +,Para [Str "not",Space,Str "a",Space,Str "header:"] +,Para [Str "=n="] +,Para [Str "===",Space,Str "not",Space,Str "a",Space,Str "header",Space,Str "===="] +,Header 2 ("centred header",["justcenter"],[]) [Str "centred",Space,Str "header"] +,Header 2 ("header with some == in between",[],[]) [Str "header",Space,Str "with",Space,Str "some",Space,Code ("",[],[]) "==",Space,Str "in",Space,Str "between"] +,Header 2 ("header with some == in between",[],[]) [Str "header",Space,Str "with",Space,Str "some",Space,Str "==",Space,Str "in",Space,Str "between"] +,Header 2 ("header with some ==in between",[],[]) [Str "header",Space,Str "with",Space,Str "some",Space,Str "==in",Space,Str "between"] +,Header 2 ("emph strong and strikeout",[],[]) [Str "emph",Space,Str "strong",Space,Str "and",Space,Str "strikeout"] +,Para [Emph [Str "emph"],Space,Span ("strong",[],[]) [],Strong [Str "strong"]] +,Para [Span ("strong and emph",[],[]) [],Strong [Emph [Str "strong",Space,Str "and",Space,Str "emph"]]] +,Para [Emph [Span ("emph and strong",[],[]) [],Strong [Str "emph",Space,Str "and",Space,Str "strong"]]] +,Para [Span ("emph inside strong",[],[]) [],Strong [Emph [Str "emph",Space,Str "inside"],Space,Str "strong"]] +,Para [Span ("strong with emph",[],[]) [],Strong [Str "strong",Space,Str "with",Space,Emph [Str "emph"]]] +,Para [Emph [Span ("strong inside",[],[]) [],Strong [Str "strong",Space,Str "inside"],Space,Str "emph"]] +,Para [Emph [Strikeout [Str "strikeout"],Space,Str "inside",Space,Str "emph"]] +,Para [Strikeout [Str "This",Space,Str "is",Space,Emph [Str "struck",Space,Str "out"],Space,Str "with",Space,Str "emph"]] +,Para [Str "*not",SoftBreak,Str "strong*"] +,Para [Str "just",Space,Str "two",Space,Str "stars:",Space,Str "**"] +,Para [Str "just",Space,Str "two",Space,Str "underscores:",Space,Str "__"] +,Para [Str "just",Space,Str "four",Space,Str "~s:",Space,Str "~~~~"] +,Para [Str "_not",SoftBreak,Str "emph_"] +,Para [Str "~~not",SoftBreak,Str "strikeout~~"] +,Header 2 ("horizontal rule",[],[]) [Str "horizontal",Space,Str "rule"] +,Para [Str "top"] +,HorizontalRule +,Para [Str "middle"] +,HorizontalRule +,Para [Str "not",Space,Str "a",Space,Str "rule-----"] +,Para [Str "not",Space,Str "a",Space,Str "rule",Space,Str "(trailing",Space,Str "spaces):",SoftBreak,Str "-----"] +,Para [Str "not",Space,Str "a",Space,Str "rule",Space,Str "(leading",Space,Str "spaces):",SoftBreak,Str "----"] +,Header 2 ("comments",[],[]) [Str "comments"] +,Para [Str "this",SoftBreak,Str "is",Space,Str "%%",Space,Str "not",Space,Str "secret"] +,Header 2 ("inline code",[],[]) [Str "inline",Space,Str "code"] +,Para [Str "Here",Space,Str "is",Space,Str "some",Space,Code ("",[],[]) "inline code",Str "."] +,Para [Str "Just",Space,Str "two",Space,Str "backticks:",Space,Str "``"] +,Header 2 ("preformatted text",[],[]) [Str "preformatted",Space,Str "text"] +,CodeBlock ("",[],[]) " Tyger! Tyger! burning bright\n In the forests of the night,\n What immortal hand or eye\n Could frame thy fearful symmetry?\n In what distant deeps or skies\n Burnt the fire of thine eyes?\n On what wings dare he aspire?\n What the hand dare sieze the fire?" +,Header 3 ("preformatted text with attributes",[],[]) [Str "preformatted",Space,Str "text",Space,Str "with",Space,Str "attributes"] +,CodeBlock ("",[],[("class","python"),("style","color:blue")]) " for i in range(1, 5):\n print(i)" +,Header 2 ("block quotes",[],[]) [Str "block",Space,Str "quotes"] +,BlockQuote + [Plain [Str "(indentation",Space,Str "4",Space,Str "spaces)",Space,Str "This",Space,Str "would",Space,Str "be",Space,Str "a",Space,Str "blockquote",Space,Str "in",Space,Str "Vimwiki.",Space,Str "It",Space,Str "is",Space,Str "not",Space,Span ("highlighted",[],[]) [],Strong [Str "highlighted"],Space,Str "in",Space,Str "Vim",Space,Str "but",SoftBreak,Str "(indentation",Space,Str "1",Space,Str "space",Space,Str "followed",Space,Str "by",Space,Str "1",Space,Str "tab",Space,Str "of",Space,Str "width",Space,Str "4)",Space,Str "could",Space,Str "be",Space,Str "styled",Space,Str "by",Space,Str "CSS",Space,Str "in",Space,Str "HTML.",Space,Str "Blockquotes",Space,Str "are",Space,Str "usually",Space,Str "used",Space,Str "to",Space,Str "quote",Space,Str "a",SoftBreak,Str "(indentation",Space,Str "1",Space,Str "tab",Space,Str "of",Space,Str "width",Space,Str "4)",Space,Str "long",Space,Str "piece",Space,Str "of",Space,Str "text",Space,Str "from",Space,Str "another",Space,Str "source.",Space,Strikeout [Str "blah",Space,Str "blah"],Space,Span ("-blockquote",[],[]) [Str ""],Span ("blockquote",["tag"],[]) [Str "blockquote"]]] +,Header 2 ("external links",[],[]) [Str "external",Space,Str "links"] +,Para [Link ("",[],[]) [Emph [Str "Google"],Space,Str "search",Space,Str "engine"] ("http://google.com","")] +,Para [Link ("",[],[]) [Str "http://pandoc.org"] ("http://pandoc.org","")] +,Para [Link ("",[],[]) [Str "ftp://vim.org"] ("ftp://vim.org","")] +,Para [Link ("",[],[]) [Str "http://google.com"] ("http://google.com","")] +,Para [Link ("",[],[]) [Str "email",Space,Str "me"] ("mailto:info@example.org","")] +,Para [Link ("",[],[]) [Str "mailto:hello@bye.com"] ("mailto:hello@bye.com","")] +,Header 2 ("internal links",[],[]) [Str "internal",Space,Str "links"] +,Para [Link ("",[],[]) [Str "This is a link"] ("This is a link.html","")] +,Para [Link ("",[],[]) [Str "Description",Space,Str "of",Space,Str "the",Space,Str "link"] ("This is a link source.html","")] +,Para [Link ("",[],[]) [Str "projects/Important Project 1"] ("projects/Important Project 1.html",""),SoftBreak,Link ("",[],[]) [Str "../index"] ("../index.html",""),SoftBreak,Link ("",[],[]) [Str "Other",Space,Str "files"] ("a subdirectory/","")] +,Para [Link ("",[],[]) [Str "try",Space,Str "me",Space,Str "to",Space,Str "test",Space,Str "tag",Space,Str "anchors"] ("#tag-one","")] +,Para [Link ("",[],[]) [Str "try",Space,Str "me",Space,Str "to",Space,Str "test",Space,Str "header",Space,Str "anchors"] ("#block quotes","")] +,Para [Link ("",[],[]) [Str "try",Space,Str "me",Space,Str "to",Space,Str "test",Space,Str "strong",Space,Str "anchors"] ("#strong","")] +,Para [Link ("",[],[]) [Str "Tasks",Space,Str "for",Space,Str "tomorrow"] ("Todo List.html#Tomorrow","")] +,Para [Link ("",[],[]) [Str "diary:2017-05-01"] ("diary/2017-05-01.html","")] +,Para [Link ("",[],[]) [Str "Important",Space,Str "Data"] ("file:../assets/data.csv","")] +,Header 3 ("links with thumbnails",[],[]) [Str "links",Space,Str "with",Space,Str "thumbnails"] +,Para [Link ("",[],[]) [Image ("",[],[]) [Str ""] ("./movie.jpg","")] ("http://www.google.com","")] +,Header 2 ("images",[],[]) [Str "images"] +,Para [Image ("",[],[]) [Str ""] ("file:./lalune.jpg","")] +,Para [Image ("",[],[]) [Str "Vimwiki"] ("http://vimwiki.googlecode.com/hg/images/vimwiki_logo.png",""),SoftBreak,Image ("",[],[]) [Str ""] ("file:./movie.jpg","")] +,Header 3 ("image with attributes",[],[]) [Str "image",Space,Str "with",Space,Str "attributes"] +,Para [Image ("",[],[("style","width:150px;height:120px;")]) [Emph [Str "cool",Space,Str "stuff"]] ("lalune.jpg","")] +,Para [Image ("",[],[("style","font-color:red")]) [Span ("Non-existing",[],[]) [],Strong [Str "Non-existing"],Space,Str "image"] ("nonexist.jpg","")] +,Para [Image ("",[],[("style","width:150px;height:120px;")]) [Emph [Str "cool",Space,Str "stuff"]] ("lalune.jpg","")] +,Header 2 ("lists",[],[]) [Str "lists"] +,OrderedList (1,DefaultStyle,DefaultDelim) + [[Plain [Str "ordered",Space,Str "list",Space,Str "item",Space,Str "1,",Space,Str "and",Space,Str "here",Space,Str "is",Space,Str "some",Space,Str "math",Space,Str "belonging",Space,Str "to",Space,Str "list",Space,Str "item",Space,Str "1"] + ,Para [Math DisplayMath "a^2 + b^2 = c^2"] + ,Plain [Str "and",Space,Str "some",Space,Str "preformatted",Space,Str "and",Space,Str "tables",Space,Str "belonging",Space,Str "to",Space,Str "item",Space,Str "1",Space,Str "as",Space,Str "well"] + ,CodeBlock ("",[],[]) "I'm part of item 1." + ,Table [] [AlignDefault,AlignDefault] [0.0,0.0] + [[] + ,[]] + [[[Plain [Str "this",Space,Str "table"]] + ,[Plain [Str "is"]]] + ,[[Plain [Str "also",Space,Str "a",Space,Str "part"]] + ,[Plain [Str "of",Space,Str "item",Space,Str "1"]]]] + ,Plain [Str "and",Space,Str "some",Space,Str "more",Space,Str "text",Space,Str "belonging",Space,Str "to",Space,Str "item",Space,Str "1."]] + ,[Plain [Str "ordered",Space,Str "list",Space,Str "item",Space,Str "2"]]] +,BulletList + [[Plain [Str "Bulleted",Space,Str "list",Space,Str "item",Space,Str "1"]] + ,[Plain [Str "Bulleted",Space,Str "list",Space,Str "item",Space,Str "2"]]] +,OrderedList (1,DefaultStyle,DefaultDelim) + [[Plain [Str "Bulleted",Space,Str "list",Space,Str "item",Space,Str "1"]] + ,[Plain [Str "the",Space,Str "#",Space,Str "become",Space,Str "numbers",Space,Str "when",Space,Str "converted",Space,Str "to",Space,Str "HTML"]]] +,BulletList + [[Plain [Str "Bulleted",Space,Str "list",Space,Str "item",Space,Str "1"]] + ,[Plain [Str "Bulleted",Space,Str "list",Space,Str "item",Space,Str "2"]]] +,BulletList + [[Plain [Str "Item",Space,Str "1"]] + ,[Plain [Str "Item",Space,Str "2"] + ,OrderedList (1,DefaultStyle,DefaultDelim) + [[Plain [Str "Sub",Space,Str "item",Space,Str "1",Space,Str "(indentation",Space,Str "4",Space,Str "spaces)",SoftBreak,Str "Sub",Space,Str "item",Space,Str "1",Space,Str "continued",Space,Str "line.",SoftBreak,Str "Sub",Space,Str "item",Space,Str "1",Space,Str "next",Space,Str "continued",Space,Str "line."]] + ,[Plain [Str "Sub",Space,Str "item",Space,Str "2,",Space,Str "as",Space,Str "an",Space,Str "ordered",Space,Str "list",Space,Str "item",Space,Str "even",Space,Str "though",Space,Str "the",Space,Str "identifier",Space,Str "is",Space,Code ("",[],[]) "*",Space,Str "(indentation",Space,Str "2",Space,Str "spaces",Space,Str "followed",Space,Str "by",Space,Str "one",Space,Str "tab",Space,Str "of",Space,Str "width",Space,Str "4)"]] + ,[Plain [Str "etc.",SoftBreak,Str "Continuation",Space,Str "of",Space,Str "Item",Space,Str "2",SoftBreak,Str "Next",Space,Str "continuation",Space,Str "of",Space,Str "Item",Space,Str "2"]]]]] +,Para [Str "But",Space,Str "this",Space,Str "is",Space,Str "a",Space,Str "new",Space,Str "paragraph."] +,OrderedList (1,DefaultStyle,DefaultDelim) + [[Plain [Str "1"] + ,BulletList + [[Plain [Code ("",[],[]) "1.1"]]]] + ,[Plain [Str "2"] + ,BulletList + [[Plain [Str "2.1"]]]]] +,BulletList + [[Plain [Str "3"]]] +,Header 3 ("ordered lists with non-# identifiers",[],[]) [Str "ordered",Space,Str "lists",Space,Str "with",Space,Str "non-#",Space,Str "identifiers"] +,OrderedList (1,DefaultStyle,DefaultDelim) + [[Plain [Str "Numbered",Space,Str "list",Space,Str "item",Space,Str "1"]] + ,[Plain [Str "Numbered",Space,Str "list",Space,Str "item",Space,Str "2"]] + ,[Plain [Str "Numbered",Space,Str "list",Space,Str "item",Space,Str "3"]]] +,OrderedList (1,DefaultStyle,DefaultDelim) + [[Plain [Str "Numbered",Space,Str "list",Space,Str "item",Space,Str "1"]] + ,[Plain [Str "Numbered",Space,Str "list",Space,Str "item",Space,Str "2"]] + ,[Plain [Str "Numbered",Space,Str "list",Space,Str "item",Space,Str "3"]]] +,OrderedList (1,DefaultStyle,DefaultDelim) + [[Plain [Str "Numbered",Space,Str "list",Space,Str "item",Space,Str "1"]] + ,[Plain [Str "Numbered",Space,Str "list",Space,Str "item",Space,Str "2"]] + ,[Plain [Str "Numbered",Space,Str "list",Space,Str "item",Space,Str "3"]]] +,OrderedList (1,DefaultStyle,DefaultDelim) + [[Plain [Str "Numbered",Space,Str "list",Space,Str "item",Space,Str "1"]] + ,[Plain [Str "Numbered",Space,Str "list",Space,Str "item",Space,Str "2"]] + ,[Plain [Str "Numbered",Space,Str "list",Space,Str "item",Space,Str "3"]]] +,OrderedList (1,DefaultStyle,DefaultDelim) + [[Plain [Str "Numbered",Space,Str "list",Space,Str "item",Space,Str "1"]] + ,[Plain [Str "Numbered",Space,Str "list",Space,Str "item",Space,Str "2"]] + ,[Plain [Str "Numbered",Space,Str "list",Space,Str "item",Space,Str "3"]]] +,OrderedList (1,DefaultStyle,DefaultDelim) + [[Plain [Str "Numbered",Space,Str "list",Space,Str "item",Space,Str "1"]] + ,[Plain [Str "Numbered",Space,Str "list",Space,Str "item",Space,Str "2"]] + ,[Plain [Str "Numbered",Space,Str "list",Space,Str "item",Space,Str "3"]]] +,OrderedList (1,DefaultStyle,DefaultDelim) + [[Plain [Str "Numbered",Space,Str "list",Space,Str "item",Space,Str "1"]] + ,[Plain [Str "Numbered",Space,Str "list",Space,Str "item",Space,Str "2"]] + ,[Plain [Str "Numbered",Space,Str "list",Space,Str "item",Space,Str "3"]]] +,BulletList + [[Plain [Str "Bulleted",Space,Str "list",Space,Str "item",Space,Str "1"]] + ,[Plain [Str "Bulleted",Space,Str "list",Space,Str "item",Space,Str "2"] + ,OrderedList (1,DefaultStyle,DefaultDelim) + [[Plain [Str "Numbered",Space,Str "list",Space,Str "sub",Space,Str "item",Space,Str "1"]] + ,[Plain [Str "more",Space,Str "..."] + ,BulletList + [[Plain [Str "and",Space,Str "more",Space,Str "..."]] + ,[Plain [Str "..."]]]] + ,[Plain [Str "Numbered",Space,Str "list",Space,Str "sub",Space,Str "item",Space,Str "3"] + ,OrderedList (1,DefaultStyle,DefaultDelim) + [[Plain [Str "Numbered",Space,Str "list",Space,Str "sub",Space,Str "sub",Space,Str "item",Space,Str "1"]] + ,[Plain [Str "Numbered",Space,Str "list",Space,Str "sub",Space,Str "sub",Space,Str "item",Space,Str "2"]]]] + ,[Plain [Str "etc."]]]] + ,[Plain [Str "Bulleted",Space,Str "list",Space,Str "item",Space,Str "3"]]] +,Header 2 ("todo lists",[],[]) [Str "todo",Space,Str "lists"] +,BulletList + [[Plain [Span ("",["done0"],[]) [],Str "task",Space,Str "1"] + ,OrderedList (1,DefaultStyle,DefaultDelim) + [[Plain [Span ("",["done1"],[]) [],Str "5"]]]] + ,[Plain [Span ("",["done2"],[]) [],Str "3"]] + ,[Plain [Str "[]",Space,Str "not",Space,Str "a",Space,Str "todo",Space,Str "item"]] + ,[Plain [Str "[",Space,Str "]not",Space,Str "a",Space,Str "todo",Space,Str "item"]] + ,[Plain [Str "[r]",Space,Str "not",Space,Str "a",Space,Str "todo",Space,Str "item"]] + ,[Plain [Str "[",Space,Str "]",Space,Str "not",Space,Str "a",Space,Str "todo",Space,Str "item"]] + ,[Plain [Span ("",["done2"],[]) [],Str "a",Space,Str "tab",Space,Str "in",Space,Str "the",Space,Str "todo",Space,Str "list",Space,Str "marker",Space,Code ("",[],[]) "[ ]"] + ,OrderedList (1,DefaultStyle,DefaultDelim) + [[Plain [Span ("",["done3"],[]) [],Str "4",SoftBreak,Str "5"]] + ,[Plain [Span ("",["done4"],[]) []] + ,Table [] [AlignDefault,AlignDefault] [0.0,0.0] + [[] + ,[]] + [[[Plain [Str "a"]] + ,[Plain [Str "b"]]]]]]] + ,[Plain [Span ("",["done4"],[]) [],Str "task",Space,Str "2"]]] +,Header 2 ("math",[],[]) [Str "math"] +,Para [Math InlineMath " \\sum_i a_i^2 = 1 "] +,Para [Math DisplayMath "\\sum_i a_i^2\n=\n1"] +,Para [Math DisplayMath "\\begin{aligned}\n\\sum_i a_i^2 &= 1 + 1 \\\\\n&= 2.\n\\end{aligned}"] +,Para [Str "edge",Space,Str "case",Space,Str "(the",Space,Code ("",[],[]) "c^2 + ",Space,Str "after",Space,Str "the",Space,Str "multline",Space,Str "tag",Space,Str "is",Space,Str "in",Space,Str "the",Space,Str "equation):"] +,Para [Math DisplayMath "\\begin{gathered}\nc^2 + \na^2 + b^2\n\\end{gathered}"] +,Para [Str "edge",Space,Str "case",Space,Str "(the",Space,Str "tag",Space,Str "is",Space,Code ("",[],[]) "hello%bye",Str ")"] +,Para [Math DisplayMath "\\begin{hello%bye}\n\\int_a^b f(x) dx\n\\end{hello%bye}"] +,Para [Str "Just",Space,Str "two",Space,Str "dollar",Space,Str "signs:",Space,Str "$$"] +,Para [Str "[not",Space,Str "math]",Space,Str "You",Space,Str "have",Space,Str "$1",SoftBreak,Str "and",Space,Str "I",Space,Str "have",Space,Str "$1."] +,Header 2 ("tags",[],[]) [Str "tags"] +,Para [Span ("-tag-one",[],[]) [Str ""],Span ("tag-one",["tag"],[]) [Str "tag-one"],Space,Span ("-tag-two",[],[]) [Str ""],Span ("tag-two",["tag"],[]) [Str "tag-two"]] +,Header 2 ("tables",[],[]) [Str "tables"] +,Table [] [AlignDefault,AlignDefault,AlignDefault] [0.0,0.0,0.0] + [[Plain [Str "Year"]] + ,[Plain [Str "Temperature",Space,Str "(low)"]] + ,[Plain [Str "Temperature",Space,Str "(high)"]]] + [[[Plain [Str "1900"]] + ,[Plain [Str "-10"]] + ,[Plain [Str "25"]]] + ,[[Plain [Str "1910"]] + ,[Plain [Str "-15"]] + ,[Plain [Str "30"]]] + ,[[Plain [Str "1920"]] + ,[Plain [Str "-10"]] + ,[Plain [Str "32"]]] + ,[[Plain [Str "1930"]] + ,[Plain [Emph [Str "N/A"]]] + ,[Plain [Emph [Str "N/A"]]]] + ,[[Plain [Str "1940"]] + ,[Plain [Str "-2"]] + ,[Plain [Str "40"]]]] +,Header 3 ("centered headerless tables",[],[]) [Str "centered",Space,Str "headerless",Space,Str "tables"] +,Div ("",["center"],[]) + [Table [] [AlignDefault,AlignDefault] [0.0,0.0] + [[] + ,[]] + [[[Plain [Str "a"]] + ,[Plain [Str "b"]]] + ,[[Plain [Str "c"]] + ,[Plain [Str "d"]]]]] +,Header 2 ("paragraphs",[],[]) [Str "paragraphs"] +,Para [Str "This",Space,Str "is",Space,Str "first",Space,Str "paragraph",SoftBreak,Str "with",Space,Str "two",Space,Str "lines."] +,Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "second",Space,Str "paragraph",Space,Str "with",SoftBreak,Str "two",Space,Str "lines",Space,Str "after",Space,Str "many",Space,Str "blank",Space,Str "lines."] +,Header 2 ("definition list",[],[]) [Str "definition",Space,Str "list"] +,DefinitionList + [([Str "Term",Space,Str "1"], + [[Plain [Str "Definition",Space,Str "1"]]]) + ,([Str "Term",Space,Str "2"], + [[Plain [Str "Definition",Space,Str "2"]] + ,[Plain [Str "Definition",Space,Str "3"]]]) + ,([Str "Term",Space,Str "::",Space,Span ("separated",[],[]) [],Strong [Str "separated"],Space,Str "by",Space,Str "::",Space,Emph [Str "double",Space,Str "colons"]], + [[Plain [Str "Def1"]] + ,[Plain [Str "Def2"]]]) + ,([Str "Term",Space,Str "with",Space,Str "lots",Space,Str "of",Space,Str "trailing",Space,Str "colons:::::::"], + [[Plain [Str "Definition"]]]) + ,([Str "::",Space,Str "This",Space,Str "is",Space,Str "::",Space,Str "A",Space,Str "term",Space,Str "(rather",Space,Str "than",Space,Str "a",Space,Str "definition)"], + [[Plain [Str "and",Space,Str "this",Space,Str "is",Space,Str "a",Space,Str "definition"]]]) + ,([Str "Term",Space,Str "Without",Space,Str "definitions"], + [[]]) + ,([Str "Part",Space,Str "::",Space,Str "of",Space,Str "::",Space,Str "dt"], + [[Plain [Str "part",Space,Str "of",Space,Str "::dd"]]])] +,DefinitionList + [([], + [[Plain [Str "Definition",Space,Str "1",Space,Str "without",Space,Str "a",Space,Str "term"]] + ,[Plain [Str "Definition",Space,Str "2",Space,Str "without",Space,Str "a",Space,Str "term"]]])] +,DefinitionList + [([Str "T1"], + [[Plain [Str "D1"]]])] +,Para [Str "new",Space,Str "paragraph"] +,DefinitionList + [([Str "T1"], + [[Plain [Str "D1"]]])] +,Para [Str "Not::Definition"] +,Para [Str "Not",Space,Str "::Definition"] +,Para [Str "::Not",Space,Str "definition"] +,BlockQuote + [Plain [Str "::",Space,Str "blockquote"]] +,BlockQuote + [Plain [Str "block",Space,Str "::",Space,Str "quote"]] +,Header 2 ("metadata placeholders",[],[]) [Str "metadata",Space,Str "placeholders"] +,Para [Str "%this",Space,Str "is",Space,Str "not",Space,Str "a",Space,Str "placeholder"] +,Para [Str "placeholders",SoftBreak,Str "serves",Space,Str "as",Space,Str "space",Space,Str "/",Space,Str "softbreak",Space,Str "in",Space,Str "paragraphs"] +,Header 2 ("sup, sub",[],[]) [Str "sup,",Space,Str "sub"] +,Para [Str "super",Superscript [Str "script"]] +,Para [Str "sub",Subscript [Str "script"]] +,Header 2 ("the todo mark",[],[]) [Str "the",Space,Str "todo",Space,Str "mark"] +,Para [Span ("",["todo"],[]) [Str "TODO:"]] +,Header 1 ("not implemented yet",[],[]) [Emph [Span ("not implemented yet",[],[]) [],Strong [Str "not",Space,Str "implemented",Space,Str "yet"]]] +,Header 2 ("tables with spans",[],[]) [Str "tables",Space,Str "with",Space,Str "spans"] +,Table [] [AlignDefault,AlignDefault,AlignDefault,AlignDefault] [0.0,0.0,0.0,0.0] + [[] + ,[] + ,[] + ,[]] + [[[Plain [Str "a"]] + ,[Plain [Str "b"]] + ,[Plain [Str "c"]] + ,[Plain [Str "d"]]] + ,[[Plain [Str "\\/"]] + ,[Plain [Str "e"]] + ,[Plain [Str ">"]] + ,[Plain [Str "f"]]] + ,[[Plain [Str "\\/"]] + ,[Plain [Str "\\/"]] + ,[Plain [Str ">"]] + ,[Plain [Str "g"]]] + ,[[Plain [Str "h"]] + ,[Plain [Str ">"]] + ,[Plain [Str ">"]] + ,[Plain [Str ">"]]]] +,Header 2 ("tables with multiple lines of headers",[],[]) [Str "tables",Space,Str "with",Space,Str "multiple",Space,Str "lines",Space,Str "of",Space,Str "headers"] +,Table [] [AlignDefault,AlignDefault] [0.0,0.0] + [[] + ,[]] + [[[Plain [Str "a"]] + ,[Plain [Str "b"]]] + ,[[Plain [Str "c"]] + ,[Plain [Str "d"]]] + ,[[Plain [Str "---"]] + ,[Plain [Str "---"]]]] +,Header 2 ("some other placeholders",[],[]) [Str "some",Space,Str "other",Space,Str "placeholders"] +,Para [Code ("",[],[]) "template",Space,Str "placeholder",Space,Str "is",Space,Str "ignored."] +,Para [Code ("",[],[]) "nohtml",Space,Str "placeholder",Space,Str "is",Space,Str "ignored."]] diff --git a/test/vimwiki-reader.wiki b/test/vimwiki-reader.wiki new file mode 100644 index 0000000..63d39b1 --- /dev/null +++ b/test/vimwiki-reader.wiki @@ -0,0 +1,424 @@ += _*implemented*_ = += header = + +== header level two == + +=== header `level` 3 === + +==== header ~~level~~ four ==== + +===== header _*level* 5_ ===== + +====== header level 6 ====== + +======= not a header ======== + +hi== not a header == + +=== not a header == + +=== not a header ===- + +not a header: + +=n= + +=== not a header ==== + + == centred header == + +== header with some `==` in between == +== header with some == in between == +== header with some ==in between == + +== emph strong and strikeout == + +_emph_ *strong* + +*_strong and emph_* + +_*emph and strong*_ + +*_emph inside_ strong* + +*strong with _emph_* + +_*strong inside* emph_ + +_~~strikeout~~ inside emph_ + +~~This is _struck out_ with emph~~ + +*not +strong* + +just two stars: ** + +just two underscores: __ + +just four ~s: ~~~~ + +_not +%%comment +emph_ + +~~not + %%comment + %%comment +strikeout~~ + +== horizontal rule == + +top +---- +middle + +------- + +not a rule----- + +not a rule (trailing spaces): +----- + +not a rule (leading spaces): + ---- + +== comments == + +%% you can't see me. + +this +%% secret +is %% not secret + +== inline code == + +Here is some `inline code`. + +Just two backticks: `` + +== preformatted text == + +{{{ + Tyger! Tyger! burning bright + In the forests of the night, + What immortal hand or eye + Could frame thy fearful symmetry? + In what distant deeps or skies + Burnt the fire of thine eyes? + On what wings dare he aspire? + What the hand dare sieze the fire? +}}} + +=== preformatted text with attributes === + + {{{class="python" style="color:blue" + for i in range(1, 5): + print(i) + }}} + +== block quotes == + + (indentation 4 spaces) This would be a blockquote in Vimwiki. It is not *highlighted* in Vim but + (indentation 1 space followed by 1 tab of width 4) could be styled by CSS in HTML. Blockquotes are usually used to quote a + (indentation 1 tab of width 4) long piece of text from another source. ~~blah blah~~ :blockquote: + +== external links == + +[[http://google.com|_Google_ search engine]] + +http://pandoc.org + +ftp://vim.org + +[[http://google.com]] + +[[mailto:info@example.org|email me]] + +mailto:hello@bye.com + +== internal links == + +[[This is a link]] + +[[This is a link source|Description of the link]] + +[[projects/Important Project 1]] + +[[../index]] + +[[a subdirectory/|Other files]] + +[[#tag-one|try me to test tag anchors]] + +[[#block quotes|try me to test header anchors]] + +[[#strong|try me to test strong anchors]] + +[[Todo List#Tomorrow|Tasks for tomorrow]] + +[[diary:2017-05-01]] + +[[file:../assets/data.csv|Important Data]] + +=== links with thumbnails === +[[http://www.google.com|{{./movie.jpg}}]] + +== images == + +{{file:./lalune.jpg}} + +{{http://vimwiki.googlecode.com/hg/images/vimwiki_logo.png|Vimwiki}} + +{{local:./movie.jpg}} + + +=== image with attributes === +{{lalune.jpg|_cool stuff_|style="width:150px;height:120px;"}} + +{{nonexist.jpg|*Non-existing* image|class="center flow blabla" style="font-color:red"}} + +{{lalune.jpg|_cool stuff_|style="width:150px;height:120px;"|anything in this segment is ignored}} + + +== lists == + + +# ordered list item 1, and here is some math belonging to list item 1 + {{$ + a^2 + b^2 = c^2 + }}$ + and some preformatted and tables belonging to item 1 as well +{{{ +I'm part of item 1. +}}} +| this table | is | +| also a part | of item 1 | + and some more text belonging to item 1. +# ordered list item 2 + + +* Bulleted list item 1 +* Bulleted list item 2 + + +# Bulleted list item 1 +# the # become numbers when converted to HTML + +- Bulleted list item 1 +- Bulleted list item 2 + +* Item 1 +* Item 2 + # Sub item 1 (indentation 4 spaces) + Sub item 1 continued line. +%%comments + Sub item 1 next continued line. + * Sub item 2, as an ordered list item even though the identifier is `*` (indentation 2 spaces followed by one tab of width 4) + * etc. + Continuation of Item 2 + Next continuation of Item 2 +But this is a new paragraph. + +# 1 + * `1.1` + * 2 + * 2.1 + * 3 + +=== ordered lists with non-# identifiers === +1. Numbered list item 1 +2. Numbered list item 2 +3. Numbered list item 3 + +4. Numbered list item 1 +5. Numbered list item 2 +6. Numbered list item 3 + +1) Numbered list item 1 +2) Numbered list item 2 +3) Numbered list item 3 + +a) Numbered list item 1 +b) Numbered list item 2 +c) Numbered list item 3 + +A) Numbered list item 1 +B) Numbered list item 2 +C) Numbered list item 3 + +i) Numbered list item 1 +ii) Numbered list item 2 +iii) Numbered list item 3 + +I) Numbered list item 1 +II) Numbered list item 2 +III) Numbered list item 3 + +- Bulleted list item 1 +- Bulleted list item 2 + a) Numbered list sub item 1 + b) more ... + * and more ... + * ... + c) Numbered list sub item 3 + 1. Numbered list sub sub item 1 + 2. Numbered list sub sub item 2 + d) etc. +- Bulleted list item 3 + +== todo lists == +* [ ] task 1 + 1. [.] 5 +* [o] 3 +* [] not a todo item +* [ ]not a todo item +* [r] not a todo item +* [ ] not a todo item +* [o] a tab in the todo list marker `[ ]` + III) [O] 4 + 5 + i) [X] +| a | b | +* [X] task 2 + +== math == + +$ \sum_i a_i^2 = 1 $ + +{{$ +\sum_i a_i^2 += +1 +}}$ + +{{$%align% +\sum_i a_i^2 &= 1 + 1 \\ +&= 2. +}}$ + +edge case (the `c^2 + ` after the multline tag is in the equation): +{{$%multline%c^2 + +a^2 + b^2 +}}$ + +edge case (the tag is `hello%bye`) +{{$%hello%bye% +\int_a^b f(x) dx +}}$ + +Just two dollar signs: $$ + +[not math] You have $1 +and I have $1. + +== tags == + +:tag-one:tag-two: + +== tables == + +| Year | Temperature (low) | Temperature (high) | +|------|-------------------|--------------------| +| 1900 | -10 | 25 | +| 1910 | -15 | 30 | +| 1920 | -10 | 32 | +| 1930 | _N/A_ | _N/A_ | +| 1940 | -2 | 40 | + + +=== centered headerless tables === + | a | b | + | c | d | + + +== paragraphs == + +This is first paragraph +with two lines. + + + + + + + + +This is a second paragraph with +two lines after many blank lines. + +== definition list == + +Term 1:: Definition 1 +Term 2:: +:: Definition 2 + :: Definition 3 +Term :: *separated* by :: _double colons_ :: Def1 +:: Def2 +Term with lots of trailing colons::::::::: Definition +:: This is :: A term (rather than a definition) :: and this is a definition +Term Without definitions :: +:: +Part :: of :: dt :: part of ::dd + +:: Definition 1 without a term +:: Definition 2 without a term + +T1 :: D1 +new paragraph +T1 :: D1 + +Not::Definition + +Not ::Definition + +::Not definition + + :: blockquote + + block :: quote + +== metadata placeholders == +%title title +%date 2017-05-01 + +%title second title is ignored +%date second date is ignored + +%this is not a placeholder + +placeholders +%title another title +%date 2017-04-23 +serves as space / softbreak in paragraphs + + +== sup, sub == + +super^script^ + +sub,,script,, + +== the todo mark == +TODO: + += _*not implemented yet*_ = +== tables with spans == +| a | b | c | d | +| \/ | e | > | f | +| \/ | \/ | > | g | +| h | > | > | > | + +== tables with multiple lines of headers == +| a | b | +| c | d | +|---|---| + +== some other placeholders == +`template` placeholder is ignored. +%template template + +`nohtml` placeholder is ignored. +%nohtml + + diff --git a/test/writer.asciidoc b/test/writer.asciidoc new file mode 100644 index 0000000..6396637 --- /dev/null +++ b/test/writer.asciidoc @@ -0,0 +1,689 @@ +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]] +Headers +------- + +[[level-2-with-an-embedded-link]] +Level 2 with an link:/url[embedded link] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +[[level-3-with-emphasis]] +Level 3 with _emphasis_ +^^^^^^^^^^^^^^^^^^^^^^^ + +[[level-4]] +Level 4 ++++++++ + +[[level-5]] +Level 5 + +[[level-1]] +Level 1 +------- + +[[level-2-with-emphasis]] +Level 2 with _emphasis_ +~~~~~~~~~~~~~~~~~~~~~~~ + +[[level-3]] +Level 3 +^^^^^^^ + +with no blank line + +[[level-2]] +Level 2 +~~~~~~~ + +with no blank line + +''''' + +[[paragraphs]] +Paragraphs +---------- + +Here’s a regular paragraph. + +In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item. +Because a hard-wrapped line in the middle of a paragraph looked like a list +item. + +Here’s one with a bullet. * criminey. + +There should be a hard line break + +here. + +''''' + +[[block-quotes]] +Block Quotes +------------ + +E-mail style: + +__________________________________________ +This is a block quote. It is pretty short. +__________________________________________ + +______________________ +-- +Code in a block quote: + +.... +sub status { + print "working"; +} +.... + +A list: + +1. item one +2. item two + +Nested block quotes: + +______ +nested +______ + +______ +nested +______ + +-- +______________________ + +This should not be a block quote: 2 > 1. + +And a following paragraph. + +''''' + +[[code-blocks]] +Code Blocks +----------- + +Code: + +.... +---- (should be four hyphens) + +sub status { + print "working"; +} + +this code block is indented by one tab +.... + +And: + +.... + this code block is indented by two tabs + +These should not be escaped: \$ \\ \> \[ \{ +.... + +''''' + +[[lists]] +Lists +----- + +[[unordered]] +Unordered +~~~~~~~~~ + +Asterisks tight: + +* asterisk 1 +* asterisk 2 +* asterisk 3 + +Asterisks loose: + +* asterisk 1 +* asterisk 2 +* asterisk 3 + +Pluses tight: + +* Plus 1 +* Plus 2 +* Plus 3 + +Pluses loose: + +* Plus 1 +* Plus 2 +* Plus 3 + +Minuses tight: + +* Minus 1 +* Minus 2 +* Minus 3 + +Minuses loose: + +* Minus 1 +* Minus 2 +* Minus 3 + +[[ordered]] +Ordered +~~~~~~~ + +Tight: + +1. First +2. Second +3. Third + +and: + +1. One +2. Two +3. Three + +Loose using tabs: + +1. First +2. Second +3. Third + +and using spaces: + +1. One +2. Two +3. Three + +Multiple paragraphs: + +1. Item 1, graf one. ++ +Item 1. graf two. The quick brown fox jumped over the lazy dog’s back. +2. Item 2. +3. Item 3. + +[[nested]] +Nested +~~~~~~ + +* Tab +** Tab +*** Tab + +Here’s another: + +1. First +2. Second: +* Fee +* Fie +* Foe +3. Third + +Same thing but with paragraphs: + +1. First +2. Second: +* Fee +* Fie +* Foe +3. Third + +[[tabs-and-spaces]] +Tabs and spaces +~~~~~~~~~~~~~~~ + +* this is a list item indented with tabs +* this is a list item indented with spaces +** this is an example list item indented with tabs +** this is an example list item indented with spaces + +[[fancy-list-markers]] +Fancy list markers +~~~~~~~~~~~~~~~~~~ + +1. begins with 2 +2. and now 3 ++ +with a continuation +a. sublist with roman numerals, starting with 4 +b. more items +A. a subsublist +B. a subsublist + +Nesting: + +A. Upper Alpha +A. Upper Roman. +1. Decimal start with 6 +a. Lower alpha with paren + +Autonumbering: + +1. Autonumber. +2. More. +1. Nested. + +Should not be a list item: + +M.A. 2007 + +B. Williams + +''''' + +[[definition-lists]] +Definition Lists +---------------- + +Tight using spaces: + +apple:: + red fruit +orange:: + orange fruit +banana:: + yellow fruit + +Tight using tabs: + +apple:: + red fruit +orange:: + orange fruit +banana:: + yellow fruit + +Loose: + +apple:: + red fruit +orange:: + orange fruit +banana:: + yellow fruit + +Multiple blocks with italics: + +_apple_:: + red fruit + + + contains seeds, crisp, pleasant to taste +_orange_:: + orange fruit + + +.... +{ orange code block } +.... + + + __________________ + orange block quote + __________________ + +Multiple definitions, tight: + +apple:: + red fruit + + + computer +orange:: + orange fruit + + + bank + +Multiple definitions, loose: + +apple:: + red fruit + + + computer +orange:: + orange fruit + + + bank + +Blank line after term, indented marker, alternate markers: + +apple:: + red fruit + + + computer +orange:: + orange fruit + + + 1. sublist + 2. sublist + +[[html-blocks]] +HTML Blocks +----------- + +Simple block on one line: + +foo + +And nested without indentation: + +foo + +bar + +Interpreted markdown in a table: + +This is _emphasized_ + +And this is *strong* + +Here’s a simple block: + +foo + +This should be a code block, though: + +.... +
    + foo +
    +.... + +As should this: + +.... +
    foo
    +.... + +Now, nested: + +foo + +This should just be an HTML comment: + +Multiline: + +Code block: + +.... + +.... + +Just plain comment, with trailing spaces on the line: + +Code: + +.... +
    +.... + +Hr’s: + +''''' + +[[inline-markup]] +Inline Markup +------------- + +This is _emphasized_, and so _is this_. + +This is *strong*, and so *is this*. + +An _link:/url[emphasized link]_. + +*_This is strong and em._* + +So is *_this_* word. + +*_This is strong and em._* + +So is *_this_* word. + +This is code: `>`, `$`, `\`, `\$`, ``. + +[line-through]*This is _strikeout_.* + +Superscripts: a^bc^d a^_hello_^ a^hello there^. + +Subscripts: H~2~O, H~23~O, H~many of them~O. + +These should not be superscripts or subscripts, because of the unescaped +spaces: a^b c^d, a~b c~d. + +''''' + +[[smart-quotes-ellipses-dashes]] +Smart quotes, ellipses, dashes +------------------------------ + +``Hello,'' said the spider. ```Shelob' is my name.'' + +`A', `B', and `C' are letters. + +`Oak,' `elm,' and `beech' are names of trees. So is `pine.' + +`He said, ``I want to go.''' Were you alive in the 70’s? + +Here is some quoted ``code`' and a ``http://example.com/?foo=1&bar=2[quoted +link]''. + +Some dashes: one—two — three—four — five. + +Dashes between numbers: 5–7, 255–66, 1987–1999. + +Ellipses…and…and…. + +''''' + +[[latex]] +LaTeX +----- + +* +* latexmath:[$2+2=4$] +* latexmath:[$x \in y$] +* latexmath:[$\alpha \wedge \omega$] +* latexmath:[$223$] +* latexmath:[$p$]-Tree +* Here’s some display math: +latexmath:[\[\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}\]] +* Here’s one that has a line break in it: +latexmath:[$\alpha + \omega \times x^2$]. + +These shouldn’t be math: + +* To get the famous equation, write `$e = mc^2$`. +* $22,000 is a _lot_ of money. So is $34,000. (It worked if ``lot'' is +emphasized.) +* Shoes ($20) and socks ($5). +* Escaped `$`: $73 _this should be emphasized_ 23$. + +Here’s a LaTeX table: + +''''' + +[[special-characters]] +Special Characters +------------------ + +Here is some unicode: + +* I hat: Î +* o umlaut: ö +* section: § +* set membership: ∈ +* copyright: © + +AT&T has an ampersand in their name. + +AT&T is another way to write it. + +This & that. + +4 < 5. + +6 > 5. + +Backslash: \ + +Backtick: ` + +Asterisk: * + +Underscore: _ + +Left brace: \{ + +Right brace: } + +Left bracket: [ + +Right bracket: ] + +Left paren: ( + +Right paren: ) + +Greater-than: > + +Hash: # + +Period: . + +Bang: ! + +Plus: + + +Minus: - + +''''' + +[[links]] +Links +----- + +[[explicit]] +Explicit +~~~~~~~~ + +Just a link:/url/[URL]. + +link:/url/[URL and title]. + +link:/url/[URL and title]. + +link:/url/[URL and title]. + +link:/url/[URL and title] + +link:/url/[URL and title] + +link:/url/with_underscore[with_underscore] + +mailto:nobody@nowhere.net[Email link] + +link:[Empty]. + +[[reference]] +Reference +~~~~~~~~~ + +Foo link:/url/[bar]. + +With link:/url/[embedded [brackets]]. + +link:/url/[b] by itself should be a link. + +Indented link:/url[once]. + +Indented link:/url[twice]. + +Indented link:/url[thrice]. + +This should [not][] be a link. + +.... +[not]: /url +.... + +Foo link:/url/[bar]. + +Foo link:/url/[biz]. + +[[with-ampersands]] +With ampersands +~~~~~~~~~~~~~~~ + +Here’s a http://example.com/?foo=1&bar=2[link with an ampersand in the URL]. + +Here’s a link with an amersand in the link text: http://att.com/[AT&T]. + +Here’s an link:/script?foo=1&bar=2[inline link]. + +Here’s an link:/script?foo=1&bar=2[inline link in pointy braces]. + +[[autolinks]] +Autolinks +~~~~~~~~~ + +With an ampersand: http://example.com/?foo=1&bar=2 + +* In a list? +* http://example.com/ +* It should. + +An e-mail address: nobody@nowhere.net + +________________________________ +Blockquoted: http://example.com/ +________________________________ + +Auto-links should not occur here: `` + +.... +or here: +.... + +''''' + +[[images]] +Images +------ + +From ``Voyage dans la Lune'' by Georges Melies (1902): + +image:lalune.jpg[lalune,title="Voyage dans la Lune"] + +Here is a movie image:movie.jpg[movie] icon. + +''''' + +[[footnotes]] +Footnotes +--------- + +Here is a footnote reference,footnote:[Here is the footnote. It can go +anywhere after the footnote reference. It need not be placed at the end of the +document.] and another.[multiblock footnote omitted] This should _not_ be a +footnote reference, because it contains a space.[^my note] Here is an inline +note.footnote:[This is _easier_ to type. Inline notes may contain +http://google.com[links] and `]` verbatim characters, as well as [bracketed +text].] + +___________________________________________ +Notes can go in quotes.footnote:[In quote.] +___________________________________________ + +1. And in list items.footnote:[In list.] + +This paragraph should not be part of the note, as it is not indented. diff --git a/test/writer.context b/test/writer.context new file mode 100644 index 0000000..9884c82 --- /dev/null +++ b/test/writer.context @@ -0,0 +1,893 @@ +% Enable hyperlinks +\setupinteraction + [state=start, + title={Pandoc Test Suite}, + author={John MacFarlane; Anonymous}, + style=, + color=, + contrastcolor=] + +% make chapter, section bookmarks visible when opening document +\placebookmarks[chapter, section, subsection, subsubsection, subsubsubsection, subsubsubsubsection][chapter, section] +\setupinteractionscreen[option=bookmark] +\setuptagging[state=start] + + +% use microtypography +\definefontfeature[default][default][script=latn, protrusion=quality, expansion=quality, itlc=yes, textitalics=yes, onum=yes, pnum=yes] +\definefontfeature[smallcaps][script=latn, protrusion=quality, expansion=quality, smcp=yes, onum=yes, pnum=yes] +\setupalign[hz,hanging] +\setupitaliccorrection[global, always] + +\setupbodyfontenvironment[default][em=italic] % use italic as em, not slanted + +\definefallbackfamily[mainface][rm][DejaVu Serif][preset=range:greek, force=yes] +\definefontfamily[mainface][rm][Latin Modern Roman] +\definefontfamily[mainface][mm][Latin Modern Math] +\definefontfamily[mainface][ss][Latin Modern Sans] +\definefontfamily[mainface][tt][Latin Modern Typewriter][features=none] +\setupbodyfont[mainface] + +\setupwhitespace[medium] + +\setuphead[chapter] [style=\tfd,header=empty] +\setuphead[section] [style=\tfc] +\setuphead[subsection] [style=\tfb] +\setuphead[subsubsection] [style=\bf] +\setuphead[subsubsubsection] [style=\sc] +\setuphead[subsubsubsubsection][style=\it] + +\setuphead[chapter, section, subsection, subsubsection, subsubsubsection, subsubsubsubsection][number=no] + +\definedescription + [description] + [headstyle=bold, style=normal, location=hanging, width=broad, margin=1cm, alternative=hanging] + +\setupitemize[autointro] % prevent orphan list intro +\setupitemize[indentnext=no] + +\setupfloat[figure][default={here,nonumber}] +\setupfloat[table][default={here,nonumber}] + +\setupthinrules[width=15em] % width of horizontal rules + + +\starttext +\startalignment[middle] + {\tfd Pandoc Test Suite} + \smallskip + {\tfa John MacFarlane\crlf Anonymous} + \smallskip + {\tfa July 17, 2006} + \bigskip +\stopalignment + +This is a set of tests for pandoc. Most of them are adapted from John Gruber's +markdown test suite. + +\thinrule + +\section[headers]{Headers} + +\subsection[level-2-with-an-embedded-link]{Level 2 with an +\useURL[url1][/url][][embedded link]\from[url1]} + +\subsubsection[level-3-with-emphasis]{Level 3 with {\em emphasis}} + +\subsubsubsection[level-4]{Level 4} + +\subsubsubsubsection[level-5]{Level 5} + +\section[level-1]{Level 1} + +\subsection[level-2-with-emphasis]{Level 2 with {\em emphasis}} + +\subsubsection[level-3]{Level 3} + +with no blank line + +\subsection[level-2]{Level 2} + +with no blank line + +\thinrule + +\section[paragraphs]{Paragraphs} + +Here's a regular paragraph. + +In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item. +Because a hard-wrapped line in the middle of a paragraph looked like a list +item. + +Here's one with a bullet. * criminey. + +There should be a hard line break\crlf +here. + +\thinrule + +\section[block-quotes]{Block Quotes} + +E-mail style: + +\startblockquote +This is a block quote. It is pretty short. +\stopblockquote + +\startblockquote +Code in a block quote: + +\starttyping +sub status { + print "working"; +} +\stoptyping + +A list: + +\startitemize[n,packed][stopper=.] +\item + item one +\item + item two +\stopitemize + +Nested block quotes: + +\startblockquote +nested +\stopblockquote + +\startblockquote +nested +\stopblockquote +\stopblockquote + +This should not be a block quote: 2 > 1. + +And a following paragraph. + +\thinrule + +\section[code-blocks]{Code Blocks} + +Code: + +\starttyping +---- (should be four hyphens) + +sub status { + print "working"; +} + +this code block is indented by one tab +\stoptyping + +And: + +\starttyping + this code block is indented by two tabs + +These should not be escaped: \$ \\ \> \[ \{ +\stoptyping + +\thinrule + +\section[lists]{Lists} + +\subsection[unordered]{Unordered} + +Asterisks tight: + +\startitemize[packed] +\item + asterisk 1 +\item + asterisk 2 +\item + asterisk 3 +\stopitemize + +Asterisks loose: + +\startitemize +\item + asterisk 1 +\item + asterisk 2 +\item + asterisk 3 +\stopitemize + +Pluses tight: + +\startitemize[packed] +\item + Plus 1 +\item + Plus 2 +\item + Plus 3 +\stopitemize + +Pluses loose: + +\startitemize +\item + Plus 1 +\item + Plus 2 +\item + Plus 3 +\stopitemize + +Minuses tight: + +\startitemize[packed] +\item + Minus 1 +\item + Minus 2 +\item + Minus 3 +\stopitemize + +Minuses loose: + +\startitemize +\item + Minus 1 +\item + Minus 2 +\item + Minus 3 +\stopitemize + +\subsection[ordered]{Ordered} + +Tight: + +\startitemize[n,packed][stopper=.] +\item + First +\item + Second +\item + Third +\stopitemize + +and: + +\startitemize[n,packed][stopper=.] +\item + One +\item + Two +\item + Three +\stopitemize + +Loose using tabs: + +\startitemize[n][stopper=.] +\item + First +\item + Second +\item + Third +\stopitemize + +and using spaces: + +\startitemize[n][stopper=.] +\item + One +\item + Two +\item + Three +\stopitemize + +Multiple paragraphs: + +\startitemize[n][stopper=.] +\item + Item 1, graf one. + + Item 1. graf two. The quick brown fox jumped over the lazy dog's back. +\item + Item 2. +\item + Item 3. +\stopitemize + +\subsection[nested]{Nested} + +\startitemize[packed] +\item + Tab + \startitemize[packed] + \item + Tab + \startitemize[packed] + \item + Tab + \stopitemize + \stopitemize +\stopitemize + +Here's another: + +\startitemize[n,packed][stopper=.] +\item + First +\item + Second: + \startitemize[packed] + \item + Fee + \item + Fie + \item + Foe + \stopitemize +\item + Third +\stopitemize + +Same thing but with paragraphs: + +\startitemize[n][stopper=.] +\item + First +\item + Second: + + \startitemize[packed] + \item + Fee + \item + Fie + \item + Foe + \stopitemize +\item + Third +\stopitemize + +\subsection[tabs-and-spaces]{Tabs and spaces} + +\startitemize +\item + this is a list item indented with tabs +\item + this is a list item indented with spaces + + \startitemize + \item + this is an example list item indented with tabs + \item + this is an example list item indented with spaces + \stopitemize +\stopitemize + +\subsection[fancy-list-markers]{Fancy list markers} + +\startitemize[n][start=2,left=(,stopper=),width=2.0em] +\item + begins with 2 +\item + and now 3 + + with a continuation + + \startitemize[r,packed][start=4,stopper=.,width=2.0em] + \item + sublist with roman numerals, starting with 4 + \item + more items + \startitemize[A,packed][left=(,stopper=),width=2.0em] + \item + a subsublist + \item + a subsublist + \stopitemize + \stopitemize +\stopitemize + +Nesting: + +\startitemize[A,packed][stopper=.] +\item + Upper Alpha + \startitemize[R,packed][stopper=.] + \item + Upper Roman. + \startitemize[n,packed][start=6,left=(,stopper=),width=2.0em] + \item + Decimal start with 6 + \startitemize[a,packed][start=3,stopper=)] + \item + Lower alpha with paren + \stopitemize + \stopitemize + \stopitemize +\stopitemize + +Autonumbering: + +\startitemize[n,packed] +\item + Autonumber. +\item + More. + \startitemize[a,packed] + \item + Nested. + \stopitemize +\stopitemize + +Should not be a list item: + +M.A.~2007 + +B. Williams + +\thinrule + +\section[definition-lists]{Definition Lists} + +Tight using spaces: + +\startdescription{apple} + red fruit +\stopdescription + +\startdescription{orange} + orange fruit +\stopdescription + +\startdescription{banana} + yellow fruit +\stopdescription + +Tight using tabs: + +\startdescription{apple} + red fruit +\stopdescription + +\startdescription{orange} + orange fruit +\stopdescription + +\startdescription{banana} + yellow fruit +\stopdescription + +Loose: + +\startdescription{apple} + red fruit +\stopdescription + +\startdescription{orange} + orange fruit +\stopdescription + +\startdescription{banana} + yellow fruit +\stopdescription + +Multiple blocks with italics: + +\startdescription{{\em apple}} + red fruit + + contains seeds, crisp, pleasant to taste +\stopdescription + +\startdescription{{\em orange}} + orange fruit + +\starttyping +{ orange code block } +\stoptyping + + \startblockquote + orange block quote + \stopblockquote +\stopdescription + +Multiple definitions, tight: + +\startdescription{apple} + red fruit + + computer +\stopdescription + +\startdescription{orange} + orange fruit + + bank +\stopdescription + +Multiple definitions, loose: + +\startdescription{apple} + red fruit + + computer +\stopdescription + +\startdescription{orange} + orange fruit + + bank +\stopdescription + +Blank line after term, indented marker, alternate markers: + +\startdescription{apple} + red fruit + + computer +\stopdescription + +\startdescription{orange} + orange fruit + + \startitemize[n,packed][stopper=.] + \item + sublist + \item + sublist + \stopitemize +\stopdescription + +\section[html-blocks]{HTML Blocks} + +Simple block on one line: + +foo + +And nested without indentation: + +foo + +bar + +Interpreted markdown in a table: + +This is {\em emphasized} +And this is {\bf strong} +Here's a simple block: + +foo + +This should be a code block, though: + +\starttyping +
    + foo +
    +\stoptyping + +As should this: + +\starttyping +
    foo
    +\stoptyping + +Now, nested: + +foo + +This should just be an HTML comment: + +Multiline: + +Code block: + +\starttyping + +\stoptyping + +Just plain comment, with trailing spaces on the line: + +Code: + +\starttyping +
    +\stoptyping + +Hr's: + +\thinrule + +\section[inline-markup]{Inline Markup} + +This is {\em emphasized}, and so {\em is this}. + +This is {\bf strong}, and so {\bf is this}. + +An {\em \useURL[url2][/url][][emphasized link]\from[url2]}. + +{\bf {\em This is strong and em.}} + +So is {\bf {\em this}} word. + +{\bf {\em This is strong and em.}} + +So is {\bf {\em this}} word. + +This is code: \type{>}, \type{$}, \type{\}, \type{\$}, \type{}. + +\overstrikes{This is {\em strikeout}.} + +Superscripts: a\high{bc}d a\high{{\em hello}} a\high{hello~there}. + +Subscripts: H\low{2}O, H\low{23}O, H\low{many~of~them}O. + +These should not be superscripts or subscripts, because of the unescaped +spaces: a^b c^d, a\lettertilde{}b c\lettertilde{}d. + +\thinrule + +\section[smart-quotes-ellipses-dashes]{Smart quotes, ellipses, dashes} + +\quotation{Hello,} said the spider. \quotation{\quote{Shelob} is my name.} + +\quote{A}, \quote{B}, and \quote{C} are letters. + +\quote{Oak,} \quote{elm,} and \quote{beech} are names of trees. So is +\quote{pine.} + +\quote{He said, \quotation{I want to go.}} Were you alive in the 70's? + +Here is some quoted \quote{\type{code}} and a +\quotation{\useURL[url3][http://example.com/?foo=1&bar=2][][quoted +link]\from[url3]}. + +Some dashes: one---two --- three---four --- five. + +Dashes between numbers: 5--7, 255--66, 1987--1999. + +Ellipses\ldots{}and\ldots{}and\ldots{}. + +\thinrule + +\section[latex]{LaTeX} + +\startitemize[packed] +\item + \cite[22-23]{smith.1899} +\item + $2+2=4$ +\item + $x \in y$ +\item + $\alpha \wedge \omega$ +\item + $223$ +\item + $p$-Tree +\item + Here's some display math: + \startformula \frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h} \stopformula +\item + Here's one that has a line break in it: $\alpha + \omega \times x^2$. +\stopitemize + +These shouldn't be math: + +\startitemize[packed] +\item + To get the famous equation, write \type{$e = mc^2$}. +\item + \$22,000 is a {\em lot} of money. So is \$34,000. (It worked if + \quotation{lot} is emphasized.) +\item + Shoes (\$20) and socks (\$5). +\item + Escaped \type{$}: \$73 {\em this should be emphasized} 23\$. +\stopitemize + +Here's a LaTeX table: + +\thinrule + +\section[special-characters]{Special Characters} + +Here is some unicode: + +\startitemize[packed] +\item + I hat: Î +\item + o umlaut: ö +\item + section: § +\item + set membership: ∈ +\item + copyright: © +\stopitemize + +AT&T has an ampersand in their name. + +AT&T is another way to write it. + +This & that. + +4 < 5. + +6 > 5. + +Backslash: \letterbackslash{} + +Backtick: ` + +Asterisk: * + +Underscore: _ + +Left brace: \{ + +Right brace: \} + +Left bracket: {[} + +Right bracket: {]} + +Left paren: ( + +Right paren: ) + +Greater-than: > + +Hash: \# + +Period: . + +Bang: ! + +Plus: + + +Minus: - + +\thinrule + +\section[links]{Links} + +\subsection[explicit]{Explicit} + +Just a \useURL[url4][/url/][][URL]\from[url4]. + +\useURL[url5][/url/][][URL and title]\from[url5]. + +\useURL[url6][/url/][][URL and title]\from[url6]. + +\useURL[url7][/url/][][URL and title]\from[url7]. + +\useURL[url8][/url/][][URL and title]\from[url8] + +\useURL[url9][/url/][][URL and title]\from[url9] + +\useURL[url10][/url/with_underscore][][with_underscore]\from[url10] + +\useURL[url11][mailto:nobody@nowhere.net][][Email link]\from[url11] + +\useURL[url12][][][Empty]\from[url12]. + +\subsection[reference]{Reference} + +Foo \useURL[url13][/url/][][bar]\from[url13]. + +With \useURL[url14][/url/][][embedded {[}brackets{]}]\from[url14]. + +\useURL[url15][/url/][][b]\from[url15] by itself should be a link. + +Indented \useURL[url16][/url][][once]\from[url16]. + +Indented \useURL[url17][/url][][twice]\from[url17]. + +Indented \useURL[url18][/url][][thrice]\from[url18]. + +This should {[}not{]}{[}{]} be a link. + +\starttyping +[not]: /url +\stoptyping + +Foo \useURL[url19][/url/][][bar]\from[url19]. + +Foo \useURL[url20][/url/][][biz]\from[url20]. + +\subsection[with-ampersands]{With ampersands} + +Here's a \useURL[url21][http://example.com/?foo=1&bar=2][][link with an +ampersand in the URL]\from[url21]. + +Here's a link with an amersand in the link text: +\useURL[url22][http://att.com/][][AT&T]\from[url22]. + +Here's an \useURL[url23][/script?foo=1&bar=2][][inline link]\from[url23]. + +Here's an \useURL[url24][/script?foo=1&bar=2][][inline link in pointy +braces]\from[url24]. + +\subsection[autolinks]{Autolinks} + +With an ampersand: \useURL[url25][http://example.com/?foo=1&bar=2]\from[url25] + +\startitemize[packed] +\item + In a list? +\item + \useURL[url26][http://example.com/]\from[url26] +\item + It should. +\stopitemize + +An e-mail address: +\useURL[url27][mailto:nobody@nowhere.net][][nobody@nowhere.net]\from[url27] + +\startblockquote +Blockquoted: \useURL[url28][http://example.com/]\from[url28] +\stopblockquote + +Auto-links should not occur here: \type{} + +\starttyping +or here: +\stoptyping + +\thinrule + +\section[images]{Images} + +From \quotation{Voyage dans la Lune} by Georges Melies (1902): + +\placefigure{lalune}{\externalfigure[lalune.jpg]} + +Here is a movie {\externalfigure[movie.jpg]} icon. + +\thinrule + +\section[footnotes]{Footnotes} + +Here is a footnote reference,\footnote{Here is the footnote. It can go + anywhere after the footnote reference. It need not be placed at the end of + the document.} and another.\startbuffer Here's the long note. This one + contains multiple blocks. + + Subsequent blocks are indented to show that they belong to the footnote (as + with list items). + +\starttyping + { } +\stoptyping + + If you want, you can indent every line, but you can also be lazy and just + indent the first line of each block.\stopbuffer\footnote{\getbuffer} This +should {\em not} be a footnote reference, because it contains a space.{[}^my +note{]} Here is an inline note.\footnote{This is {\em easier} to type. Inline + notes may contain \useURL[url29][http://google.com][][links]\from[url29] and + \type{]} verbatim characters, as well as {[}bracketed text{]}.} + +\startblockquote +Notes can go in quotes.\footnote{In quote.} +\stopblockquote + +\startitemize[n,packed][stopper=.] +\item + And in list items.\footnote{In list.} +\stopitemize + +This paragraph should not be part of the note, as it is not indented. + +\stoptext diff --git a/test/writer.custom b/test/writer.custom new file mode 100644 index 0000000..b32d777 --- /dev/null +++ b/test/writer.custom @@ -0,0 +1,783 @@ +

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

    + +
    + +

    Headers

    + + + +

    Level 3 with emphasis

    + +

    Level 4

    + +
    Level 5
    + +

    Level 1

    + +

    Level 2 with emphasis

    + +

    Level 3

    + +

    with no blank line

    + +

    Level 2

    + +

    with no blank line

    + +
    + +

    Paragraphs

    + +

    Here’s a regular paragraph.

    + +

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

    + +

    Here’s one with a bullet. +* criminey.

    + +

    There should be a hard line break
    here.

    + +
    + +

    Block Quotes

    + +

    E-mail style:

    + +
    +

    This is a block quote. +It is pretty short.

    +
    + +
    +

    Code in a block quote:

    + +
    sub status {
    +    print "working";
    +}
    + +

    A list:

    + +
      +
    1. item one
    2. +
    3. item two
    4. +
    + +

    Nested block quotes:

    + +
    +

    nested

    +
    + +
    +

    nested

    +
    +
    + +

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

    + +

    And a following paragraph.

    + +
    + +

    Code Blocks

    + +

    Code:

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

    And:

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

    Lists

    + +

    Unordered

    + +

    Asterisks tight:

    + +
      +
    • asterisk 1
    • +
    • asterisk 2
    • +
    • asterisk 3
    • +
    + +

    Asterisks loose:

    + +
      +
    • asterisk 1

    • +
    • asterisk 2

    • +
    • asterisk 3

    • +
    + +

    Pluses tight:

    + +
      +
    • Plus 1
    • +
    • Plus 2
    • +
    • Plus 3
    • +
    + +

    Pluses loose:

    + +
      +
    • Plus 1

    • +
    • Plus 2

    • +
    • Plus 3

    • +
    + +

    Minuses tight:

    + +
      +
    • Minus 1
    • +
    • Minus 2
    • +
    • Minus 3
    • +
    + +

    Minuses loose:

    + +
      +
    • Minus 1

    • +
    • Minus 2

    • +
    • Minus 3

    • +
    + +

    Ordered

    + +

    Tight:

    + +
      +
    1. First
    2. +
    3. Second
    4. +
    5. Third
    6. +
    + +

    and:

    + +
      +
    1. One
    2. +
    3. Two
    4. +
    5. Three
    6. +
    + +

    Loose using tabs:

    + +
      +
    1. First

    2. +
    3. Second

    4. +
    5. Third

    6. +
    + +

    and using spaces:

    + +
      +
    1. One

    2. +
    3. Two

    4. +
    5. Three

    6. +
    + +

    Multiple paragraphs:

    + +
      +
    1. Item 1, graf one.

      + +

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

    2. +
    3. Item 2.

    4. +
    5. Item 3.

    6. +
    + +

    Nested

    + +
      +
    • Tab + +
        +
      • Tab + +
          +
        • Tab
        • +
      • +
    • +
    + +

    Here’s another:

    + +
      +
    1. First
    2. +
    3. Second: + +
        +
      • Fee
      • +
      • Fie
      • +
      • Foe
      • +
    4. +
    5. Third
    6. +
    + +

    Same thing but with paragraphs:

    + +
      +
    1. First

    2. +
    3. Second:

      + +
        +
      • Fee
      • +
      • Fie
      • +
      • Foe
      • +
    4. +
    5. Third

    6. +
    + +

    Tabs and spaces

    + +
      +
    • this is a list item +indented with tabs

    • +
    • this is a list item +indented with spaces

      + +
        +
      • this is an example list item +indented with tabs

      • +
      • this is an example list item +indented with spaces

      • +
    • +
    + +

    Fancy list markers

    + +
      +
    1. begins with 2
    2. +
    3. and now 3

      + +

      with a continuation

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

    Nesting:

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

    Autonumbering:

    + +
      +
    1. Autonumber.
    2. +
    3. More. + +
        +
      1. Nested.
      2. +
    4. +
    + +

    Should not be a list item:

    + +

    M.A. 2007

    + +

    B. Williams

    + +
    + +

    Definition Lists

    + +

    Tight using spaces:

    + +
    +
    apple
    +
    red fruit
    +
    orange
    +
    orange fruit
    +
    banana
    +
    yellow fruit
    +
    + +

    Tight using tabs:

    + +
    +
    apple
    +
    red fruit
    +
    orange
    +
    orange fruit
    +
    banana
    +
    yellow fruit
    +
    + +

    Loose:

    + +
    +
    apple
    +

    red fruit

    +
    orange
    +

    orange fruit

    +
    banana
    +

    yellow fruit

    +
    + +

    Multiple blocks with italics:

    + +
    +
    apple
    +

    red fruit

    + +

    contains seeds, +crisp, pleasant to taste

    +
    orange
    +

    orange fruit

    + +
    { orange code block }
    + +
    +

    orange block quote

    +
    +
    + +

    Multiple definitions, tight:

    + +
    +
    apple
    +
    red fruit
    +
    computer
    +
    orange
    +
    orange fruit
    +
    bank
    +
    + +

    Multiple definitions, loose:

    + +
    +
    apple
    +

    red fruit

    +

    computer

    +
    orange
    +

    orange fruit

    +

    bank

    +
    + +

    Blank line after term, indented marker, alternate markers:

    + +
    +
    apple
    +

    red fruit

    +

    computer

    +
    orange
    +

    orange fruit

    + +
      +
    1. sublist
    2. +
    3. sublist
    4. +
    +
    + +

    HTML Blocks

    + +

    Simple block on one line:

    + +
    +foo
    + +

    And nested without indentation:

    + +
    +
    +
    +

    foo

    + +
    +bar
    + +

    Interpreted markdown in a table:

    + + + + + + + + + + + +
    + +This is emphasized + + + +And this is strong + +
    + + + +

    Here’s a simple block:

    + +
    +

    foo

    + +

    This should be a code block, though:

    + +
    <div>
    +    foo
    +</div>
    + +

    As should this:

    + +
    <div>foo</div>
    + +

    Now, nested:

    + +
    +
    +
    +foo
    + +

    This should just be an HTML comment:

    + + + +

    Multiline:

    + + + + + +

    Code block:

    + +
    <!-- Comment -->
    + +

    Just plain comment, with trailing spaces on the line:

    + + + +

    Code:

    + +
    <hr />
    + +

    Hr’s:

    + +
    + +
    + +
    + +
    + +
    + +
    + +
    + +
    + +
    + +
    + +

    Inline Markup

    + +

    This is emphasized, and so is this.

    + +

    This is strong, and so is this.

    + +

    An emphasized link.

    + +

    This is strong and em.

    + +

    So is this word.

    + +

    This is strong and em.

    + +

    So is this word.

    + +

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

    + +

    This is strikeout.

    + +

    Superscripts: abcd ahello ahello there.

    + +

    Subscripts: H2O, H23O, Hmany of themO.

    + +

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

    + +
    + +

    Smart quotes, ellipses, dashes

    + +

    said the spider.

    + +

    , , and are letters.

    + +

    and are names of trees. +So is

    + +

    Were you alive in the +70’s?

    + +

    Here is some quoted and a .

    + +

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

    + +

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

    + +

    Ellipses…and…and….

    + +
    + +

    LaTeX

    + +
      +
    • +
    • \(2+2=4\)
    • +
    • \(x \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 is emphasized.)
    • +
    • Shoes ($20) and socks ($5).
    • +
    • Escaped $: $73 this should be emphasized 23$.
    • +
    + +

    Here’s a LaTeX table:

    + + + +
    + +

    Special Characters

    + +

    Here is some unicode:

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

    AT&T has an ampersand in their name.

    + +

    AT&T is another way to write it.

    + +

    This & that.

    + +

    4 < 5.

    + +

    6 > 5.

    + +

    Backslash: \

    + +

    Backtick: `

    + +

    Asterisk: *

    + +

    Underscore: _

    + +

    Left brace: {

    + +

    Right brace: }

    + +

    Left bracket: [

    + +

    Right bracket: ]

    + +

    Left paren: (

    + +

    Right paren: )

    + +

    Greater-than: >

    + +

    Hash: #

    + +

    Period: .

    + +

    Bang: !

    + +

    Plus: +

    + +

    Minus: -

    + +
    + +

    Links

    + +

    Explicit

    + +

    Just a URL.

    + +

    URL and title.

    + +

    URL and title.

    + +

    URL and title.

    + +

    URL and title

    + +

    URL and title

    + +

    with_underscore

    + +

    Email link

    + +

    Empty.

    + +

    Reference

    + +

    Foo bar.

    + +

    With embedded [brackets].

    + +

    b by itself should be a link.

    + +

    Indented once.

    + +

    Indented twice.

    + +

    Indented thrice.

    + +

    This should [not][] be a link.

    + +
    [not]: /url
    + +

    Foo bar.

    + +

    Foo biz.

    + +

    With ampersands

    + +

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

    + +

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

    + +

    Here’s an inline link.

    + +

    Here’s an inline link in pointy braces.

    + + + +

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

    + + + +

    An e-mail address: nobody@nowhere.net

    + +
    +

    Blockquoted: http://example.com/

    +
    + +

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

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

    Images

    + +

    From by Georges Melies (1902):

    + +
    + +

    lalune

    +
    + +

    Here is a movie icon.

    + +
    + +

    Footnotes

    + +

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

    + +
    +

    Notes can go in quotes.4

    +
    + +
      +
    1. And in list items.5
    2. +
    + +

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

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

    2. +
    3. 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.

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

    6. +
    7. In quote.

    8. +
    9. In list.

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

      +

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

    2. +
    3. Item 2.

    4. +
    5. Item 3.

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

      +

      with a continuation

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

    red fruit

    +

    contains seeds, crisp, pleasant to taste

    +
    //orange//
    +

    orange fruit

    + +{ orange code block } + +>

    orange block quote

    +
    + +Multiple definitions, tight: + + * **apple** red fruitcomputer + * **orange** orange fruitbank + +Multiple definitions, loose: + + * **apple** red fruitcomputer + * **orange** orange fruitbank + +Blank line after term, indented marker, alternate markers: + + * **apple** red fruitcomputer + * **orange** orange fruit + - sublist + - sublist + +====== HTML Blocks ====== + +Simple block on one line: + +foo + +And nested without indentation: + +foo + + + +bar + + +Interpreted markdown in a table: + + + + + + + +
    + +This is //emphasized// + + + +And this is **strong** + +
    + + +Here’s a simple block: + +foo + + +This should be a code block, though: + + +
    + foo +
    +
    +As should this: + + +
    foo
    +
    +Now, nested: + +foo + + + +This should just be an HTML comment: + + + + +Multiline: + + + + + +Code block: + + + + +Just plain comment, with trailing spaces on the line: + + + + +Code: + + +
    +
    +Hr’s: + + +
    +
    +
    +
    +
    +
    +
    +
    +
    + + +---- + +====== Inline Markup ====== + +This is //emphasized//, and so //is this//. + +This is **strong**, and so **is this**. + +An //[[url|emphasized link]]//. + +**//This is strong and em.//** + +So is **//this//** word. + +**//This is strong and em.//** + +So is **//this//** word. + +This is code: ''%%>%%'', ''%%$%%'', ''%%\%%'', ''%%\$%%'', ''%%%%''. + +This is //strikeout//. + +Superscripts: abcd a//hello// ahello there. + +Subscripts: H2O, H23O, Hmany of themO. + +These should not be superscripts or subscripts, because of the unescaped spaces: a^b c^d, a~b c~d. + + +---- + +====== Smart quotes, ellipses, dashes ====== + +“Hello,” said the spider. “‘Shelob’ is my name.” + +‘A’, ‘B’, and ‘C’ are letters. + +‘Oak,’ ‘elm,’ and ‘beech’ are names of trees. So is ‘pine.’ + +‘He said, “I want to go.”’ Were you alive in the 70’s? + +Here is some quoted ‘''%%code%%''’ and a “[[http://example.com/?foo=1&bar=2|quoted link]]”. + +Some dashes: one—two — three—four — five. + +Dashes between numbers: 5–7, 255–66, 1987–1999. + +Ellipses…and…and…. + + +---- + +====== LaTeX ====== + + * + * $2+2=4$ + * $x \in y$ + * $\alpha \wedge \omega$ + * $223$ + * $p$-Tree + * Here’s some display math: $$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$$ + * Here’s one that has a line break in it: $\alpha + \omega \times x^2$. + +These shouldn’t be math: + + * To get the famous equation, write ''%%$e = mc^2$%%''. + * $22,000 is a //lot// of money. So is $34,000. (It worked if “lot” is emphasized.) + * Shoes ($20) and socks ($5). + * Escaped ''%%$%%'': $73 //this should be emphasized// 23$. + +Here’s a LaTeX table: + + + +---- + +====== Special Characters ====== + +Here is some unicode: + + * I hat: Î + * o umlaut: ö + * section: § + * set membership: ∈ + * copyright: © + +AT&T has an ampersand in their name. + +AT&T is another way to write it. + +This & that. + +4 < 5. + +6 > 5. + +Backslash: \ + +Backtick: ` + +Asterisk: * + +Underscore: _ + +Left brace: { + +Right brace: } + +Left bracket: [ + +Right bracket: ] + +Left paren: ( + +Right paren: ) + +Greater-than: > + +Hash: # + +Period: . + +Bang: ! + +Plus: + + +Minus: - + + +---- + +====== Links ====== + +===== Explicit ===== + +Just a [[url/|URL]]. + +[[url/|URL and title]]. + +[[url/|URL and title]]. + +[[url/|URL and title]]. + +[[url/|URL and title]] + +[[url/|URL and title]] + +[[url/with_underscore|with_underscore]] + +[[mailto:nobody@nowhere.net|Email link]] + +[[|Empty]]. + +===== Reference ===== + +Foo [[url/|bar]]. + +With [[url/|embedded [brackets]]]. + +[[url/|b]] by itself should be a link. + +Indented [[url|once]]. + +Indented [[url|twice]]. + +Indented [[url|thrice]]. + +This should [not][] be a link. + + +[not]: /url + +Foo [[url/|bar]]. + +Foo [[url/|biz]]. + +===== With ampersands ===== + +Here’s a [[http://example.com/?foo=1&bar=2|link with an ampersand in the URL]]. + +Here’s a link with an amersand in the link text: [[http://att.com/|AT&T]]. + +Here’s an [[script?foo=1&bar=2|inline link]]. + +Here’s an [[script?foo=1&bar=2|inline link in pointy braces]]. + +===== Autolinks ===== + +With an ampersand: http://example.com/?foo=1&bar=2 + + * In a list? + * http://example.com/ + * It should. + +An e-mail address: + +> Blockquoted: http://example.com/ + +Auto-links should not occur here: ''%%%%'' + + +or here: + + +---- + +====== Images ====== + +From “Voyage dans la Lune” by Georges Melies (1902): + +{{:lalune.jpg|Voyage dans la Lune lalune}} + +Here is a movie {{:movie.jpg|movie}} icon. + + +---- + +====== Footnotes ====== + +Here is a footnote reference,((Here is the footnote. It can go anywhere after the footnote reference. It need not be placed at the end of the document. +)) and another.((Here’s the long note. This one contains multiple blocks. + +Subsequent blocks are indented to show that they belong to the footnote (as with list items). + + + { } + +If you want, you can indent every line, but you can also be lazy and just indent the first line of each block. +)) This should //not// be a footnote reference, because it contains a space.[^my note] Here is an inline note.((This is //easier// to type. Inline notes may contain [[http://google.com|links]] and ''%%]%%'' verbatim characters, as well as [bracketed text]. +)) + +> Notes can go in quotes.((In quote. +> )) + + - And in list items.((In list.)) + +This paragraph should not be part of the note, as it is not indented. diff --git a/test/writer.fb2 b/test/writer.fb2 new file mode 100644 index 0000000..20f5663 --- /dev/null +++ b/test/writer.fb2 @@ -0,0 +1,1015 @@ + + + + +unrecognised +Pandoc Test Suite + +John +MacFarlane + + +Anonymous + +July 17, 2006 + + +pandoc + + + + +<p>Pandoc Test Suite</p> + +
    +

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

    + +

    ——————————

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

    with no blank line

    +
    +
    +
    + +<p>Level 2</p> + +

    with no blank line

    + +

    ——————————

    + +
    +
    +
    + +<p>Paragraphs</p> + +

    Here’s a regular paragraph.

    +

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

    +

    Here’s one with a bullet. * criminey.

    +

    There should be a hard line breakhere.

    + +

    ——————————

    + +
    +
    + +<p>Block Quotes</p> + +

    E-mail style:

    + +

    This is a block quote. It is pretty short.

    +
    + +

    Code in a block quote:

    + +

    +sub status { +

    +

    + print "working"; +

    +

    +} +

    + +

    A list:

    +

    1. item one

    +

    2. item two

    +

    Nested block quotes:

    + +

    nested

    +
    + +

    nested

    +
    +
    +

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

    +

    And a following paragraph.

    + +

    ——————————

    + +
    +
    + +<p>Code Blocks</p> + +

    Code:

    + +

    +---- (should be four hyphens) +

    +

    + + +

    +

    +sub status { +

    +

    + print "working"; +

    +

    +} +

    +

    + + +

    +

    +this code block is indented by one tab +

    + +

    And:

    + +

    + this code block is indented by two tabs +

    +

    + + +

    +

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

    + + +

    ——————————

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

    Asterisks tight:

    +

    • asterisk 1

    +

    • asterisk 2

    +

    • asterisk 3

    +

    Asterisks loose:

    +

    • asterisk 1

    + +

    • asterisk 2

    + +

    • asterisk 3

    + +

    Pluses tight:

    +

    • Plus 1

    +

    • Plus 2

    +

    • Plus 3

    +

    Pluses loose:

    +

    • Plus 1

    + +

    • Plus 2

    + +

    • Plus 3

    + +

    Minuses tight:

    +

    • Minus 1

    +

    • Minus 2

    +

    • Minus 3

    +

    Minuses loose:

    +

    • Minus 1

    + +

    • Minus 2

    + +

    • Minus 3

    + +
    +
    + +<p>Ordered</p> + +

    Tight:

    +

    1. First

    +

    2. Second

    +

    3. Third

    +

    and:

    +

    1. One

    +

    2. Two

    +

    3. Three

    +

    Loose using tabs:

    +

    1. First

    + +

    2. Second

    + +

    3. Third

    + +

    and using spaces:

    +

    1. One

    + +

    2. Two

    + +

    3. Three

    + +

    Multiple paragraphs:

    +

    1. Item 1, graf one.

    + +

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

    + +

    2. Item 2.

    + +

    3. Item 3.

    + +
    +
    + +<p>Nested</p> + +

    • Tab

    +

    • • Tab

    +

    • • • Tab

    +

    Here’s another:

    +

    1. First

    +

    2. Second:

    +

    2. • Fee

    +

    2. • Fie

    +

    2. • Foe

    +

    3. Third

    +

    Same thing but with paragraphs:

    +

    1. First

    + +

    2. Second:

    + +

    2. • Fee

    +

    2. • Fie

    +

    2. • Foe

    +

    3. Third

    + +
    +
    + +<p>Tabs and spaces</p> + +

    • this is a list item indented with tabs

    + +

    • this is a list item indented with spaces

    + +

    • • this is an example list item indented with tabs

    + +

    • • this is an example list item indented with spaces

    + +
    +
    + +<p>Fancy list markers</p> + +

    (2) begins with 2

    +

    (3) and now 3

    + +

        with a continuation

    + +

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

    +

    (3) v. more items

    +

    (3) v. (A) a subsublist

    +

    (3) v. (B) a subsublist

    +

    Nesting:

    +

    A. Upper Alpha

    +

    A. I. Upper Roman.

    +

    A. I. (6) Decimal start with 6

    +

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

    +

    Autonumbering:

    +

    1. Autonumber.

    +

    2. More.

    +

    2. 1. Nested.

    +

    Should not be a list item:

    +

    M.A. 2007

    +

    B. Williams

    + +

    ——————————

    + +
    +
    +
    + +<p>Definition Lists</p> + +

    Tight using spaces:

    +

    +apple +

    +

        red fruit

    +

    +orange +

    +

        orange fruit

    +

    +banana +

    +

        yellow fruit

    +

    Tight using tabs:

    +

    +apple +

    +

        red fruit

    +

    +orange +

    +

        orange fruit

    +

    +banana +

    +

        yellow fruit

    +

    Loose:

    +

    +apple +

    +

        red fruit

    + +

    +orange +

    +

        orange fruit

    + +

    +banana +

    +

        yellow fruit

    + +

    Multiple blocks with italics:

    +

    + +apple + +

    +

        red fruit

    + +

        contains seeds, crisp, pleasant to taste

    + +

    + +orange + +

    +

        orange fruit

    + + +

    +    { orange code block } +

    + + +

        orange block quote

    +
    +

    Multiple definitions, tight:

    +

    +apple +

    +

        red fruit

    +

        computer

    +

    +orange +

    +

        orange fruit

    +

        bank

    +

    Multiple definitions, loose:

    +

    +apple +

    +

        red fruit

    + +

        computer

    + +

    +orange +

    +

        orange fruit

    + +

        bank

    + +

    Blank line after term, indented marker, alternate markers:

    +

    +apple +

    +

        red fruit

    + +

        computer

    + +

    +orange +

    +

        orange fruit

    + +

    1. sublist

    +

    2. sublist

    +
    +
    + +<p>HTML Blocks</p> + +

    Simple block on one line:

    foo

    And nested without indentation:

    +

    foo

    bar

    Interpreted markdown in a table:

    This is emphasizedAnd this is strong +

    Here’s a simple block:

    +

    foo

    +

    This should be a code block, though:

    + +

    +<div> +

    +

    + foo +

    +

    +</div> +

    + +

    As should this:

    + +

    +<div>foo</div> +

    + +

    Now, nested:

    foo

    This should just be an HTML comment:

    +

    Multiline:

    +

    Code block:

    + +

    +<!-- Comment --> +

    + +

    Just plain comment, with trailing spaces on the line:

    +

    Code:

    + +

    +<hr /> +

    + +

    Hr’s:

    + +

    ——————————

    + +
    +
    + +<p>Inline Markup</p> + +

    This is emphasized, and so is this.

    +

    This is strong, and so is this.

    +

    An emphasized link +[1] + +.

    +

    + +This is strong and em. + +

    +

    So is +this + word.

    +

    + +This is strong and em. + +

    +

    So is +this + word.

    +

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

    +

    +This is strikeout. +

    +

    Superscripts: abcd a +hello + ahello there.

    +

    Subscripts: H2O, H23O, Hmany of themO.

    +

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

    + +

    ——————————

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

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

    +

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

    +

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

    +

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

    +

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

    +

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

    +

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

    +

    Ellipses…and…and….

    + +

    ——————————

    + +
    +
    + +<p>LaTeX</p> + +

    • 

    +

    • 2+2=4 +

    +

    • x \in y +

    +

    • \alpha \wedge \omega +

    +

    • 223 +

    +

    • p-Tree

    +

    • Here’s some display math: \frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h} +

    +

    • Here’s one that has a line break in it: \alpha + \omega \times x^2.

    +

    These shouldn’t be math:

    +

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

    +

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

    +

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

    +

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

    +

    Here’s a LaTeX table:

    + +

    ——————————

    + +
    +
    + +<p>Special Characters</p> + +

    Here is some unicode:

    +

    • I hat: Î

    +

    • o umlaut: ö

    +

    • section: §

    +

    • set membership: ∈

    +

    • copyright: ©

    +

    AT&T has an ampersand in their name.

    +

    AT&T is another way to write it.

    +

    This & that.

    +

    4 < 5.

    +

    6 > 5.

    +

    Backslash: \

    +

    Backtick: `

    +

    Asterisk: *

    +

    Underscore: _

    +

    Left brace: {

    +

    Right brace: }

    +

    Left bracket: [

    +

    Right bracket: ]

    +

    Left paren: (

    +

    Right paren: )

    +

    Greater-than: >

    +

    Hash: #

    +

    Period: .

    +

    Bang: !

    +

    Plus: +

    +

    Minus: -

    + +

    ——————————

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

    Just a URL +[3] +.

    +

    URL and title +[4] +.

    +

    URL and title +[5] +.

    +

    URL and title +[6] +.

    +

    URL and title +[7] + +

    +

    URL and title +[8] + +

    +

    with_underscore +[9] + +

    +

    Email link +[10] + +

    +

    Empty +[11] +.

    +
    +
    + +<p>Reference</p> + +

    Foo bar +[12] +.

    +

    With embedded [brackets] +[13] +.

    +

    b +[14] + by itself should be a link.

    +

    Indented once +[15] +.

    +

    Indented twice +[16] +.

    +

    Indented thrice +[17] +.

    +

    This should [not][] be a link.

    + +

    +[not]: /url +

    + +

    Foo bar +[18] +.

    +

    Foo biz +[19] +.

    +
    +
    + +<p>With ampersands</p> + +

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

    +

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

    +

    Here’s an inline link +[22] +.

    +

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

    +
    +
    + +<p>Autolinks</p> + +

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

    +

    • In a list?

    +

    • http://example.com/ +[25] + +

    +

    • It should.

    +

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

    + +

    Blockquoted: http://example.com/ +[27] + +

    +
    +

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

    + +

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

    + + +

    ——————————

    + +
    +
    +
    + +<p>Images</p> + +

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

    +lalune +

    Here is a movie movie icon.

    + +

    ——————————

    + +
    +
    + +<p>Footnotes</p> + +

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

    + +

    Notes can go in quotes. +[31] + +

    +
    +

    1. And in list items. +[32] + +

    +

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

    +
    + + +
    + +<p>1</p> + +

    +/url +

    +
    +
    + +<p>2</p> + +

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

    +
    +
    + +<p>3</p> + +

    +/url/ +

    +
    +
    + +<p>4</p> + +

    title: /url/ +

    +
    +
    + +<p>5</p> + +

    title preceded by two spaces: /url/ +

    +
    +
    + +<p>6</p> + +

    title preceded by a tab: /url/ +

    +
    +
    + +<p>7</p> + +

    title with "quotes" in it: /url/ +

    +
    +
    + +<p>8</p> + +

    title with single quotes: /url/ +

    +
    +
    + +<p>9</p> + +

    +/url/with_underscore +

    +
    +
    + +<p>10</p> + +

    +mailto:nobody@nowhere.net +

    +
    +
    + +<p>11</p> + +

    + + +

    +
    +
    + +<p>12</p> + +

    +/url/ +

    +
    +
    + +<p>13</p> + +

    +/url/ +

    +
    +
    + +<p>14</p> + +

    +/url/ +

    +
    +
    + +<p>15</p> + +

    +/url +

    +
    +
    + +<p>16</p> + +

    +/url +

    +
    +
    + +<p>17</p> + +

    +/url +

    +
    +
    + +<p>18</p> + +

    Title with "quotes" inside: /url/ +

    +
    +
    + +<p>19</p> + +

    Title with "quote" inside: /url/ +

    +
    +
    + +<p>20</p> + +

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

    +
    +
    + +<p>21</p> + +

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

    +
    +
    + +<p>22</p> + +

    +/script?foo=1&bar=2 +

    +
    +
    + +<p>23</p> + +

    +/script?foo=1&bar=2 +

    +
    +
    + +<p>24</p> + +

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

    +
    +
    + +<p>25</p> + +

    +http://example.com/ +

    +
    +
    + +<p>26</p> + +

    +mailto:nobody@nowhere.net +

    +
    +
    + +<p>27</p> + +

    +http://example.com/ +

    +
    +
    + +<p>28</p> + +

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

    +
    +
    + +<p>29</p> + +

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

    +

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

    + +

    + { <code> } +

    + +

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

    +
    +
    + +<p>30</p> + +

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

    +
    +
    + +<p>31</p> + +

    In quote.

    +
    +
    + +<p>32</p> + +

    In list.

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

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

    +
    +

    Headers

    + +

    Level 3 with emphasis

    +

    Level 4

    +
    Level 5
    +

    Level 1

    +

    Level 2 with emphasis

    +

    Level 3

    +

    with no blank line

    +

    Level 2

    +

    with no blank line

    +
    +

    Paragraphs

    +

    Here’s a regular paragraph.

    +

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

    +

    Here’s one with a bullet. * criminey.

    +

    There should be a hard line break
    +here.

    +
    +

    Block Quotes

    +

    E-mail style:

    +
    +

    This is a block quote. It is pretty short.

    +
    +
    +

    Code in a block quote:

    +
    sub status {
    +    print "working";
    +}
    +

    A list:

    +
      +
    1. item one
    2. +
    3. item two
    4. +
    +

    Nested block quotes:

    +
    +

    nested

    +
    +
    +

    nested

    +
    +
    +

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

    +

    And a following paragraph.

    +
    +

    Code Blocks

    +

    Code:

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

    And:

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

    Lists

    +

    Unordered

    +

    Asterisks tight:

    +
      +
    • asterisk 1
    • +
    • asterisk 2
    • +
    • asterisk 3
    • +
    +

    Asterisks loose:

    +
      +
    • asterisk 1

    • +
    • asterisk 2

    • +
    • asterisk 3

    • +
    +

    Pluses tight:

    +
      +
    • Plus 1
    • +
    • Plus 2
    • +
    • Plus 3
    • +
    +

    Pluses loose:

    +
      +
    • Plus 1

    • +
    • Plus 2

    • +
    • Plus 3

    • +
    +

    Minuses tight:

    +
      +
    • Minus 1
    • +
    • Minus 2
    • +
    • Minus 3
    • +
    +

    Minuses loose:

    +
      +
    • Minus 1

    • +
    • Minus 2

    • +
    • Minus 3

    • +
    +

    Ordered

    +

    Tight:

    +
      +
    1. First
    2. +
    3. Second
    4. +
    5. Third
    6. +
    +

    and:

    +
      +
    1. One
    2. +
    3. Two
    4. +
    5. Three
    6. +
    +

    Loose using tabs:

    +
      +
    1. First

    2. +
    3. Second

    4. +
    5. Third

    6. +
    +

    and using spaces:

    +
      +
    1. One

    2. +
    3. Two

    4. +
    5. Three

    6. +
    +

    Multiple paragraphs:

    +
      +
    1. Item 1, graf one.

      +

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

    2. +
    3. Item 2.

    4. +
    5. Item 3.

    6. +
    +

    Nested

    +
      +
    • Tab +
        +
      • Tab +
          +
        • Tab
        • +
      • +
    • +
    +

    Here’s another:

    +
      +
    1. First
    2. +
    3. Second: +
        +
      • Fee
      • +
      • Fie
      • +
      • Foe
      • +
    4. +
    5. Third
    6. +
    +

    Same thing but with paragraphs:

    +
      +
    1. First

    2. +
    3. Second:

      +
        +
      • Fee
      • +
      • Fie
      • +
      • Foe
      • +
    4. +
    5. Third

    6. +
    +

    Tabs and spaces

    +
      +
    • this is a list item indented with tabs

    • +
    • this is a list item indented with spaces

      +
        +
      • this is an example list item indented with tabs

      • +
      • this is an example list item indented with spaces

      • +
    • +
    +

    Fancy list markers

    +
      +
    1. begins with 2
    2. +
    3. and now 3

      +

      with a continuation

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

    Nesting:

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

    Autonumbering:

    +
      +
    1. Autonumber.
    2. +
    3. More. +
        +
      1. Nested.
      2. +
    4. +
    +

    Should not be a list item:

    +

    M.A. 2007

    +

    B. Williams

    +
    +

    Definition Lists

    +

    Tight using spaces:

    +
    +
    apple
    +
    red fruit +
    +
    orange
    +
    orange fruit +
    +
    banana
    +
    yellow fruit +
    +
    +

    Tight using tabs:

    +
    +
    apple
    +
    red fruit +
    +
    orange
    +
    orange fruit +
    +
    banana
    +
    yellow fruit +
    +
    +

    Loose:

    +
    +
    apple
    +

    red fruit

    +
    +
    orange
    +

    orange fruit

    +
    +
    banana
    +

    yellow fruit

    +
    +
    +

    Multiple blocks with italics:

    +
    +
    apple
    +

    red fruit

    +

    contains seeds, crisp, pleasant to taste

    +
    +
    orange
    +

    orange fruit

    +
    { orange code block }
    +
    +

    orange block quote

    +
    +
    +
    +

    Multiple definitions, tight:

    +
    +
    apple
    +
    red fruit +
    +
    computer +
    +
    orange
    +
    orange fruit +
    +
    bank +
    +
    +

    Multiple definitions, loose:

    +
    +
    apple
    +

    red fruit

    +
    +

    computer

    +
    +
    orange
    +

    orange fruit

    +
    +

    bank

    +
    +
    +

    Blank line after term, indented marker, alternate markers:

    +
    +
    apple
    +

    red fruit

    +
    +

    computer

    +
    +
    orange
    +

    orange fruit

    +
      +
    1. sublist
    2. +
    3. sublist
    4. +
    +
    +
    +

    HTML Blocks

    +

    Simple block on one line:

    +
    +foo +
    +

    And nested without indentation:

    +
    +
    +
    +

    foo

    +
    +
    +
    +bar +
    +
    +

    Interpreted markdown in a table:

    + + + + + +
    +This is emphasized + +And this is strong +
    + +

    Here’s a simple block:

    +
    +

    foo

    +
    +

    This should be a code block, though:

    +
    <div>
    +    foo
    +</div>
    +

    As should this:

    +
    <div>foo</div>
    +

    Now, nested:

    +
    +
    +
    +foo +
    +
    +
    +

    This should just be an HTML comment:

    + +

    Multiline:

    + + +

    Code block:

    +
    <!-- Comment -->
    +

    Just plain comment, with trailing spaces on the line:

    + +

    Code:

    +
    <hr />
    +

    Hr’s:

    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +

    Inline Markup

    +

    This is emphasized, and so is this.

    +

    This is strong, and so is this.

    +

    An emphasized link.

    +

    This is strong and em.

    +

    So is this word.

    +

    This is strong and em.

    +

    So is this word.

    +

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

    +

    This is strikeout.

    +

    Superscripts: abcd ahello ahello there.

    +

    Subscripts: H2O, H23O, Hmany of themO.

    +

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

    +
    +

    Smart quotes, ellipses, dashes

    +

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

    +

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

    +

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

    +

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

    +

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

    +

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

    +

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

    +

    Ellipses…and…and….

    +
    +

    LaTeX

    +
      +
    • +
    • 2 + 2 = 4
    • +
    • x ∈ y
    • +
    • α ∧ ω
    • +
    • 223
    • +
    • p-Tree
    • +
    • Here’s some display math:
      $$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$$
    • +
    • Here’s one that has a line break in it: α + ω × x2.
    • +
    +

    These shouldn’t be math:

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

    Here’s a LaTeX table:

    + +
    +

    Special Characters

    +

    Here is some unicode:

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

    AT&T has an ampersand in their name.

    +

    AT&T is another way to write it.

    +

    This & that.

    +

    4 < 5.

    +

    6 > 5.

    +

    Backslash: \

    +

    Backtick: `

    +

    Asterisk: *

    +

    Underscore: _

    +

    Left brace: {

    +

    Right brace: }

    +

    Left bracket: [

    +

    Right bracket: ]

    +

    Left paren: (

    +

    Right paren: )

    +

    Greater-than: >

    +

    Hash: #

    +

    Period: .

    +

    Bang: !

    +

    Plus: +

    +

    Minus: -

    +
    +

    Links

    +

    Explicit

    +

    Just a URL.

    +

    URL and title.

    +

    URL and title.

    +

    URL and title.

    +

    URL and title

    +

    URL and title

    +

    with_underscore

    +

    Email link

    +

    Empty.

    +

    Reference

    +

    Foo bar.

    +

    With embedded [brackets].

    +

    b by itself should be a link.

    +

    Indented once.

    +

    Indented twice.

    +

    Indented thrice.

    +

    This should [not][] be a link.

    +
    [not]: /url
    +

    Foo bar.

    +

    Foo biz.

    +

    With ampersands

    +

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

    +

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

    +

    Here’s an inline link.

    +

    Here’s an inline link in pointy braces.

    + +

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

    + +

    An e-mail address: nobody@nowhere.net

    +
    +

    Blockquoted: http://example.com/

    +
    +

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

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

    Images

    +

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

    +
    +lalune +

    lalune

    +
    +

    Here is a movie movie icon.

    +
    +

    Footnotes

    +

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

    +
    +

    Notes can go in quotes.4

    +
    +
      +
    1. And in list items.5
    2. +
    +

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

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

    2. +
    3. 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.

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

    6. +
    7. In quote.

    8. +
    9. In list.

    10. +
    +
    + + diff --git a/test/writer.html5 b/test/writer.html5 new file mode 100644 index 0000000..53fcb84 --- /dev/null +++ b/test/writer.html5 @@ -0,0 +1,551 @@ + + + + + + + + + + Pandoc Test Suite + + + + +
    +

    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 3 with emphasis

    +

    Level 4

    +
    Level 5
    +

    Level 1

    +

    Level 2 with emphasis

    +

    Level 3

    +

    with no blank line

    +

    Level 2

    +

    with no blank line

    +
    +

    Paragraphs

    +

    Here’s a regular paragraph.

    +

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

    +

    Here’s one with a bullet. * criminey.

    +

    There should be a hard line break
    +here.

    +
    +

    Block Quotes

    +

    E-mail style:

    +
    +

    This is a block quote. It is pretty short.

    +
    +
    +

    Code in a block quote:

    +
    sub status {
    +    print "working";
    +}
    +

    A list:

    +
      +
    1. item one
    2. +
    3. item two
    4. +
    +

    Nested block quotes:

    +
    +

    nested

    +
    +
    +

    nested

    +
    +
    +

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

    +

    And a following paragraph.

    +
    +

    Code Blocks

    +

    Code:

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

    And:

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

    Lists

    +

    Unordered

    +

    Asterisks tight:

    +
      +
    • asterisk 1
    • +
    • asterisk 2
    • +
    • asterisk 3
    • +
    +

    Asterisks loose:

    +
      +
    • asterisk 1

    • +
    • asterisk 2

    • +
    • asterisk 3

    • +
    +

    Pluses tight:

    +
      +
    • Plus 1
    • +
    • Plus 2
    • +
    • Plus 3
    • +
    +

    Pluses loose:

    +
      +
    • Plus 1

    • +
    • Plus 2

    • +
    • Plus 3

    • +
    +

    Minuses tight:

    +
      +
    • Minus 1
    • +
    • Minus 2
    • +
    • Minus 3
    • +
    +

    Minuses loose:

    +
      +
    • Minus 1

    • +
    • Minus 2

    • +
    • Minus 3

    • +
    +

    Ordered

    +

    Tight:

    +
      +
    1. First
    2. +
    3. Second
    4. +
    5. Third
    6. +
    +

    and:

    +
      +
    1. One
    2. +
    3. Two
    4. +
    5. Three
    6. +
    +

    Loose using tabs:

    +
      +
    1. First

    2. +
    3. Second

    4. +
    5. Third

    6. +
    +

    and using spaces:

    +
      +
    1. One

    2. +
    3. Two

    4. +
    5. Three

    6. +
    +

    Multiple paragraphs:

    +
      +
    1. Item 1, graf one.

      +

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

    2. +
    3. Item 2.

    4. +
    5. Item 3.

    6. +
    +

    Nested

    +
      +
    • Tab +
        +
      • Tab +
          +
        • Tab
        • +
      • +
    • +
    +

    Here’s another:

    +
      +
    1. First
    2. +
    3. Second: +
        +
      • Fee
      • +
      • Fie
      • +
      • Foe
      • +
    4. +
    5. Third
    6. +
    +

    Same thing but with paragraphs:

    +
      +
    1. First

    2. +
    3. Second:

      +
        +
      • Fee
      • +
      • Fie
      • +
      • Foe
      • +
    4. +
    5. Third

    6. +
    +

    Tabs and spaces

    +
      +
    • this is a list item indented with tabs

    • +
    • this is a list item indented with spaces

      +
        +
      • this is an example list item indented with tabs

      • +
      • this is an example list item indented with spaces

      • +
    • +
    +

    Fancy list markers

    +
      +
    1. begins with 2
    2. +
    3. and now 3

      +

      with a continuation

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

    Nesting:

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

    Autonumbering:

    +
      +
    1. Autonumber.
    2. +
    3. More. +
        +
      1. Nested.
      2. +
    4. +
    +

    Should not be a list item:

    +

    M.A. 2007

    +

    B. Williams

    +
    +

    Definition Lists

    +

    Tight using spaces:

    +
    +
    apple
    +
    red fruit +
    +
    orange
    +
    orange fruit +
    +
    banana
    +
    yellow fruit +
    +
    +

    Tight using tabs:

    +
    +
    apple
    +
    red fruit +
    +
    orange
    +
    orange fruit +
    +
    banana
    +
    yellow fruit +
    +
    +

    Loose:

    +
    +
    apple
    +

    red fruit

    +
    +
    orange
    +

    orange fruit

    +
    +
    banana
    +

    yellow fruit

    +
    +
    +

    Multiple blocks with italics:

    +
    +
    apple
    +

    red fruit

    +

    contains seeds, crisp, pleasant to taste

    +
    +
    orange
    +

    orange fruit

    +
    { orange code block }
    +
    +

    orange block quote

    +
    +
    +
    +

    Multiple definitions, tight:

    +
    +
    apple
    +
    red fruit +
    +
    computer +
    +
    orange
    +
    orange fruit +
    +
    bank +
    +
    +

    Multiple definitions, loose:

    +
    +
    apple
    +

    red fruit

    +
    +

    computer

    +
    +
    orange
    +

    orange fruit

    +
    +

    bank

    +
    +
    +

    Blank line after term, indented marker, alternate markers:

    +
    +
    apple
    +

    red fruit

    +
    +

    computer

    +
    +
    orange
    +

    orange fruit

    +
      +
    1. sublist
    2. +
    3. sublist
    4. +
    +
    +
    +

    HTML Blocks

    +

    Simple block on one line:

    +
    +foo +
    +

    And nested without indentation:

    +
    +
    +
    +

    foo

    +
    +
    +
    +bar +
    +
    +

    Interpreted markdown in a table:

    + + + + + +
    +This is emphasized + +And this is strong +
    + +

    Here’s a simple block:

    +
    +

    foo

    +
    +

    This should be a code block, though:

    +
    <div>
    +    foo
    +</div>
    +

    As should this:

    +
    <div>foo</div>
    +

    Now, nested:

    +
    +
    +
    +foo +
    +
    +
    +

    This should just be an HTML comment:

    + +

    Multiline:

    + + +

    Code block:

    +
    <!-- Comment -->
    +

    Just plain comment, with trailing spaces on the line:

    + +

    Code:

    +
    <hr />
    +

    Hr’s:

    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +

    Inline Markup

    +

    This is emphasized, and so is this.

    +

    This is strong, and so is this.

    +

    An emphasized link.

    +

    This is strong and em.

    +

    So is this word.

    +

    This is strong and em.

    +

    So is this word.

    +

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

    +

    This is strikeout.

    +

    Superscripts: abcd ahello ahello there.

    +

    Subscripts: H2O, H23O, Hmany of themO.

    +

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

    +
    +

    Smart quotes, ellipses, dashes

    +

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

    +

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

    +

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

    +

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

    +

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

    +

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

    +

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

    +

    Ellipses…and…and….

    +
    +

    LaTeX

    +
      +
    • +
    • 2 + 2 = 4
    • +
    • x ∈ y
    • +
    • α ∧ ω
    • +
    • 223
    • +
    • p-Tree
    • +
    • Here’s some display math:
      $$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$$
    • +
    • Here’s one that has a line break in it: α + ω × x2.
    • +
    +

    These shouldn’t be math:

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

    Here’s a LaTeX table:

    + +
    +

    Special Characters

    +

    Here is some unicode:

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

    AT&T has an ampersand in their name.

    +

    AT&T is another way to write it.

    +

    This & that.

    +

    4 < 5.

    +

    6 > 5.

    +

    Backslash: \

    +

    Backtick: `

    +

    Asterisk: *

    +

    Underscore: _

    +

    Left brace: {

    +

    Right brace: }

    +

    Left bracket: [

    +

    Right bracket: ]

    +

    Left paren: (

    +

    Right paren: )

    +

    Greater-than: >

    +

    Hash: #

    +

    Period: .

    +

    Bang: !

    +

    Plus: +

    +

    Minus: -

    +
    +

    Links

    +

    Explicit

    +

    Just a URL.

    +

    URL and title.

    +

    URL and title.

    +

    URL and title.

    +

    URL and title

    +

    URL and title

    +

    with_underscore

    +

    Email link

    +

    Empty.

    +

    Reference

    +

    Foo bar.

    +

    With embedded [brackets].

    +

    b by itself should be a link.

    +

    Indented once.

    +

    Indented twice.

    +

    Indented thrice.

    +

    This should [not][] be a link.

    +
    [not]: /url
    +

    Foo bar.

    +

    Foo biz.

    +

    With ampersands

    +

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

    +

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

    +

    Here’s an inline link.

    +

    Here’s an inline link in pointy braces.

    + +

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

    + +

    An e-mail address: nobody@nowhere.net

    +
    +

    Blockquoted: http://example.com/

    +
    +

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

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

    Images

    +

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

    +
    +lalune
    lalune
    +
    +

    Here is a movie movie icon.

    +
    +

    Footnotes

    +

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

    +
    +

    Notes can go in quotes.4

    +
    +
      +
    1. And in list items.5
    2. +
    +

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

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

    2. +
    3. 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.

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

    6. +
    7. In quote.

    8. +
    9. In list.

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

    + with no blank line +

    +
    +
    + + Level 2 +

    + with no blank line +

    +
    +
    + + Paragraphs +

    + Here’s a regular paragraph. +

    +

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

    +

    + Here’s one with a bullet. * criminey. +

    +

    + There should be a hard line breakhere. +

    +
    + + Block Quotes +

    + E-mail style: +

    + +

    + This is a block quote. It is pretty short. +

    +
    + +

    + Code in a block quote: +

    + sub status { + print "working"; +} +

    + A list: +

    + + +

    + item one +

    +
    + +

    + item two +

    +
    +
    +

    + Nested block quotes: +

    + +

    + nested +

    +
    + +

    + nested +

    +
    +
    +

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

    +

    + And a following paragraph. +

    +
    + + Code Blocks +

    + Code: +

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

    + And: +

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

    + Asterisks tight: +

    + + +

    + asterisk 1 +

    +
    + +

    + asterisk 2 +

    +
    + +

    + asterisk 3 +

    +
    +
    +

    + Asterisks loose: +

    + + +

    + asterisk 1 +

    +
    + +

    + asterisk 2 +

    +
    + +

    + asterisk 3 +

    +
    +
    +

    + Pluses tight: +

    + + +

    + Plus 1 +

    +
    + +

    + Plus 2 +

    +
    + +

    + Plus 3 +

    +
    +
    +

    + Pluses loose: +

    + + +

    + Plus 1 +

    +
    + +

    + Plus 2 +

    +
    + +

    + Plus 3 +

    +
    +
    +

    + Minuses tight: +

    + + +

    + Minus 1 +

    +
    + +

    + Minus 2 +

    +
    + +

    + Minus 3 +

    +
    +
    +

    + Minuses loose: +

    + + +

    + Minus 1 +

    +
    + +

    + Minus 2 +

    +
    + +

    + Minus 3 +

    +
    +
    +
    + + Ordered +

    + Tight: +

    + + +

    + First +

    +
    + +

    + Second +

    +
    + +

    + Third +

    +
    +
    +

    + and: +

    + + +

    + One +

    +
    + +

    + Two +

    +
    + +

    + Three +

    +
    +
    +

    + Loose using tabs: +

    + + +

    + First +

    +
    + +

    + Second +

    +
    + +

    + Third +

    +
    +
    +

    + and using spaces: +

    + + +

    + One +

    +
    + +

    + Two +

    +
    + +

    + Three +

    +
    +
    +

    + Multiple paragraphs: +

    + + +

    + Item 1, graf one. +

    +

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

    +
    + +

    + Item 2. +

    +
    + +

    + Item 3. +

    +
    +
    +
    + + Nested + + +

    + Tab +

    + + +

    + Tab +

    + + +

    + Tab +

    +
    +
    +
    +
    +
    +
    +

    + Here’s another: +

    + + +

    + First +

    +
    + +

    + Second: +

    + + +

    + Fee +

    +
    + +

    + Fie +

    +
    + +

    + Foe +

    +
    +
    +
    + +

    + Third +

    +
    +
    +

    + Same thing but with paragraphs: +

    + + +

    + First +

    +
    + +

    + Second: +

    + + +

    + Fee +

    +
    + +

    + Fie +

    +
    + +

    + Foe +

    +
    +
    +
    + +

    + Third +

    +
    +
    +
    + + Tabs and spaces + + +

    + this is a list item indented with tabs +

    +
    + +

    + this is a list item indented with spaces +

    + + +

    + this is an example list item indented with tabs +

    +
    + +

    + this is an example list item indented with spaces +

    +
    +
    +
    +
    +
    + + Fancy list markers + + + +

    + begins with 2 +

    +
    + + +

    + and now 3 +

    +

    + with a continuation +

    + + + +

    + sublist with roman numerals, starting with 4 +

    +
    + + +

    + more items +

    + + + +

    + a subsublist +

    +
    + + +

    + a subsublist +

    +
    +
    +
    +
    +
    +
    +

    + Nesting: +

    + + +

    + Upper Alpha +

    + + +

    + Upper Roman. +

    + + + +

    + Decimal start with 6 +

    + + + +

    + Lower alpha with paren +

    +
    +
    +
    +
    +
    +
    +
    +
    +

    + Autonumbering: +

    + + +

    + Autonumber. +

    +
    + +

    + More. +

    + + +

    + Nested. +

    +
    +
    +
    +
    +

    + Should not be a list item: +

    +

    + M.A. 2007 +

    +

    + B. Williams +

    +
    +
    + + Definition Lists +

    + Tight using spaces: +

    + + + + apple + + +

    + red fruit +

    +
    +
    + + + orange + + +

    + orange fruit +

    +
    +
    + + + banana + + +

    + yellow fruit +

    +
    +
    +
    +

    + Tight using tabs: +

    + + + + apple + + +

    + red fruit +

    +
    +
    + + + orange + + +

    + orange fruit +

    +
    +
    + + + banana + + +

    + yellow fruit +

    +
    +
    +
    +

    + Loose: +

    + + + + apple + + +

    + red fruit +

    +
    +
    + + + orange + + +

    + orange fruit +

    +
    +
    + + + banana + + +

    + yellow fruit +

    +
    +
    +
    +

    + Multiple blocks with italics: +

    + + + + apple + + +

    + red fruit +

    +

    + contains seeds, crisp, pleasant to taste +

    +
    +
    + + + orange + + +

    + orange fruit +

    + { orange code block } + +

    + orange block quote +

    +
    +
    +
    +
    +

    + Multiple definitions, tight: +

    + + + + apple + + +

    + red fruit +

    +

    + computer +

    +
    +
    + + + orange + + +

    + orange fruit +

    +

    + bank +

    +
    +
    +
    +

    + Multiple definitions, loose: +

    + + + + apple + + +

    + red fruit +

    +

    + computer +

    +
    +
    + + + orange + + +

    + orange fruit +

    +

    + bank +

    +
    +
    +
    +

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

    + + + + apple + + +

    + red fruit +

    +

    + computer +

    +
    +
    + + + orange + + +

    + orange fruit +

    + + +

    + sublist +

    +
    + +

    + sublist +

    +
    +
    +
    +
    +
    +
    + + HTML Blocks +

    + Simple block on one line: +

    + +

    + foo +

    +
    +

    + And nested without indentation: +

    + + + +

    + foo +

    +
    +
    + +

    + bar +

    +
    +
    +

    + Interpreted markdown in a table: +

    +

    + This is emphasized +

    +

    + And this is strong +

    +

    + Here’s a simple block: +

    + +

    + foo +

    +
    +

    + This should be a code block, though: +

    + <div> + foo +</div> +

    + As should this: +

    + <div>foo</div> +

    + Now, nested: +

    + + + +

    + foo +

    +
    +
    +
    +

    + This should just be an HTML comment: +

    +

    + Multiline: +

    +

    + Code block: +

    + <!-- Comment --> +

    + Just plain comment, with trailing spaces on the line: +

    +

    + Code: +

    + <hr /> +

    + Hr’s: +

    +
    + + Inline Markup +

    + This is emphasized, and so is this. +

    +

    + This is strong, and so is + this. +

    +

    + An emphasized + link. +

    +

    + This is strong and em. +

    +

    + So is this word. +

    +

    + This is strong and em. +

    +

    + So is this word. +

    +

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

    +

    + This is strikeout. +

    +

    + Superscripts: abcd ahello + ahello there. +

    +

    + Subscripts: H2O, H23O, Hmany of themO. +

    +

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

    +
    + + Smart quotes, ellipses, dashes +

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

    +

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

    +

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

    +

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

    +

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

    +

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

    +

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

    +

    + Ellipses…and…and…. +

    +
    + + LaTeX + + +

    +

    +
    + +

    + + + 2+2=4 +

    +
    + +

    + + + xy +

    +
    + +

    + + + αω +

    +
    + +

    + + + 223 +

    +
    + +

    + + + p-Tree +

    +
    + +

    + Here’s some display math: + + ddxf(x)=limh0f(x+h)f(x)h +

    +
    + +

    + Here’s one that has a line break in it: + + α+ω×x2. +

    +
    +
    +

    + These shouldn’t be math: +

    + + +

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

    +
    + +

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

    +
    + +

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

    +
    + +

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

    +
    +
    +

    + Here’s a LaTeX table: +

    +
    + + Special Characters +

    + Here is some unicode: +

    + + +

    + I hat: Î +

    +
    + +

    + o umlaut: ö +

    +
    + +

    + section: § +

    +
    + +

    + set membership: ∈ +

    +
    + +

    + copyright: © +

    +
    +
    +

    + AT&T has an ampersand in their name. +

    +

    + AT&T is another way to write it. +

    +

    + This & that. +

    +

    + 4 < 5. +

    +

    + 6 > 5. +

    +

    + Backslash: \ +

    +

    + Backtick: ` +

    +

    + Asterisk: * +

    +

    + Underscore: _ +

    +

    + Left brace: { +

    +

    + Right brace: } +

    +

    + Left bracket: [ +

    +

    + Right bracket: ] +

    +

    + Left paren: ( +

    +

    + Right paren: ) +

    +

    + Greater-than: > +

    +

    + Hash: # +

    +

    + Period: . +

    +

    + Bang: ! +

    +

    + Plus: + +

    +

    + Minus: - +

    +
    + + Links + + Explicit +

    + Just a URL. +

    +

    + URL + and title. +

    +

    + URL + and title. +

    +

    + URL + and title. +

    +

    + URL + and title +

    +

    + URL + and title +

    +

    + with_underscore +

    +

    + Email + link +

    +

    + Empty. +

    +
    + + Reference +

    + Foo bar. +

    +

    + With embedded + [brackets]. +

    +

    + b by itself + should be a link. +

    +

    + Indented + once. +

    +

    + Indented + twice. +

    +

    + Indented + thrice. +

    +

    + This should [not][] be a link. +

    + [not]: /url +

    + Foo + bar. +

    +

    + Foo + biz. +

    +
    + + With ampersands +

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

    +

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

    +

    + Here’s an + inline + link. +

    +

    + Here’s an + inline + link in pointy braces. +

    +
    + + Autolinks +

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

    + + +

    + In a list? +

    +
    + +

    + http://example.com/ +

    +
    + +

    + It should. +

    +
    +
    +

    + An e-mail address: nobody@nowhere.net +

    + +

    + Blockquoted: + http://example.com/ +

    +
    +

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

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

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

    + + lalune + + +

    + Here is a movie + + icon. +

    +
    + + Footnotes +

    + Here is a footnote reference, +

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

    + and another. +

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

    +

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

    + { <code> } +

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

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

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

    +
    +

    + +

    + Notes can go in quotes. +

    + In quote. +

    + +

    +
    + + +

    + And in list items. +

    + In list. +

    + +

    +
    +
    +

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

    +
    + + + +
    diff --git a/test/writer.latex b/test/writer.latex new file mode 100644 index 0000000..9500c7c --- /dev/null +++ b/test/writer.latex @@ -0,0 +1,997 @@ +\PassOptionsToPackage{unicode=true}{hyperref} % options for packages loaded elsewhere +\PassOptionsToPackage{hyphens}{url} +% +\documentclass[]{article} +\usepackage{lmodern} +\usepackage{amssymb,amsmath} +\usepackage{ifxetex,ifluatex} +\usepackage{fixltx2e} % provides \textsubscript +\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex + \usepackage[T1]{fontenc} + \usepackage[utf8]{inputenc} + \usepackage{textcomp} % provides euro and other symbols +\else % if luatex or xelatex + \usepackage{unicode-math} + \defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase} +\fi +% use upquote if available, for straight quotes in verbatim environments +\IfFileExists{upquote.sty}{\usepackage{upquote}}{} +% use microtype if available +\IfFileExists{microtype.sty}{% +\usepackage[]{microtype} +\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts +}{} +\IfFileExists{parskip.sty}{% +\usepackage{parskip} +}{% else +\setlength{\parindent}{0pt} +\setlength{\parskip}{6pt plus 2pt minus 1pt} +} +\usepackage{fancyvrb} +\usepackage{hyperref} +\hypersetup{ + pdftitle={Pandoc Test Suite}, + pdfauthor={John MacFarlane; Anonymous}, + pdfborder={0 0 0}, + breaklinks=true} +\urlstyle{same} % don't use monospace font for urls +\VerbatimFootnotes % allows verbatim text in footnotes +\usepackage{graphicx,grffile} +\makeatletter +\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi} +\def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi} +\makeatother +% Scale images if necessary, so that they will not overflow the page +% margins by default, and it is still possible to overwrite the defaults +% using explicit options in \includegraphics[width, height, ...]{} +\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio} +\usepackage[normalem]{ulem} +% avoid problems with \sout in headers with hyperref: +\pdfstringdefDisableCommands{\renewcommand{\sout}{}} +\setlength{\emergencystretch}{3em} % prevent overfull lines +\providecommand{\tightlist}{% + \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} +\setcounter{secnumdepth}{0} +% Redefines (sub)paragraphs to behave more like sections +\ifx\paragraph\undefined\else +\let\oldparagraph\paragraph +\renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}} +\fi +\ifx\subparagraph\undefined\else +\let\oldsubparagraph\subparagraph +\renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}} +\fi + +% set default figure placement to htbp +\makeatletter +\def\fps@figure{htbp} +\makeatother + + +\title{Pandoc Test Suite} +\author{John MacFarlane \and Anonymous} +\date{July 17, 2006} + +\begin{document} +\maketitle + +This is a set of tests for pandoc. Most of them are adapted from John Gruber's +markdown test suite. + +\begin{center}\rule{0.5\linewidth}{\linethickness}\end{center} + +\hypertarget{headers}{% +\section{Headers}\label{headers}} + +\hypertarget{level-2-with-an-embedded-link}{% +\subsection{\texorpdfstring{Level 2 with an \href{/url}{embedded +link}}{Level 2 with an embedded link}}\label{level-2-with-an-embedded-link}} + +\hypertarget{level-3-with-emphasis}{% +\subsubsection{\texorpdfstring{Level 3 with +\emph{emphasis}}{Level 3 with emphasis}}\label{level-3-with-emphasis}} + +\hypertarget{level-4}{% +\paragraph{Level 4}\label{level-4}} + +\hypertarget{level-5}{% +\subparagraph{Level 5}\label{level-5}} + +\hypertarget{level-1}{% +\section{Level 1}\label{level-1}} + +\hypertarget{level-2-with-emphasis}{% +\subsection{\texorpdfstring{Level 2 with +\emph{emphasis}}{Level 2 with emphasis}}\label{level-2-with-emphasis}} + +\hypertarget{level-3}{% +\subsubsection{Level 3}\label{level-3}} + +with no blank line + +\hypertarget{level-2}{% +\subsection{Level 2}\label{level-2}} + +with no blank line + +\begin{center}\rule{0.5\linewidth}{\linethickness}\end{center} + +\hypertarget{paragraphs}{% +\section{Paragraphs}\label{paragraphs}} + +Here's a regular paragraph. + +In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item. +Because a hard-wrapped line in the middle of a paragraph looked like a list +item. + +Here's one with a bullet. * criminey. + +There should be a hard line break\\ +here. + +\begin{center}\rule{0.5\linewidth}{\linethickness}\end{center} + +\hypertarget{block-quotes}{% +\section{Block Quotes}\label{block-quotes}} + +E-mail style: + +\begin{quote} +This is a block quote. It is pretty short. +\end{quote} + +\begin{quote} +Code in a block quote: + +\begin{verbatim} +sub status { + print "working"; +} +\end{verbatim} + +A list: + +\begin{enumerate} +\def\labelenumi{\arabic{enumi}.} +\tightlist +\item + item one +\item + item two +\end{enumerate} + +Nested block quotes: + +\begin{quote} +nested +\end{quote} + +\begin{quote} +nested +\end{quote} +\end{quote} + +This should not be a block quote: 2 \textgreater{} 1. + +And a following paragraph. + +\begin{center}\rule{0.5\linewidth}{\linethickness}\end{center} + +\hypertarget{code-blocks}{% +\section{Code Blocks}\label{code-blocks}} + +Code: + +\begin{verbatim} +---- (should be four hyphens) + +sub status { + print "working"; +} + +this code block is indented by one tab +\end{verbatim} + +And: + +\begin{verbatim} + this code block is indented by two tabs + +These should not be escaped: \$ \\ \> \[ \{ +\end{verbatim} + +\begin{center}\rule{0.5\linewidth}{\linethickness}\end{center} + +\hypertarget{lists}{% +\section{Lists}\label{lists}} + +\hypertarget{unordered}{% +\subsection{Unordered}\label{unordered}} + +Asterisks tight: + +\begin{itemize} +\tightlist +\item + asterisk 1 +\item + asterisk 2 +\item + asterisk 3 +\end{itemize} + +Asterisks loose: + +\begin{itemize} +\item + asterisk 1 +\item + asterisk 2 +\item + asterisk 3 +\end{itemize} + +Pluses tight: + +\begin{itemize} +\tightlist +\item + Plus 1 +\item + Plus 2 +\item + Plus 3 +\end{itemize} + +Pluses loose: + +\begin{itemize} +\item + Plus 1 +\item + Plus 2 +\item + Plus 3 +\end{itemize} + +Minuses tight: + +\begin{itemize} +\tightlist +\item + Minus 1 +\item + Minus 2 +\item + Minus 3 +\end{itemize} + +Minuses loose: + +\begin{itemize} +\item + Minus 1 +\item + Minus 2 +\item + Minus 3 +\end{itemize} + +\hypertarget{ordered}{% +\subsection{Ordered}\label{ordered}} + +Tight: + +\begin{enumerate} +\def\labelenumi{\arabic{enumi}.} +\tightlist +\item + First +\item + Second +\item + Third +\end{enumerate} + +and: + +\begin{enumerate} +\def\labelenumi{\arabic{enumi}.} +\tightlist +\item + One +\item + Two +\item + Three +\end{enumerate} + +Loose using tabs: + +\begin{enumerate} +\def\labelenumi{\arabic{enumi}.} +\item + First +\item + Second +\item + Third +\end{enumerate} + +and using spaces: + +\begin{enumerate} +\def\labelenumi{\arabic{enumi}.} +\item + One +\item + Two +\item + Three +\end{enumerate} + +Multiple paragraphs: + +\begin{enumerate} +\def\labelenumi{\arabic{enumi}.} +\item + Item 1, graf one. + + Item 1. graf two. The quick brown fox jumped over the lazy dog's back. +\item + Item 2. +\item + Item 3. +\end{enumerate} + +\hypertarget{nested}{% +\subsection{Nested}\label{nested}} + +\begin{itemize} +\tightlist +\item + Tab + + \begin{itemize} + \tightlist + \item + Tab + + \begin{itemize} + \tightlist + \item + Tab + \end{itemize} + \end{itemize} +\end{itemize} + +Here's another: + +\begin{enumerate} +\def\labelenumi{\arabic{enumi}.} +\tightlist +\item + First +\item + Second: + + \begin{itemize} + \tightlist + \item + Fee + \item + Fie + \item + Foe + \end{itemize} +\item + Third +\end{enumerate} + +Same thing but with paragraphs: + +\begin{enumerate} +\def\labelenumi{\arabic{enumi}.} +\item + First +\item + Second: + + \begin{itemize} + \tightlist + \item + Fee + \item + Fie + \item + Foe + \end{itemize} +\item + Third +\end{enumerate} + +\hypertarget{tabs-and-spaces}{% +\subsection{Tabs and spaces}\label{tabs-and-spaces}} + +\begin{itemize} +\item + this is a list item indented with tabs +\item + this is a list item indented with spaces + + \begin{itemize} + \item + this is an example list item indented with tabs + \item + this is an example list item indented with spaces + \end{itemize} +\end{itemize} + +\hypertarget{fancy-list-markers}{% +\subsection{Fancy list markers}\label{fancy-list-markers}} + +\begin{enumerate} +\def\labelenumi{(\arabic{enumi})} +\setcounter{enumi}{1} +\item + begins with 2 +\item + and now 3 + + with a continuation + + \begin{enumerate} + \def\labelenumii{\roman{enumii}.} + \setcounter{enumii}{3} + \tightlist + \item + sublist with roman numerals, starting with 4 + \item + more items + + \begin{enumerate} + \def\labelenumiii{(\Alph{enumiii})} + \tightlist + \item + a subsublist + \item + a subsublist + \end{enumerate} + \end{enumerate} +\end{enumerate} + +Nesting: + +\begin{enumerate} +\def\labelenumi{\Alph{enumi}.} +\tightlist +\item + Upper Alpha + + \begin{enumerate} + \def\labelenumii{\Roman{enumii}.} + \tightlist + \item + Upper Roman. + + \begin{enumerate} + \def\labelenumiii{(\arabic{enumiii})} + \setcounter{enumiii}{5} + \tightlist + \item + Decimal start with 6 + + \begin{enumerate} + \def\labelenumiv{\alph{enumiv})} + \setcounter{enumiv}{2} + \tightlist + \item + Lower alpha with paren + \end{enumerate} + \end{enumerate} + \end{enumerate} +\end{enumerate} + +Autonumbering: + +\begin{enumerate} +\tightlist +\item + Autonumber. +\item + More. + + \begin{enumerate} + \tightlist + \item + Nested. + \end{enumerate} +\end{enumerate} + +Should not be a list item: + +M.A.~2007 + +B. Williams + +\begin{center}\rule{0.5\linewidth}{\linethickness}\end{center} + +\hypertarget{definition-lists}{% +\section{Definition Lists}\label{definition-lists}} + +Tight using spaces: + +\begin{description} +\tightlist +\item[apple] +red fruit +\item[orange] +orange fruit +\item[banana] +yellow fruit +\end{description} + +Tight using tabs: + +\begin{description} +\tightlist +\item[apple] +red fruit +\item[orange] +orange fruit +\item[banana] +yellow fruit +\end{description} + +Loose: + +\begin{description} +\item[apple] +red fruit +\item[orange] +orange fruit +\item[banana] +yellow fruit +\end{description} + +Multiple blocks with italics: + +\begin{description} +\item[\emph{apple}] +red fruit + +contains seeds, crisp, pleasant to taste +\item[\emph{orange}] +orange fruit + +\begin{verbatim} +{ orange code block } +\end{verbatim} + +\begin{quote} +orange block quote +\end{quote} +\end{description} + +Multiple definitions, tight: + +\begin{description} +\tightlist +\item[apple] +red fruit + +computer +\item[orange] +orange fruit + +bank +\end{description} + +Multiple definitions, loose: + +\begin{description} +\item[apple] +red fruit + +computer +\item[orange] +orange fruit + +bank +\end{description} + +Blank line after term, indented marker, alternate markers: + +\begin{description} +\item[apple] +red fruit + +computer +\item[orange] +orange fruit + +\begin{enumerate} +\def\labelenumi{\arabic{enumi}.} +\tightlist +\item + sublist +\item + sublist +\end{enumerate} +\end{description} + +\hypertarget{html-blocks}{% +\section{HTML Blocks}\label{html-blocks}} + +Simple block on one line: + +foo + +And nested without indentation: + +foo + +bar + +Interpreted markdown in a table: + +This is \emph{emphasized} + +And this is \textbf{strong} + +Here's a simple block: + +foo + +This should be a code block, though: + +\begin{verbatim} +
    + foo +
    +\end{verbatim} + +As should this: + +\begin{verbatim} +
    foo
    +\end{verbatim} + +Now, nested: + +foo + +This should just be an HTML comment: + +Multiline: + +Code block: + +\begin{verbatim} + +\end{verbatim} + +Just plain comment, with trailing spaces on the line: + +Code: + +\begin{verbatim} +
    +\end{verbatim} + +Hr's: + +\begin{center}\rule{0.5\linewidth}{\linethickness}\end{center} + +\hypertarget{inline-markup}{% +\section{Inline Markup}\label{inline-markup}} + +This is \emph{emphasized}, and so \emph{is this}. + +This is \textbf{strong}, and so \textbf{is this}. + +An \emph{\href{/url}{emphasized link}}. + +\textbf{\emph{This is strong and em.}} + +So is \textbf{\emph{this}} word. + +\textbf{\emph{This is strong and em.}} + +So is \textbf{\emph{this}} word. + +This is code: \texttt{\textgreater{}}, \texttt{\$}, \texttt{\textbackslash{}}, +\texttt{\textbackslash{}\$}, \texttt{\textless{}html\textgreater{}}. + +\sout{This is \emph{strikeout}.} + +Superscripts: a\textsuperscript{bc}d a\textsuperscript{\emph{hello}} +a\textsuperscript{hello~there}. + +Subscripts: H\textsubscript{2}O, H\textsubscript{23}O, +H\textsubscript{many~of~them}O. + +These should not be superscripts or subscripts, because of the unescaped +spaces: a\^{}b c\^{}d, a\textasciitilde{}b c\textasciitilde{}d. + +\begin{center}\rule{0.5\linewidth}{\linethickness}\end{center} + +\hypertarget{smart-quotes-ellipses-dashes}{% +\section{Smart quotes, ellipses, dashes}\label{smart-quotes-ellipses-dashes}} + +``Hello,'' said the spider. ``\,`Shelob' is my name.'' + +`A', `B', and `C' are letters. + +`Oak,' `elm,' and `beech' are names of trees. So is `pine.' + +`He said, ``I want to go.''\,' Were you alive in the 70's? + +Here is some quoted `\texttt{code}' and a +``\href{http://example.com/?foo=1\&bar=2}{quoted link}''. + +Some dashes: one---two --- three---four --- five. + +Dashes between numbers: 5--7, 255--66, 1987--1999. + +Ellipses\ldots{}and\ldots{}and\ldots{}. + +\begin{center}\rule{0.5\linewidth}{\linethickness}\end{center} + +\hypertarget{latex}{% +\section{LaTeX}\label{latex}} + +\begin{itemize} +\tightlist +\item + \cite[22-23]{smith.1899} +\item + \(2+2=4\) +\item + \(x \in y\) +\item + \(\alpha \wedge \omega\) +\item + \(223\) +\item + \(p\)-Tree +\item + Here's some display math: + \[\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}\] +\item + Here's one that has a line break in it: \(\alpha + \omega \times x^2\). +\end{itemize} + +These shouldn't be math: + +\begin{itemize} +\tightlist +\item + To get the famous equation, write \texttt{\$e\ =\ mc\^{}2\$}. +\item + \$22,000 is a \emph{lot} of money. So is \$34,000. (It worked if ``lot'' is + emphasized.) +\item + Shoes (\$20) and socks (\$5). +\item + Escaped \texttt{\$}: \$73 \emph{this should be emphasized} 23\$. +\end{itemize} + +Here's a LaTeX table: + +\begin{tabular}{|l|l|}\hline +Animal & Number \\ \hline +Dog & 2 \\ +Cat & 1 \\ \hline +\end{tabular} + +\begin{center}\rule{0.5\linewidth}{\linethickness}\end{center} + +\hypertarget{special-characters}{% +\section{Special Characters}\label{special-characters}} + +Here is some unicode: + +\begin{itemize} +\tightlist +\item + I hat: Î +\item + o umlaut: ö +\item + section: § +\item + set membership: ∈ +\item + copyright: © +\end{itemize} + +AT\&T has an ampersand in their name. + +AT\&T is another way to write it. + +This \& that. + +4 \textless{} 5. + +6 \textgreater{} 5. + +Backslash: \textbackslash{} + +Backtick: ` + +Asterisk: * + +Underscore: \_ + +Left brace: \{ + +Right brace: \} + +Left bracket: {[} + +Right bracket: {]} + +Left paren: ( + +Right paren: ) + +Greater-than: \textgreater{} + +Hash: \# + +Period: . + +Bang: ! + +Plus: + + +Minus: - + +\begin{center}\rule{0.5\linewidth}{\linethickness}\end{center} + +\hypertarget{links}{% +\section{Links}\label{links}} + +\hypertarget{explicit}{% +\subsection{Explicit}\label{explicit}} + +Just a \href{/url/}{URL}. + +\href{/url/}{URL and title}. + +\href{/url/}{URL and title}. + +\href{/url/}{URL and title}. + +\href{/url/}{URL and title} + +\href{/url/}{URL and title} + +\href{/url/with_underscore}{with\_underscore} + +\href{mailto:nobody@nowhere.net}{Email link} + +\href{}{Empty}. + +\hypertarget{reference}{% +\subsection{Reference}\label{reference}} + +Foo \href{/url/}{bar}. + +With \href{/url/}{embedded {[}brackets{]}}. + +\href{/url/}{b} by itself should be a link. + +Indented \href{/url}{once}. + +Indented \href{/url}{twice}. + +Indented \href{/url}{thrice}. + +This should {[}not{]}{[}{]} be a link. + +\begin{verbatim} +[not]: /url +\end{verbatim} + +Foo \href{/url/}{bar}. + +Foo \href{/url/}{biz}. + +\hypertarget{with-ampersands}{% +\subsection{With ampersands}\label{with-ampersands}} + +Here's a \href{http://example.com/?foo=1\&bar=2}{link with an ampersand in the +URL}. + +Here's a link with an amersand in the link text: +\href{http://att.com/}{AT\&T}. + +Here's an \href{/script?foo=1\&bar=2}{inline link}. + +Here's an \href{/script?foo=1\&bar=2}{inline link in pointy braces}. + +\hypertarget{autolinks}{% +\subsection{Autolinks}\label{autolinks}} + +With an ampersand: \url{http://example.com/?foo=1\&bar=2} + +\begin{itemize} +\tightlist +\item + In a list? +\item + \url{http://example.com/} +\item + It should. +\end{itemize} + +An e-mail address: +\href{mailto:nobody@nowhere.net}{\nolinkurl{nobody@nowhere.net}} + +\begin{quote} +Blockquoted: \url{http://example.com/} +\end{quote} + +Auto-links should not occur here: +\texttt{\textless{}http://example.com/\textgreater{}} + +\begin{verbatim} +or here: +\end{verbatim} + +\begin{center}\rule{0.5\linewidth}{\linethickness}\end{center} + +\hypertarget{images}{% +\section{Images}\label{images}} + +From ``Voyage dans la Lune'' by Georges Melies (1902): + +\begin{figure} +\centering +\includegraphics{lalune.jpg} +\caption{lalune} +\end{figure} + +Here is a movie \includegraphics{movie.jpg} icon. + +\begin{center}\rule{0.5\linewidth}{\linethickness}\end{center} + +\hypertarget{footnotes}{% +\section{Footnotes}\label{footnotes}} + +Here is a footnote reference,\footnote{Here is the footnote. It can go + anywhere after the footnote reference. It need not be placed at the end of + the document.} and another.\footnote{Here's the long note. This one contains + multiple blocks. + + Subsequent blocks are indented to show that they belong to the footnote (as + with list items). + +\begin{Verbatim} + { } +\end{Verbatim} + + If you want, you can indent every line, but you can also be lazy and just + indent the first line of each block.} This should \emph{not} be a footnote +reference, because it contains a space.{[}\^{}my note{]} Here is an inline +note.\footnote{This is \emph{easier} to type. Inline notes may contain + \href{http://google.com}{links} and \texttt{{]}} verbatim characters, as + well as {[}bracketed text{]}.} + +\begin{quote} +Notes can go in quotes.\footnote{In quote.} +\end{quote} + +\begin{enumerate} +\def\labelenumi{\arabic{enumi}.} +\tightlist +\item + And in list items.\footnote{In list.} +\end{enumerate} + +This paragraph should not be part of the note, as it is not indented. + +\end{document} diff --git a/test/writer.man b/test/writer.man new file mode 100644 index 0000000..f6d0deb --- /dev/null +++ b/test/writer.man @@ -0,0 +1,791 @@ +.TH "Pandoc Test Suite" "" "July 17, 2006" "" "" +.hy +.PP +This is a set of tests for pandoc. +Most of them are adapted from John Gruber's markdown test suite. +.PP + * * * * * +.SH Headers +.SS Level 2 with an embedded link (/url) +.SS Level 3 with \f[I]emphasis\f[] +.SS Level 4 +.SS Level 5 +.SH Level 1 +.SS Level 2 with \f[I]emphasis\f[] +.SS Level 3 +.PP +with no blank line +.SS Level 2 +.PP +with no blank line +.PP + * * * * * +.SH Paragraphs +.PP +Here's a regular paragraph. +.PP +In Markdown 1.0.0 and earlier. +Version 8. +This line turns into a list item. +Because a hard\-wrapped line in the middle of a paragraph looked like a list +item. +.PP +Here's one with a bullet. +* criminey. +.PP +There should be a hard line break +.PD 0 +.P +.PD +here. +.PP + * * * * * +.SH Block Quotes +.PP +E\-mail style: +.RS +.PP +This is a block quote. +It is pretty short. +.RE +.RS +.PP +Code in a block quote: +.IP +.nf +\f[C] +sub\ status\ { +\ \ \ \ print\ "working"; +} +\f[] +.fi +.PP +A list: +.IP "1." 3 +item one +.IP "2." 3 +item two +.PP +Nested block quotes: +.RS +.PP +nested +.RE +.RS +.PP +nested +.RE +.RE +.PP +This should not be a block quote: 2 > 1. +.PP +And a following paragraph. +.PP + * * * * * +.SH Code Blocks +.PP +Code: +.IP +.nf +\f[C] +\-\-\-\-\ (should\ be\ four\ hyphens) + +sub\ status\ { +\ \ \ \ print\ "working"; +} + +this\ code\ block\ is\ indented\ by\ one\ tab +\f[] +.fi +.PP +And: +.IP +.nf +\f[C] +\ \ \ \ this\ code\ block\ is\ indented\ by\ two\ tabs + +These\ should\ not\ be\ escaped:\ \ \\$\ \\\\\ \\>\ \\[\ \\{ +\f[] +.fi +.PP + * * * * * +.SH Lists +.SS Unordered +.PP +Asterisks tight: +.IP \[bu] 2 +asterisk 1 +.IP \[bu] 2 +asterisk 2 +.IP \[bu] 2 +asterisk 3 +.PP +Asterisks loose: +.IP \[bu] 2 +asterisk 1 +.IP \[bu] 2 +asterisk 2 +.IP \[bu] 2 +asterisk 3 +.PP +Pluses tight: +.IP \[bu] 2 +Plus 1 +.IP \[bu] 2 +Plus 2 +.IP \[bu] 2 +Plus 3 +.PP +Pluses loose: +.IP \[bu] 2 +Plus 1 +.IP \[bu] 2 +Plus 2 +.IP \[bu] 2 +Plus 3 +.PP +Minuses tight: +.IP \[bu] 2 +Minus 1 +.IP \[bu] 2 +Minus 2 +.IP \[bu] 2 +Minus 3 +.PP +Minuses loose: +.IP \[bu] 2 +Minus 1 +.IP \[bu] 2 +Minus 2 +.IP \[bu] 2 +Minus 3 +.SS Ordered +.PP +Tight: +.IP "1." 3 +First +.IP "2." 3 +Second +.IP "3." 3 +Third +.PP +and: +.IP "1." 3 +One +.IP "2." 3 +Two +.IP "3." 3 +Three +.PP +Loose using tabs: +.IP "1." 3 +First +.IP "2." 3 +Second +.IP "3." 3 +Third +.PP +and using spaces: +.IP "1." 3 +One +.IP "2." 3 +Two +.IP "3." 3 +Three +.PP +Multiple paragraphs: +.IP "1." 3 +Item 1, graf one. +.RS 4 +.PP +Item 1. +graf two. +The quick brown fox jumped over the lazy dog's back. +.RE +.IP "2." 3 +Item 2. +.IP "3." 3 +Item 3. +.SS Nested +.IP \[bu] 2 +Tab +.RS 2 +.IP \[bu] 2 +Tab +.RS 2 +.IP \[bu] 2 +Tab +.RE +.RE +.PP +Here's another: +.IP "1." 3 +First +.IP "2." 3 +Second: +.RS 4 +.IP \[bu] 2 +Fee +.IP \[bu] 2 +Fie +.IP \[bu] 2 +Foe +.RE +.IP "3." 3 +Third +.PP +Same thing but with paragraphs: +.IP "1." 3 +First +.IP "2." 3 +Second: +.RS 4 +.IP \[bu] 2 +Fee +.IP \[bu] 2 +Fie +.IP \[bu] 2 +Foe +.RE +.IP "3." 3 +Third +.SS Tabs and spaces +.IP \[bu] 2 +this is a list item indented with tabs +.IP \[bu] 2 +this is a list item indented with spaces +.RS 2 +.IP \[bu] 2 +this is an example list item indented with tabs +.IP \[bu] 2 +this is an example list item indented with spaces +.RE +.SS Fancy list markers +.IP "(2)" 4 +begins with 2 +.IP "(3)" 4 +and now 3 +.RS 4 +.PP +with a continuation +.IP "iv." 4 +sublist with roman numerals, starting with 4 +.IP " v." 4 +more items +.RS 4 +.IP "(A)" 4 +a subsublist +.IP "(B)" 4 +a subsublist +.RE +.RE +.PP +Nesting: +.IP "A." 3 +Upper Alpha +.RS 4 +.IP "I." 3 +Upper Roman. +.RS 4 +.IP "(6)" 4 +Decimal start with 6 +.RS 4 +.IP "c)" 3 +Lower alpha with paren +.RE +.RE +.RE +.PP +Autonumbering: +.IP "1." 3 +Autonumber. +.IP "2." 3 +More. +.RS 4 +.IP "1." 3 +Nested. +.RE +.PP +Should not be a list item: +.PP +M.A.\ 2007 +.PP +B. +Williams +.PP + * * * * * +.SH Definition Lists +.PP +Tight using spaces: +.TP +.B apple +red fruit +.RS +.RE +.TP +.B orange +orange fruit +.RS +.RE +.TP +.B banana +yellow fruit +.RS +.RE +.PP +Tight using tabs: +.TP +.B apple +red fruit +.RS +.RE +.TP +.B orange +orange fruit +.RS +.RE +.TP +.B banana +yellow fruit +.RS +.RE +.PP +Loose: +.TP +.B apple +red fruit +.RS +.RE +.TP +.B orange +orange fruit +.RS +.RE +.TP +.B banana +yellow fruit +.RS +.RE +.PP +Multiple blocks with italics: +.TP +.B \f[I]apple\f[] +red fruit +.RS +.PP +contains seeds, crisp, pleasant to taste +.RE +.TP +.B \f[I]orange\f[] +orange fruit +.RS +.IP +.nf +\f[C] +{\ orange\ code\ block\ } +\f[] +.fi +.RS +.PP +orange block quote +.RE +.RE +.PP +Multiple definitions, tight: +.TP +.B apple +red fruit +.RS +.RE +computer +.RS +.RE +.TP +.B orange +orange fruit +.RS +.RE +bank +.RS +.RE +.PP +Multiple definitions, loose: +.TP +.B apple +red fruit +.RS +.RE +computer +.RS +.RE +.TP +.B orange +orange fruit +.RS +.RE +bank +.RS +.RE +.PP +Blank line after term, indented marker, alternate markers: +.TP +.B apple +red fruit +.RS +.RE +computer +.RS +.RE +.TP +.B orange +orange fruit +.RS +.IP "1." 3 +sublist +.IP "2." 3 +sublist +.RE +.SH HTML Blocks +.PP +Simple block on one line: +foo +.PP +And nested without indentation: +.PP +foo +bar +.PP +Interpreted markdown in a table: +This is \f[I]emphasized\f[] +And this is \f[B]strong\f[] +.PP +Here's a simple block: +.PP +foo +.PP +This should be a code block, though: +.IP +.nf +\f[C] +
    +\ \ \ \ foo +
    +\f[] +.fi +.PP +As should this: +.IP +.nf +\f[C] +
    foo
    +\f[] +.fi +.PP +Now, nested: +foo +.PP +This should just be an HTML comment: +.PP +Multiline: +.PP +Code block: +.IP +.nf +\f[C] + +\f[] +.fi +.PP +Just plain comment, with trailing spaces on the line: +.PP +Code: +.IP +.nf +\f[C] + +\f[] +.fi +.PP +Hr's: +.PP + * * * * * +.SH Inline Markup +.PP +This is \f[I]emphasized\f[], and so \f[I]is this\f[]. +.PP +This is \f[B]strong\f[], and so \f[B]is this\f[]. +.PP +An \f[I]emphasized link (/url)\f[]. +.PP +\f[B]\f[BI]This is strong and em.\f[B]\f[] +.PP +So is \f[B]\f[BI]this\f[B]\f[] word. +.PP +\f[B]\f[BI]This is strong and em.\f[B]\f[] +.PP +So is \f[B]\f[BI]this\f[B]\f[] word. +.PP +This is code: \f[C]>\f[], \f[C]$\f[], \f[C]\\\f[], \f[C]\\$\f[], +\f[C]\f[]. +.PP +[STRIKEOUT:This is \f[I]strikeout\f[].] +.PP +Superscripts: a^bc^d a^\f[I]hello\f[]^ a^hello\ there^. +.PP +Subscripts: H~2~O, H~23~O, H~many\ of\ them~O. +.PP +These should not be superscripts or subscripts, because of the unescaped +spaces: a^b c^d, a~b c~d. +.PP + * * * * * +.SH Smart quotes, ellipses, dashes +.PP +\[lq]Hello,\[rq] said the spider. +\[lq]`Shelob' is my name.\[rq] +.PP +`A', `B', and `C' are letters. +.PP +`Oak,' `elm,' and `beech' are names of trees. +So is `pine.' +.PP +`He said, \[lq]I want to go.\[rq]' Were you alive in the 70's? +.PP +Here is some quoted `\f[C]code\f[]' and a \[lq]quoted +link (http://example.com/?foo=1&bar=2)\[rq]. +.PP +Some dashes: one\[em]two \[em] three\[em]four \[em] five. +.PP +Dashes between numbers: 5\[en]7, 255\[en]66, 1987\[en]1999. +.PP +Ellipses\&...and\&...and\&.... +.PP + * * * * * +.SH LaTeX +.IP \[bu] 2 +.IP \[bu] 2 +2 + 2 = 4 +.IP \[bu] 2 +\f[I]x\f[] ∈ \f[I]y\f[] +.IP \[bu] 2 +\f[I]α\f[] ∧ \f[I]ω\f[] +.IP \[bu] 2 +223 +.IP \[bu] 2 +\f[I]p\f[]\-Tree +.IP \[bu] 2 +Here's some display math: +.RS +$$\\frac{d}{dx}f(x)=\\lim_{h\\to 0}\\frac{f(x+h)\-f(x)}{h}$$ +.RE +.IP \[bu] 2 +Here's one that has a line break in it: +\f[I]α\f[] + \f[I]ω\f[] × \f[I]x\f[]^2^. +.PP +These shouldn't be math: +.IP \[bu] 2 +To get the famous equation, write \f[C]$e\ =\ mc^2$\f[]. +.IP \[bu] 2 +$22,000 is a \f[I]lot\f[] of money. +So is $34,000. +(It worked if \[lq]lot\[rq] is emphasized.) +.IP \[bu] 2 +Shoes ($20) and socks ($5). +.IP \[bu] 2 +Escaped \f[C]$\f[]: $73 \f[I]this should be emphasized\f[] 23$. +.PP +Here's a LaTeX table: +.PP + * * * * * +.SH Special Characters +.PP +Here is some unicode: +.IP \[bu] 2 +I hat: Î +.IP \[bu] 2 +o umlaut: ö +.IP \[bu] 2 +section: § +.IP \[bu] 2 +set membership: ∈ +.IP \[bu] 2 +copyright: © +.PP +AT&T has an ampersand in their name. +.PP +AT&T is another way to write it. +.PP +This & that. +.PP +4 < 5. +.PP +6 > 5. +.PP +Backslash: \\ +.PP +Backtick: ` +.PP +Asterisk: * +.PP +Underscore: _ +.PP +Left brace: { +.PP +Right brace: } +.PP +Left bracket: [ +.PP +Right bracket: ] +.PP +Left paren: ( +.PP +Right paren: ) +.PP +Greater\-than: > +.PP +Hash: # +.PP +Period: . +.PP +Bang: ! +.PP +Plus: + +.PP +Minus: \- +.PP + * * * * * +.SH Links +.SS Explicit +.PP +Just a URL (/url/). +.PP +URL and title (/url/). +.PP +URL and title (/url/). +.PP +URL and title (/url/). +.PP +URL and title (/url/) +.PP +URL and title (/url/) +.PP +with_underscore (/url/with_underscore) +.PP +Email link (mailto:nobody@nowhere.net) +.PP +Empty (). +.SS Reference +.PP +Foo bar (/url/). +.PP +With embedded [brackets] (/url/). +.PP +b (/url/) by itself should be a link. +.PP +Indented once (/url). +.PP +Indented twice (/url). +.PP +Indented thrice (/url). +.PP +This should [not][] be a link. +.IP +.nf +\f[C] +[not]:\ /url +\f[] +.fi +.PP +Foo bar (/url/). +.PP +Foo biz (/url/). +.SS With ampersands +.PP +Here's a link with an ampersand in the URL (http://example.com/?foo=1&bar=2). +.PP +Here's a link with an amersand in the link text: AT&T (http://att.com/). +.PP +Here's an inline link (/script?foo=1&bar=2). +.PP +Here's an inline link in pointy braces (/script?foo=1&bar=2). +.SS Autolinks +.PP +With an ampersand: +.IP \[bu] 2 +In a list? +.IP \[bu] 2 + +.IP \[bu] 2 +It should. +.PP +An e\-mail address: +.RS +.PP +Blockquoted: +.RE +.PP +Auto\-links should not occur here: \f[C]\f[] +.IP +.nf +\f[C] +or\ here:\ +\f[] +.fi +.PP + * * * * * +.SH Images +.PP +From \[lq]Voyage dans la Lune\[rq] by Georges Melies (1902): +.PP +[IMAGE: lalune (lalune.jpg)] +.PP +Here is a movie [IMAGE: movie (movie.jpg)] icon. +.PP + * * * * * +.SH Footnotes +.PP +Here is a footnote reference,[1] and another.[2] This should \f[I]not\f[] be a +footnote reference, because it contains a space.[^my note] Here is an inline +note.[3] +.RS +.PP +Notes can go in quotes.[4] +.RE +.IP "1." 3 +And in list items.[5] +.PP +This paragraph should not be part of the note, as it is not indented. +.SH NOTES +.SS [1] +.PP +Here is the footnote. +It can go anywhere after the footnote reference. +It need not be placed at the end of the document. +.SS [2] +.PP +Here's the long note. +This one contains multiple blocks. +.PP +Subsequent blocks are indented to show that they belong to the footnote (as +with list items). +.IP +.nf +\f[C] +\ \ {\ \ } +\f[] +.fi +.PP +If you want, you can indent every line, but you can also be lazy and just +indent the first line of each block. +.SS [3] +.PP +This is \f[I]easier\f[] to type. +Inline notes may contain links (http://google.com) and \f[C]]\f[] verbatim +characters, as well as [bracketed text]. +.SS [4] +.PP +In quote. +.SS [5] +.PP +In list. +.SH AUTHORS +John MacFarlane; Anonymous. diff --git a/test/writer.markdown b/test/writer.markdown new file mode 100644 index 0000000..0cc465f --- /dev/null +++ b/test/writer.markdown @@ -0,0 +1,742 @@ +--- +author: +- John MacFarlane +- Anonymous +date: 'July 17, 2006' +title: Pandoc Test Suite +--- + +This is a set of tests for pandoc. Most of them are adapted from John Gruber's +markdown test suite. + +------------------------------------------------------------------------------ + +Headers +======= + +Level 2 with an [embedded link](/url) +------------------------------------- + +### Level 3 with *emphasis* + +#### Level 4 + +##### Level 5 + +Level 1 +======= + +Level 2 with *emphasis* +----------------------- + +### Level 3 + +with no blank line + +Level 2 +------- + +with no blank line + +------------------------------------------------------------------------------ + +Paragraphs +========== + +Here's a regular paragraph. + +In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item. +Because a hard-wrapped line in the middle of a paragraph looked like a list +item. + +Here's one with a bullet. \* criminey. + +There should be a hard line break\ +here. + +------------------------------------------------------------------------------ + +Block Quotes +============ + +E-mail style: + +> This is a block quote. It is pretty short. + +> Code in a block quote: +> +> sub status { +> print "working"; +> } +> +> A list: +> +> 1. item one +> 2. item two +> +> Nested block quotes: +> +> > nested +> +> > nested + +This should not be a block quote: 2 \> 1. + +And a following paragraph. + +------------------------------------------------------------------------------ + +Code Blocks +=========== + +Code: + + ---- (should be four hyphens) + + sub status { + print "working"; + } + + this code block is indented by one tab + +And: + + this code block is indented by two tabs + + These should not be escaped: \$ \\ \> \[ \{ + +------------------------------------------------------------------------------ + +Lists +===== + +Unordered +--------- + +Asterisks tight: + +- asterisk 1 +- asterisk 2 +- asterisk 3 + +Asterisks loose: + +- asterisk 1 + +- asterisk 2 + +- asterisk 3 + +Pluses tight: + +- Plus 1 +- Plus 2 +- Plus 3 + +Pluses loose: + +- Plus 1 + +- Plus 2 + +- Plus 3 + +Minuses tight: + +- Minus 1 +- Minus 2 +- Minus 3 + +Minuses loose: + +- Minus 1 + +- Minus 2 + +- Minus 3 + +Ordered +------- + +Tight: + +1. First +2. Second +3. Third + +and: + +1. One +2. Two +3. Three + +Loose using tabs: + +1. First + +2. Second + +3. Third + +and using spaces: + +1. One + +2. Two + +3. Three + +Multiple paragraphs: + +1. Item 1, graf one. + + Item 1. graf two. The quick brown fox jumped over the lazy dog's back. + +2. Item 2. + +3. Item 3. + +Nested +------ + +- Tab + - Tab + - Tab + +Here's another: + +1. First +2. Second: + - Fee + - Fie + - Foe +3. Third + +Same thing but with paragraphs: + +1. First + +2. Second: + + - Fee + - Fie + - Foe + +3. Third + +Tabs and spaces +--------------- + +- this is a list item indented with tabs + +- this is a list item indented with spaces + + - this is an example list item indented with tabs + + - this is an example list item indented with spaces + +Fancy list markers +------------------ + +(2) begins with 2 +(3) and now 3 + + with a continuation + + iv. sublist with roman numerals, starting with 4 + v. more items + (A) a subsublist + (B) a subsublist + +Nesting: + +A. Upper Alpha + I. Upper Roman. + (6) Decimal start with 6 + c) Lower alpha with paren + +Autonumbering: + +1. Autonumber. +2. More. + 1. Nested. + +Should not be a list item: + +M.A. 2007 + +B. Williams + +------------------------------------------------------------------------------ + +Definition Lists +================ + +Tight using spaces: + +apple +: red fruit + +orange +: orange fruit + +banana +: yellow fruit + +Tight using tabs: + +apple +: red fruit + +orange +: orange fruit + +banana +: yellow fruit + +Loose: + +apple + +: red fruit + +orange + +: orange fruit + +banana + +: yellow fruit + +Multiple blocks with italics: + +*apple* + +: red fruit + + contains seeds, crisp, pleasant to taste + +*orange* + +: orange fruit + + { orange code block } + + > orange block quote + +Multiple definitions, tight: + +apple +: red fruit +: computer + +orange +: orange fruit +: bank + +Multiple definitions, loose: + +apple + +: red fruit + +: computer + +orange + +: orange fruit + +: bank + +Blank line after term, indented marker, alternate markers: + +apple + +: red fruit + +: computer + +orange + +: orange fruit + + 1. sublist + 2. sublist + +HTML Blocks +=========== + +Simple block on one line: + +
    + +foo + +
    + +And nested without indentation: + +
    + +
    + +
    + +foo + +
    + +
    + +
    + +bar + +
    + +
    + +Interpreted markdown in a table: + + + + + + +
    +This is *emphasized* + +And this is **strong** +
    + +Here's a simple block: + +
    + +foo + +
    + +This should be a code block, though: + +
    + foo +
    + +As should this: + +
    foo
    + +Now, nested: + +
    + +
    + +
    + +foo + +
    + +
    + +
    + +This should just be an HTML comment: + + +Multiline: + + + +Code block: + + + +Just plain comment, with trailing spaces on the line: + + +Code: + +
    + +Hr's: + +
    +
    +
    +
    +
    +
    +
    +
    +
    + +------------------------------------------------------------------------------ + +Inline Markup +============= + +This is *emphasized*, and so *is this*. + +This is **strong**, and so **is this**. + +An *[emphasized link](/url)*. + +***This is strong and em.*** + +So is ***this*** word. + +***This is strong and em.*** + +So is ***this*** word. + +This is code: `>`, `$`, `\`, `\$`, ``. + +~~This is *strikeout*.~~ + +Superscripts: a^bc^d a^*hello*^ a^hello there^. + +Subscripts: H~2~O, H~23~O, H~many of them~O. + +These should not be superscripts or subscripts, because of the unescaped +spaces: a\^b c\^d, a\~b c\~d. + +------------------------------------------------------------------------------ + +Smart quotes, ellipses, dashes +============================== + +"Hello," said the spider. "'Shelob' is my name." + +'A', 'B', and 'C' are letters. + +'Oak,' 'elm,' and 'beech' are names of trees. So is 'pine.' + +'He said, "I want to go."' Were you alive in the 70's? + +Here is some quoted '`code`' and a "[quoted +link](http://example.com/?foo=1&bar=2)". + +Some dashes: one---two --- three---four --- five. + +Dashes between numbers: 5--7, 255--66, 1987--1999. + +Ellipses...and...and.... + +------------------------------------------------------------------------------ + +LaTeX +===== + +- \cite[22-23]{smith.1899} +- $2+2=4$ +- $x \in y$ +- $\alpha \wedge \omega$ +- $223$ +- $p$-Tree +- Here's some display math: + $$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$$ +- Here's one that has a line break in it: $\alpha + \omega \times x^2$. + +These shouldn't be math: + +- To get the famous equation, write `$e = mc^2$`. +- \$22,000 is a *lot* of money. So is \$34,000. (It worked if "lot" is + emphasized.) +- Shoes (\$20) and socks (\$5). +- Escaped `$`: \$73 *this should be emphasized* 23\$. + +Here's a LaTeX table: + +\begin{tabular}{|l|l|}\hline +Animal & Number \\ \hline +Dog & 2 \\ +Cat & 1 \\ \hline +\end{tabular} + +------------------------------------------------------------------------------ + +Special Characters +================== + +Here is some unicode: + +- I hat: Î +- o umlaut: ö +- section: § +- set membership: ∈ +- copyright: © + +AT&T has an ampersand in their name. + +AT&T is another way to write it. + +This & that. + +4 \< 5. + +6 \> 5. + +Backslash: \\ + +Backtick: \` + +Asterisk: \* + +Underscore: \_ + +Left brace: { + +Right brace: } + +Left bracket: \[ + +Right bracket: \] + +Left paren: ( + +Right paren: ) + +Greater-than: \> + +Hash: \# + +Period: . + +Bang: ! + +Plus: + + +Minus: - + +------------------------------------------------------------------------------ + +Links +===== + +Explicit +-------- + +Just a [URL](/url/). + +[URL and title](/url/ "title"). + +[URL and title](/url/ "title preceded by two spaces"). + +[URL and title](/url/ "title preceded by a tab"). + +[URL and title](/url/ "title with "quotes" in it") + +[URL and title](/url/ "title with single quotes") + +[with\_underscore](/url/with_underscore) + +[Email link](mailto:nobody@nowhere.net) + +[Empty](). + +Reference +--------- + +Foo [bar](/url/). + +With [embedded \[brackets\]](/url/). + +[b](/url/) by itself should be a link. + +Indented [once](/url). + +Indented [twice](/url). + +Indented [thrice](/url). + +This should \[not\]\[\] be a link. + + [not]: /url + +Foo [bar](/url/ "Title with "quotes" inside"). + +Foo [biz](/url/ "Title with "quote" inside"). + +With ampersands +--------------- + +Here's a [link with an ampersand in the URL](http://example.com/?foo=1&bar=2). + +Here's a link with an amersand in the link text: +[AT&T](http://att.com/ "AT&T"). + +Here's an [inline link](/script?foo=1&bar=2). + +Here's an [inline link in pointy braces](/script?foo=1&bar=2). + +Autolinks +--------- + +With an ampersand: + +- In a list? +- +- It should. + +An e-mail address: + +> Blockquoted: + +Auto-links should not occur here: `` + + or here: + +------------------------------------------------------------------------------ + +Images +====== + +From "Voyage dans la Lune" by Georges Melies (1902): + +![lalune](lalune.jpg "Voyage dans la Lune") + +Here is a movie ![movie](movie.jpg) icon. + +------------------------------------------------------------------------------ + +Footnotes +========= + +Here is a footnote reference,[^1] and another.[^2] This should *not* be a +footnote reference, because it contains a space.\[\^my note\] Here is an +inline note.[^3] + +> Notes can go in quotes.[^4] + +1. And in list items.[^5] + +This paragraph should not be part of the note, as it is not indented. + +[^1]: Here is the footnote. It can go anywhere after the footnote reference. + It need not be placed at the end of the document. + +[^2]: Here's the long note. This one contains multiple blocks. + + Subsequent blocks are indented to show that they belong to the footnote + (as with list items). + + { } + + If you want, you can indent every line, but you can also be lazy and just + indent the first line of each block. + +[^3]: This is *easier* to type. Inline notes may contain + [links](http://google.com) and `]` verbatim characters, as well as + \[bracketed text\]. + +[^4]: In quote. + +[^5]: In list. diff --git a/test/writer.mediawiki b/test/writer.mediawiki new file mode 100644 index 0000000..968eef3 --- /dev/null +++ b/test/writer.mediawiki @@ -0,0 +1,645 @@ +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 [[url|embedded link]] == + +=== Level 3 with ''emphasis'' === + +==== Level 4 ==== + +===== Level 5 ===== + += Level 1 = + +== Level 2 with ''emphasis'' == + +=== Level 3 === + +with no blank line + +== Level 2 == + +with no blank line + + +----- + += Paragraphs = + +Here’s a regular paragraph. + +In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item. Because a hard-wrapped line in the middle of a paragraph looked like a list item. + +Here’s one with a bullet. * criminey. + +There should be a hard line break
    +here. + + +----- + += Block Quotes = + +E-mail style: + +
    This is a block quote. It is pretty short. +
    +
    Code in a block quote: + +
    sub status {
    +    print "working";
    +}
    +A list: + +# item one +# item two + +Nested block quotes: + +
    nested +
    +
    nested +
    +This should not be a block quote: 2 > 1. + +And a following paragraph. + + +----- + += Code Blocks = + +Code: + +
    ---- (should be four hyphens)
    +
    +sub status {
    +    print "working";
    +}
    +
    +this code block is indented by one tab
    +And: + +
        this code block is indented by two tabs
    +
    +These should not be escaped:  \$ \\ \> \[ \{
    + +----- + += Lists = + +== Unordered == + +Asterisks tight: + +* asterisk 1 +* asterisk 2 +* asterisk 3 + +Asterisks loose: + +* asterisk 1 +* asterisk 2 +* asterisk 3 + +Pluses tight: + +* Plus 1 +* Plus 2 +* Plus 3 + +Pluses loose: + +* Plus 1 +* Plus 2 +* Plus 3 + +Minuses tight: + +* Minus 1 +* Minus 2 +* Minus 3 + +Minuses loose: + +* Minus 1 +* Minus 2 +* Minus 3 + +== Ordered == + +Tight: + +# First +# Second +# Third + +and: + +# One +# Two +# Three + +Loose using tabs: + +# First +# Second +# Third + +and using spaces: + +# One +# Two +# Three + +Multiple paragraphs: + +
      +
    1. Item 1, graf one.

      +

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

    2. +
    3. Item 2.

    4. +
    5. Item 3.

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

      +

      with a continuation

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

    red fruit

    +

    contains seeds, crisp, pleasant to taste

    +
    ''orange''
    +

    orange fruit

    +
    { orange code block }
    +

    orange block quote

    + +Multiple definitions, tight: + +; apple +: red fruit +: computer +; orange +: orange fruit +: bank + +Multiple definitions, loose: + +; apple +: red fruit +: computer +; orange +: orange fruit +: bank + +Blank line after term, indented marker, alternate markers: + +; apple +: red fruit +: computer +; orange +: orange fruit +;# sublist +;# sublist + += HTML Blocks = + +Simple block on one line: + +
    + +foo + +
    +And nested without indentation: + +
    + +
    + +
    + +foo + + +
    + +
    +
    + +bar + +
    + +
    +Interpreted markdown in a table: + + + + + + +
    +This is ''emphasized'' + +And this is '''strong''' +
    + +Here’s a simple block: + +
    + +foo + + +
    +This should be a code block, though: + +
    <div>
    +    foo
    +</div>
    +As should this: + +
    <div>foo</div>
    +Now, nested: + +
    + +
    + +
    + +foo + +
    + +
    + +
    +This should just be an HTML comment: + + +Multiline: + + + +Code block: + +
    <!-- Comment -->
    +Just plain comment, with trailing spaces on the line: + + +Code: + +
    <hr />
    +Hr’s: + +
    +
    +
    +
    +
    +
    +
    +
    +
    + +----- + += Inline Markup = + +This is ''emphasized'', and so ''is this''. + +This is '''strong''', and so '''is this'''. + +An ''[[url|emphasized link]]''. + +'''''This is strong and em.''''' + +So is '''''this''''' word. + +'''''This is strong and em.''''' + +So is '''''this''''' word. + +This is code: >, $, \, \$, <html>. + +This is ''strikeout''. + +Superscripts: abcd a''hello'' ahello there. + +Subscripts: H2O, H23O, Hmany of themO. + +These should not be superscripts or subscripts, because of the unescaped spaces: a^b c^d, a~b c~d. + + +----- + += Smart quotes, ellipses, dashes = + +“Hello,” said the spider. “‘Shelob’ is my name.” + +‘A’, ‘B’, and ‘C’ are letters. + +‘Oak,’ ‘elm,’ and ‘beech’ are names of trees. So is ‘pine.’ + +‘He said, “I want to go.”’ Were you alive in the 70’s? + +Here is some quoted ‘code’ and a “[http://example.com/?foo=1&bar=2 quoted link]”. + +Some dashes: one—two — three—four — five. + +Dashes between numbers: 5–7, 255–66, 1987–1999. + +Ellipses…and…and…. + + +----- + += LaTeX = + +* +* 2+2=4 +* x \in y +* \alpha \wedge \omega +* 223 +* p-Tree +* Here’s some display math: \frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h} +* Here’s one that has a line break in it: \alpha + \omega \times x^2. + +These shouldn’t be math: + +* To get the famous equation, write $e = mc^2$. +* $22,000 is a ''lot'' of money. So is $34,000. (It worked if “lot” is emphasized.) +* Shoes ($20) and socks ($5). +* Escaped $: $73 ''this should be emphasized'' 23$. + +Here’s a LaTeX table: + + + +----- + += Special Characters = + +Here is some unicode: + +* I hat: Î +* o umlaut: ö +* section: § +* set membership: ∈ +* copyright: © + +AT&T has an ampersand in their name. + +AT&T is another way to write it. + +This & that. + +4 < 5. + +6 > 5. + +Backslash: \ + +Backtick: ` + +Asterisk: * + +Underscore: _ + +Left brace: { + +Right brace: } + +Left bracket: [ + +Right bracket: ] + +Left paren: ( + +Right paren: ) + +Greater-than: > + +Hash: # + +Period: . + +Bang: ! + +Plus: + + +Minus: - + + +----- + += Links = + +== Explicit == + +Just a [[url/|URL]]. + +[[url/|URL and title]]. + +[[url/|URL and title]]. + +[[url/|URL and title]]. + +[[url/|URL and title]] + +[[url/|URL and title]] + +[[url/with_underscore|with_underscore]] + +[mailto:nobody@nowhere.net Email link] + +[[|Empty]]. + +== Reference == + +Foo [[url/|bar]]. + +With [[url/|embedded [brackets]]]. + +[[url/|b]] by itself should be a link. + +Indented [[url|once]]. + +Indented [[url|twice]]. + +Indented [[url|thrice]]. + +This should [not][] be a link. + +
    [not]: /url
    +Foo [[url/|bar]]. + +Foo [[url/|biz]]. + +== With ampersands == + +Here’s a [http://example.com/?foo=1&bar=2 link with an ampersand in the URL]. + +Here’s a link with an amersand in the link text: [http://att.com/ AT&T]. + +Here’s an [[script?foo=1&bar=2|inline link]]. + +Here’s an [[script?foo=1&bar=2|inline link in pointy braces]]. + +== Autolinks == + +With an ampersand: http://example.com/?foo=1&bar=2 + +* In a list? +* http://example.com/ +* It should. + +An e-mail address: [mailto:nobody@nowhere.net nobody@nowhere.net] + +
    Blockquoted: http://example.com/ +
    +Auto-links should not occur here: <http://example.com/> + +
    or here: <http://example.com/>
    + +----- + += Images = + +From “Voyage dans la Lune” by Georges Melies (1902): + +[[File:lalune.jpg|frame|none|alt=Voyage dans la Lune|caption lalune]] + +Here is a movie [[File:movie.jpg|movie]] icon. + + +----- + += Footnotes = + +Here is a footnote reference,Here is the footnote. It can go anywhere after the footnote reference. It need not be placed at the end of the document. and another.Here’s the long note. This one contains multiple blocks. + +Subsequent blocks are indented to show that they belong to the footnote (as with list items). + +
      { <code> }
    +If you want, you can indent every line, but you can also be lazy and just indent the first line of each block.
    This should ''not'' be a footnote reference, because it contains a space.[^my note] Here is an inline note.This is ''easier'' to type. Inline notes may contain [http://google.com links] and ] verbatim characters, as well as [bracketed text]. + +
    Notes can go in quotes.In quote. +
    +# And in list items.In list. + +This paragraph should not be part of the note, as it is not indented. + + diff --git a/test/writer.ms b/test/writer.ms new file mode 100644 index 0000000..7e079c5 --- /dev/null +++ b/test/writer.ms @@ -0,0 +1,1005 @@ +.\" **** Custom macro definitions ********************************* +.\" * Super/subscript +.\" (https://lists.gnu.org/archive/html/groff/2012-07/msg00046.html) +.ds { \v'-0.3m'\\s[\\n[.s]*9u/12u] +.ds } \s0\v'0.3m' +.ds < \v'0.3m'\s[\\n[.s]*9u/12u] +.ds > \s0\v'-0.3m' +.\" * Horizontal line +.de HLINE +.LP +.ce +\l'20' +.. +.\" **** Settings ************************************************* +.\" text width +.nr LL 5.5i +.\" left margin +.nr PO 1.25i +.\" top margin +.nr HM 1.25i +.\" bottom margin +.nr FM 1.25i +.\" header/footer width +.nr LT \n[LL] +.\" point size +.nr PS 10p +.\" line height +.nr VS 12p +.\" font family: A, BM, H, HN, N, P, T, ZCM +.fam T +.\" paragraph indent +.nr PI 2m +.\" interparagraph space +.nr PD 0.33v +.\" footnote width +.nr FL \n[LL] +.\" footnote point size +.nr FPS (\n[PS] - 2000) +.\" color used for strikeout +.defcolor strikecolor rgb 0.7 0.7 0.7 +.\" color for links (rgb) +.ds PDFHREF.COLOUR 0.35 0.00 0.60 +.\" border for links (default none) +.ds PDFHREF.BORDER 0 0 0 +.\" point size difference between heading levels +.nr PSINCR 1p +.\" heading level above which point size no longer changes +.nr GROWPS 2 +.\" comment these out if you want a dot after section numbers: +.als SN SN-NO-DOT +.als SN-STYLE SN-NO-DOT +.\" pdf outline fold level +.nr PDFOUTLINE.FOLDLEVEL 3 +.\" start out in outline view +.pdfview /PageMode /UseOutlines +.\" *************************************************************** +.\" PDF metadata +.pdfinfo /Title "Pandoc Test Suite" +.pdfinfo /Author "John MacFarlane; Anonymous" +.hy +.EQ +delim @@ +.EN +.TL +Pandoc Test Suite +.AU +John MacFarlane +.AU +Anonymous +.ND "July 17, 2006" +.\" 1 column (use .2C for two column) +.1C +.LP +This is a set of tests for pandoc. +Most of them are adapted from John Gruber's markdown test suite. +.HLINE +.SH 1 +Headers +.pdfhref O 1 "Headers" +.pdfhref M "headers" +.SH 2 +Level 2 with an \c +.pdfhref W -D "/url" -A "\c" \ + -- "embedded link" +\& +.pdfhref O 2 "Level 2 with an embedded link" +.pdfhref M "level-2-with-an-embedded-link" +.SH 3 +Level 3 with \f[I]emphasis\f[] +.pdfhref O 3 "Level 3 with emphasis" +.pdfhref M "level-3-with-emphasis" +.SH 4 +Level 4 +.pdfhref O 4 "Level 4" +.pdfhref M "level-4" +.SH 5 +Level 5 +.pdfhref O 5 "Level 5" +.pdfhref M "level-5" +.SH 1 +Level 1 +.pdfhref O 1 "Level 1" +.pdfhref M "level-1" +.SH 2 +Level 2 with \f[I]emphasis\f[] +.pdfhref O 2 "Level 2 with emphasis" +.pdfhref M "level-2-with-emphasis" +.SH 3 +Level 3 +.pdfhref O 3 "Level 3" +.pdfhref M "level-3" +.LP +with no blank line +.SH 2 +Level 2 +.pdfhref O 2 "Level 2" +.pdfhref M "level-2" +.LP +with no blank line +.HLINE +.SH 1 +Paragraphs +.pdfhref O 1 "Paragraphs" +.pdfhref M "paragraphs" +.LP +Here's a regular paragraph. +.PP +In Markdown 1.0.0 and earlier. +Version 8. +This line turns into a list item. +Because a hard\-wrapped line in the middle of a paragraph looked like a list +item. +.PP +Here's one with a bullet. +* criminey. +.PP +There should be a hard line break +.br +here. +.HLINE +.SH 1 +Block Quotes +.pdfhref O 1 "Block Quotes" +.pdfhref M "block-quotes" +.LP +E\-mail style: +.RS +.LP +This is a block quote. +It is pretty short. +.RE +.RS +.LP +Code in a block quote: +.IP +.nf +\f[C] +sub\ status\ { +\ \ \ \ print\ \[dq]working\[dq]; +} +\f[] +.fi +.LP +A list: +.IP " 1." 4 +item one +.IP " 2." 4 +item two +.LP +Nested block quotes: +.RS +.LP +nested +.RE +.RS +.LP +nested +.RE +.RE +.LP +This should not be a block quote: 2 > 1. +.PP +And a following paragraph. +.HLINE +.SH 1 +Code Blocks +.pdfhref O 1 "Code Blocks" +.pdfhref M "code-blocks" +.LP +Code: +.IP +.nf +\f[C] +\-\-\-\-\ (should\ be\ four\ hyphens) + +sub\ status\ { +\ \ \ \ print\ \[dq]working\[dq]; +} + +this\ code\ block\ is\ indented\ by\ one\ tab +\f[] +.fi +.LP +And: +.IP +.nf +\f[C] +\ \ \ \ this\ code\ block\ is\ indented\ by\ two\ tabs + +These\ should\ not\ be\ escaped:\ \ \\$\ \\\\\ \\>\ \\[\ \\{ +\f[] +.fi +.HLINE +.SH 1 +Lists +.pdfhref O 1 "Lists" +.pdfhref M "lists" +.SH 2 +Unordered +.pdfhref O 2 "Unordered" +.pdfhref M "unordered" +.LP +Asterisks tight: +.IP \[bu] 3 +asterisk 1 +.IP \[bu] 3 +asterisk 2 +.IP \[bu] 3 +asterisk 3 +.LP +Asterisks loose: +.IP \[bu] 3 +asterisk 1 +.IP \[bu] 3 +asterisk 2 +.IP \[bu] 3 +asterisk 3 +.LP +Pluses tight: +.IP \[bu] 3 +Plus 1 +.IP \[bu] 3 +Plus 2 +.IP \[bu] 3 +Plus 3 +.LP +Pluses loose: +.IP \[bu] 3 +Plus 1 +.IP \[bu] 3 +Plus 2 +.IP \[bu] 3 +Plus 3 +.LP +Minuses tight: +.IP \[bu] 3 +Minus 1 +.IP \[bu] 3 +Minus 2 +.IP \[bu] 3 +Minus 3 +.LP +Minuses loose: +.IP \[bu] 3 +Minus 1 +.IP \[bu] 3 +Minus 2 +.IP \[bu] 3 +Minus 3 +.SH 2 +Ordered +.pdfhref O 2 "Ordered" +.pdfhref M "ordered" +.LP +Tight: +.IP " 1." 4 +First +.IP " 2." 4 +Second +.IP " 3." 4 +Third +.LP +and: +.IP " 1." 4 +One +.IP " 2." 4 +Two +.IP " 3." 4 +Three +.LP +Loose using tabs: +.IP " 1." 4 +First +.IP " 2." 4 +Second +.IP " 3." 4 +Third +.LP +and using spaces: +.IP " 1." 4 +One +.IP " 2." 4 +Two +.IP " 3." 4 +Three +.LP +Multiple paragraphs: +.IP " 1." 4 +Item 1, graf one. +.RS 4 +.PP +Item 1. +graf two. +The quick brown fox jumped over the lazy dog's back. +.RE +.IP " 2." 4 +Item 2. +.IP " 3." 4 +Item 3. +.SH 2 +Nested +.pdfhref O 2 "Nested" +.pdfhref M "nested" +.IP \[bu] 3 +Tab +.RS 3 +.IP \[bu] 3 +Tab +.RS 3 +.IP \[bu] 3 +Tab +.RE +.RE +.LP +Here's another: +.IP " 1." 4 +First +.IP " 2." 4 +Second: +.RS 4 +.IP \[bu] 3 +Fee +.IP \[bu] 3 +Fie +.IP \[bu] 3 +Foe +.RE +.IP " 3." 4 +Third +.LP +Same thing but with paragraphs: +.IP " 1." 4 +First +.IP " 2." 4 +Second: +.RS 4 +.IP \[bu] 3 +Fee +.IP \[bu] 3 +Fie +.IP \[bu] 3 +Foe +.RE +.IP " 3." 4 +Third +.SH 2 +Tabs and spaces +.pdfhref O 2 "Tabs and spaces" +.pdfhref M "tabs-and-spaces" +.IP \[bu] 3 +this is a list item indented with tabs +.IP \[bu] 3 +this is a list item indented with spaces +.RS 3 +.IP \[bu] 3 +this is an example list item indented with tabs +.IP \[bu] 3 +this is an example list item indented with spaces +.RE +.SH 2 +Fancy list markers +.pdfhref O 2 "Fancy list markers" +.pdfhref M "fancy-list-markers" +.IP " (2)" 5 +begins with 2 +.IP " (3)" 5 +and now 3 +.RS 5 +.LP +with a continuation +.IP " iv." 5 +sublist with roman numerals, starting with 4 +.IP " v." 5 +more items +.RS 5 +.IP " (A)" 5 +a subsublist +.IP " (B)" 5 +a subsublist +.RE +.RE +.LP +Nesting: +.IP " A." 4 +Upper Alpha +.RS 4 +.IP " I." 4 +Upper Roman. +.RS 4 +.IP " (6)" 5 +Decimal start with 6 +.RS 5 +.IP " c)" 4 +Lower alpha with paren +.RE +.RE +.RE +.LP +Autonumbering: +.IP " 1." 4 +Autonumber. +.IP " 2." 4 +More. +.RS 4 +.IP " 1." 4 +Nested. +.RE +.LP +Should not be a list item: +.PP +M.A.\~2007 +.PP +B. +Williams +.HLINE +.SH 1 +Definition Lists +.pdfhref O 1 "Definition Lists" +.pdfhref M "definition-lists" +.LP +Tight using spaces: +.IP "apple" +red fruit +.RS +.RE +.IP "orange" +orange fruit +.RS +.RE +.IP "banana" +yellow fruit +.RS +.RE +.LP +Tight using tabs: +.IP "apple" +red fruit +.RS +.RE +.IP "orange" +orange fruit +.RS +.RE +.IP "banana" +yellow fruit +.RS +.RE +.LP +Loose: +.IP "apple" +red fruit +.RS +.RE +.IP "orange" +orange fruit +.RS +.RE +.IP "banana" +yellow fruit +.RS +.RE +.LP +Multiple blocks with italics: +.IP "\f[I]apple\f[]" +red fruit +.RS +.PP +contains seeds, crisp, pleasant to taste +.RE +.IP "\f[I]orange\f[]" +orange fruit +.RS +.IP +.nf +\f[C] +{\ orange\ code\ block\ } +\f[] +.fi +.RS +.LP +orange block quote +.RE +.RE +.LP +Multiple definitions, tight: +.IP "apple" +red fruit +.RS +.RE +computer +.RS +.RE +.IP "orange" +orange fruit +.RS +.RE +bank +.RS +.RE +.LP +Multiple definitions, loose: +.IP "apple" +red fruit +.RS +.RE +computer +.RS +.RE +.IP "orange" +orange fruit +.RS +.RE +bank +.RS +.RE +.LP +Blank line after term, indented marker, alternate markers: +.IP "apple" +red fruit +.RS +.RE +computer +.RS +.RE +.IP "orange" +orange fruit +.RS +.IP " 1." 4 +sublist +.IP " 2." 4 +sublist +.RE +.SH 1 +HTML Blocks +.pdfhref O 1 "HTML Blocks" +.pdfhref M "html-blocks" +.LP +Simple block on one line: +foo +.LP +And nested without indentation: +.LP +foo +bar +.LP +Interpreted markdown in a table: +This is \f[I]emphasized\f[] +And this is \f[B]strong\f[] +.PP +Here's a simple block: +.LP +foo +.LP +This should be a code block, though: +.IP +.nf +\f[C] +
    +\ \ \ \ foo +
    +\f[] +.fi +.LP +As should this: +.IP +.nf +\f[C] +
    foo
    +\f[] +.fi +.LP +Now, nested: +foo +.LP +This should just be an HTML comment: +.PP +Multiline: +.PP +Code block: +.IP +.nf +\f[C] + +\f[] +.fi +.LP +Just plain comment, with trailing spaces on the line: +.PP +Code: +.IP +.nf +\f[C] + +\f[] +.fi +.LP +Hr's: +.HLINE +.SH 1 +Inline Markup +.pdfhref O 1 "Inline Markup" +.pdfhref M "inline-markup" +.LP +This is \f[I]emphasized\f[], and so \f[I]is this\f[]. +.PP +This is \f[B]strong\f[], and so \f[B]is this\f[]. +.PP +An \f[I]\c +.pdfhref W -D "/url" -A "\c" \ + -- "emphasized link" +\&\f[]. +.PP +\f[B]\f[BI]This is strong and em.\f[B]\f[] +.PP +So is \f[B]\f[BI]this\f[B]\f[] word. +.PP +\f[B]\f[BI]This is strong and em.\f[B]\f[] +.PP +So is \f[B]\f[BI]this\f[B]\f[] word. +.PP +This is code: \f[C]>\f[], \f[C]$\f[], \f[C]\\\f[], \f[C]\\$\f[], +\f[C]\f[]. +.PP +\m[strikecolor]This is \f[I]strikeout\f[].\m[] +.PP +Superscripts: a\*{bc\*}d a\*{\f[I]hello\f[]\*} a\*{hello\~there\*}. +.PP +Subscripts: H\*<2\*>O, H\*<23\*>O, H\*O. +.PP +These should not be superscripts or subscripts, because of the unescaped +spaces: a\[ha]b c\[ha]d, a\[ti]b c\[ti]d. +.HLINE +.SH 1 +Smart quotes, ellipses, dashes +.pdfhref O 1 "Smart quotes, ellipses, dashes" +.pdfhref M "smart-quotes-ellipses-dashes" +.LP +\[lq]Hello,\[rq] said the spider. +\[lq]`Shelob' is my name.\[rq] +.PP +`A', `B', and `C' are letters. +.PP +`Oak,' `elm,' and `beech' are names of trees. +So is `pine.' +.PP +`He said, \[lq]I want to go.\[rq]' Were you alive in the 70's? +.PP +Here is some quoted `\f[C]code\f[]' and a \[lq]\c +.pdfhref W -D "http://example.com/?foo=1&bar=2" -A "\c" \ + -- "quoted link" +\&\[rq]. +.PP +Some dashes: one\[em]two \[em] three\[em]four \[em] five. +.PP +Dashes between numbers: 5\[en]7, 255\[en]66, 1987\[en]1999. +.PP +Ellipses\&...and\&...and\&.... +.HLINE +.SH 1 +LaTeX +.pdfhref O 1 "LaTeX" +.pdfhref M "latex" +.IP \[bu] 3 +.IP \[bu] 3 +@2 + 2 = 4@ +.IP \[bu] 3 +@x \[u2208] y@ +.IP \[bu] 3 +@alpha \[u2227] omega@ +.IP \[bu] 3 +@223@ +.IP \[bu] 3 +@p@\-Tree +.IP \[bu] 3 +Here's some display math: +.EQ +d over {d x} f ( x ) = lim sub {h -> 0} {f ( x + h ) \[u2212] f ( x )} over h +.EN +.IP \[bu] 3 +Here's one that has a line break in it: @alpha + omega times x sup 2@. +.LP +These shouldn't be math: +.IP \[bu] 3 +To get the famous equation, write \f[C]$e\ =\ mc\[ha]2$\f[]. +.IP \[bu] 3 +$22,000 is a \f[I]lot\f[] of money. +So is $34,000. +(It worked if \[lq]lot\[rq] is emphasized.) +.IP \[bu] 3 +Shoes ($20) and socks ($5). +.IP \[bu] 3 +Escaped \f[C]$\f[]: $73 \f[I]this should be emphasized\f[] 23$. +.LP +Here's a LaTeX table: +.HLINE +.SH 1 +Special Characters +.pdfhref O 1 "Special Characters" +.pdfhref M "special-characters" +.LP +Here is some unicode: +.IP \[bu] 3 +I hat: Î +.IP \[bu] 3 +o umlaut: ö +.IP \[bu] 3 +section: § +.IP \[bu] 3 +set membership: ∈ +.IP \[bu] 3 +copyright: © +.LP +AT&T has an ampersand in their name. +.PP +AT&T is another way to write it. +.PP +This & that. +.PP +4 < 5. +.PP +6 > 5. +.PP +Backslash: \\ +.PP +Backtick: \` +.PP +Asterisk: * +.PP +Underscore: _ +.PP +Left brace: { +.PP +Right brace: } +.PP +Left bracket: [ +.PP +Right bracket: ] +.PP +Left paren: ( +.PP +Right paren: ) +.PP +Greater\-than: > +.PP +Hash: # +.PP +Period: . +.PP +Bang: ! +.PP +Plus: + +.PP +Minus: \- +.HLINE +.SH 1 +Links +.pdfhref O 1 "Links" +.pdfhref M "links" +.SH 2 +Explicit +.pdfhref O 2 "Explicit" +.pdfhref M "explicit" +.LP +Just a \c +.pdfhref W -D "/url/" -A "\c" \ + -- "URL" +\&. +.PP +\c +.pdfhref W -D "/url/" -A "\c" \ + -- "URL and title" +\&. +.PP +\c +.pdfhref W -D "/url/" -A "\c" \ + -- "URL and title" +\&. +.PP +\c +.pdfhref W -D "/url/" -A "\c" \ + -- "URL and title" +\&. +.PP +\c +.pdfhref W -D "/url/" -A "\c" \ + -- "URL and title" +\& +.PP +\c +.pdfhref W -D "/url/" -A "\c" \ + -- "URL and title" +\& +.PP +\c +.pdfhref W -D "/url/with_underscore" -A "\c" \ + -- "with_underscore" +\& +.PP +\c +.pdfhref W -D "mailto:nobody%40nowhere.net" -A "\c" \ + -- "Email link" +\& +.PP +\c +.pdfhref W -D "" -A "\c" \ + -- "Empty" +\&. +.SH 2 +Reference +.pdfhref O 2 "Reference" +.pdfhref M "reference" +.LP +Foo \c +.pdfhref W -D "/url/" -A "\c" \ + -- "bar" +\&. +.PP +With \c +.pdfhref W -D "/url/" -A "\c" \ + -- "embedded [brackets]" +\&. +.PP +\c +.pdfhref W -D "/url/" -A "\c" \ + -- "b" +\& by itself should be a link. +.PP +Indented \c +.pdfhref W -D "/url" -A "\c" \ + -- "once" +\&. +.PP +Indented \c +.pdfhref W -D "/url" -A "\c" \ + -- "twice" +\&. +.PP +Indented \c +.pdfhref W -D "/url" -A "\c" \ + -- "thrice" +\&. +.PP +This should [not][] be a link. +.IP +.nf +\f[C] +[not]:\ /url +\f[] +.fi +.LP +Foo \c +.pdfhref W -D "/url/" -A "\c" \ + -- "bar" +\&. +.PP +Foo \c +.pdfhref W -D "/url/" -A "\c" \ + -- "biz" +\&. +.SH 2 +With ampersands +.pdfhref O 2 "With ampersands" +.pdfhref M "with-ampersands" +.LP +Here's a \c +.pdfhref W -D "http://example.com/?foo=1&bar=2" -A "\c" \ + -- "link with an ampersand in the URL" +\&. +.PP +Here's a link with an amersand in the link text: \c +.pdfhref W -D "http://att.com/" -A "\c" \ + -- "AT&T" +\&. +.PP +Here's an \c +.pdfhref W -D "/script?foo=1&bar=2" -A "\c" \ + -- "inline link" +\&. +.PP +Here's an \c +.pdfhref W -D "/script?foo=1&bar=2" -A "\c" \ + -- "inline link in pointy braces" +\&. +.SH 2 +Autolinks +.pdfhref O 2 "Autolinks" +.pdfhref M "autolinks" +.LP +With an ampersand: \c +.pdfhref W -D "http://example.com/?foo=1&bar=2" -A "\c" \ + -- "http://example.com/?foo=1&bar=2" +\& +.IP \[bu] 3 +In a list? +.IP \[bu] 3 +\c +.pdfhref W -D "http://example.com/" -A "\c" \ + -- "http://example.com/" +\& +.IP \[bu] 3 +It should. +.LP +An e\-mail address: \c +.pdfhref W -D "mailto:nobody%40nowhere.net" -A "\c" \ + -- "nobody\@nowhere.net" +\& +.RS +.LP +Blockquoted: \c +.pdfhref W -D "http://example.com/" -A "\c" \ + -- "http://example.com/" +\& +.RE +.LP +Auto\-links should not occur here: \f[C]\f[] +.IP +.nf +\f[C] +or\ here:\ +\f[] +.fi +.HLINE +.SH 1 +Images +.pdfhref O 1 "Images" +.pdfhref M "images" +.LP +From \[lq]Voyage dans la Lune\[rq] by Georges Melies (1902): +.PP +[IMAGE: lalune] +.PP +Here is a movie [IMAGE: movie] icon. +.HLINE +.SH 1 +Footnotes +.pdfhref O 1 "Footnotes" +.pdfhref M "footnotes" +.LP +Here is a footnote reference,\** +.FS +Here is the footnote. +It can go anywhere after the footnote reference. +It need not be placed at the end of the document. +.FE +and another.\** +.FS +Here's the long note. +This one contains multiple blocks. +.PP +Subsequent blocks are indented to show that they belong to the footnote (as +with list items). +.IP +.nf +\f[C] +\ \ {\ \ } +\f[] +.fi +.LP +If you want, you can indent every line, but you can also be lazy and just +indent the first line of each block. +.FE +This should \f[I]not\f[] be a footnote reference, because it contains a +space.[\[ha]my note] Here is an inline note.\** +.FS +This is \f[I]easier\f[] to type. +Inline notes may contain \c +.pdfhref W -D "http://google.com" -A "\c" \ + -- "links" +\& and \f[C]]\f[] verbatim characters, as well as [bracketed text]. +.FE +.RS +.LP +Notes can go in quotes.\** +.FS +In quote. +.FE +.RE +.IP " 1." 4 +And in list items.\** +.FS +In list. +.FE +.LP +This paragraph should not be part of the note, as it is not indented. +.pdfsync diff --git a/test/writer.muse b/test/writer.muse new file mode 100644 index 0000000..db34a27 --- /dev/null +++ b/test/writer.muse @@ -0,0 +1,728 @@ +#author John MacFarlane +#title Pandoc Test Suite +#date July 17, 2006 + +This is a set of tests for pandoc. Most of them are adapted from John Gruber’s +markdown test suite. + +---- + +* Headers + +** Level 2 with an [[/url][embedded link]] + +*** Level 3 with emphasis + +**** Level 4 + +***** Level 5 + +* Level 1 + +** Level 2 with emphasis + +*** Level 3 + +with no blank line + +** Level 2 + +with no blank line + +---- + +* Paragraphs + +Here’s a regular paragraph. + +In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item. +Because a hard-wrapped line in the middle of a paragraph looked like a list +item. + +Here’s one with a bullet. * criminey. + +There should be a hard line break
    +here. + +---- + +* Block Quotes + +E-mail style: + + +This is a block quote. It is pretty short. + + + +Code in a block quote: + + +sub status { + print "working"; +} + + +A list: + + 1. item one + 2. item two + +Nested block quotes: + + +nested + + + +nested + + + +This should not be a block quote: 2 > 1. + +And a following paragraph. + +---- + +* Code Blocks + +Code: + + +---- (should be four hyphens) + +sub status { + print "working"; +} + +this code block is indented by one tab + + +And: + + + this code block is indented by two tabs + +These should not be escaped: \$ \\ \> \[ \{ + + +---- + +* Lists + +** Unordered + +Asterisks tight: + + - asterisk 1 + - asterisk 2 + - asterisk 3 + +Asterisks loose: + + - asterisk 1 + - asterisk 2 + - asterisk 3 + +Pluses tight: + + - Plus 1 + - Plus 2 + - Plus 3 + +Pluses loose: + + - Plus 1 + - Plus 2 + - Plus 3 + +Minuses tight: + + - Minus 1 + - Minus 2 + - Minus 3 + +Minuses loose: + + - Minus 1 + - Minus 2 + - Minus 3 + +** Ordered + +Tight: + + 1. First + 2. Second + 3. Third + +and: + + 1. One + 2. Two + 3. Three + +Loose using tabs: + + 1. First + 2. Second + 3. Third + +and using spaces: + + 1. One + 2. Two + 3. Three + +Multiple paragraphs: + + 1. Item 1, graf one. + + Item 1. graf two. The quick brown fox jumped over the lazy dog’s back. + 2. Item 2. + 3. Item 3. + +** Nested + + - Tab + - Tab + - Tab + +Here’s another: + + 1. First + 2. Second: + - Fee + - Fie + - Foe + 3. Third + +Same thing but with paragraphs: + + 1. First + 2. Second: + + - Fee + - Fie + - Foe + 3. Third + +** Tabs and spaces + + - this is a list item indented with tabs + - this is a list item indented with spaces + + - this is an example list item indented with tabs + - this is an example list item indented with spaces + +** Fancy list markers + + 2. begins with 2 + 3. and now 3 + + with a continuation + + iv. sublist with roman numerals, starting with 4 + v. more items + A. a subsublist + B. a subsublist + +Nesting: + + A. Upper Alpha + I. Upper Roman. + 6. Decimal start with 6 + c. Lower alpha with paren + +Autonumbering: + + 1. Autonumber. + 2. More. + 1. Nested. + +Should not be a list item: + +M.A. 2007 + +B. Williams + +---- + +* Definition Lists + +Tight using spaces: + + apple :: red fruit + orange :: orange fruit + banana :: yellow fruit + +Tight using tabs: + + apple :: red fruit + orange :: orange fruit + banana :: yellow fruit + +Loose: + + apple :: red fruit + orange :: orange fruit + banana :: yellow fruit + +Multiple blocks with italics: + + apple :: red fruit + + contains seeds, crisp, pleasant to taste + orange :: orange fruit + + + { orange code block } + + + + orange block quote + + +Multiple definitions, tight: + + apple :: red fruit + computer + orange :: orange fruit + bank + +Multiple definitions, loose: + + apple :: red fruit + + computer + orange :: orange fruit + + bank + +Blank line after term, indented marker, alternate markers: + + apple :: red fruit + + computer + orange :: orange fruit + + 1. sublist + 2. sublist + +* HTML Blocks + +Simple block on one line: + +foo +And nested without indentation: + +foo + +bar +Interpreted markdown in a table: + + + + + + + + + + + + + + + + + + + + + + +
    + + +This is emphasized + + + + + +And this is strong + + +
    +
    + + + + + +Here’s a simple block: + +foo + +This should be a code block, though: + + +
    + foo +
    +
    + +As should this: + + +
    foo
    +
    + +Now, nested: + +foo +This should just be an HTML comment: + + + + + +Multiline: + + + + + + + + + +Code block: + + + + + +Just plain comment, with trailing spaces on the line: + + + + + +Code: + + +
    +
    + +Hr’s: + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + +---- + +* Inline Markup + +This is emphasized, and so is this. + +This is strong, and so is this. + +An [[/url][emphasized link]]. + +This is strong and em. + +So is this word. + +This is strong and em. + +So is this word. + +This is code: >, $, \, \$, +. + +This is strikeout. + +Superscripts: abcd ahello +ahello there. + +Subscripts: H2O, H23O, Hmany of themO. + +These should not be superscripts or subscripts, because of the unescaped +spaces: a^b c^d, a~b c~d. + +---- + +* Smart quotes, ellipses, dashes + +"Hello," said the spider. "'Shelob' is my name." + +'A', 'B', and 'C' are letters. + +'Oak,' 'elm,' and 'beech' are names of trees. So is 'pine.' + +'He said, "I want to go."' Were you alive in the 70’s? + +Here is some quoted 'code' and a +"[[http://example.com/?foo=1&bar=2][quoted link]]". + +Some dashes: one—two — three—four — five. + +Dashes between numbers: 5–7, 255–66, 1987–1999. + +Ellipses…and…and…. + +---- + +* LaTeX + + - \cite[22-23]{smith.1899} + - 2 + 2 = 4 + - x ∈ y + - α ∧ ω + - 223 + - p-Tree + - Here’s some display math: + $$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$$ + - Here’s one that has a line break in it: + α + ω × x2. + +These shouldn’t be math: + + - To get the famous equation, write $e = mc^2$. + - $22,000 is a lot of money. So is $34,000. (It worked if "lot" is + emphasized.) + - Shoes ($20) and socks ($5). + - Escaped $: $73 this should be emphasized 23$. + +Here’s a LaTeX table: + + +\begin{tabular}{|l|l|}\hline +Animal & Number \\ \hline +Dog & 2 \\ +Cat & 1 \\ \hline +\end{tabular} + + +---- + +* Special Characters + +Here is some unicode: + + - I hat: Î + - o umlaut: ö + - section: § + - set membership: ∈ + - copyright: © + +AT&T has an ampersand in their name. + +AT&T is another way to write it. + +This & that. + +4 < 5. + +6 > 5. + +Backslash: \ + +Backtick: ` + +Asterisk: * + +Underscore: _ + +Left brace: { + +Right brace: } + +Left bracket: [ + +Right bracket: ] + +Left paren: ( + +Right paren: ) + +Greater-than: > + +Hash: # + +Period: . + +Bang: ! + +Plus: + + +Minus: - + +---- + +* Links + +** Explicit + +Just a [[/url/][URL]]. + +[[/url/][URL and title]]. + +[[/url/][URL and title]]. + +[[/url/][URL and title]]. + +[[/url/][URL and title]] + +[[/url/][URL and title]] + +[[/url/with_underscore][with_underscore]] + +[[mailto:nobody@nowhere.net][Email link]] + +[[][Empty]]. + +** Reference + +Foo [[/url/][bar]]. + +With [[/url/][embedded [brackets]]]. + +[[/url/][b]] by itself should be a link. + +Indented [[/url][once]]. + +Indented [[/url][twice]]. + +Indented [[/url][thrice]]. + +This should [not][] be a link. + + +[not]: /url + + +Foo [[/url/][bar]]. + +Foo [[/url/][biz]]. + +** With ampersands + +Here’s a [[http://example.com/?foo=1&bar=2][link with an ampersand in the +URL]]. + +Here’s a link with an amersand in the link text: [[http://att.com/][AT&T]]. + +Here’s an [[/script?foo=1&bar=2][inline link]]. + +Here’s an [[/script?foo=1&bar=2][inline link in pointy braces]]. + +** Autolinks + +With an ampersand: [[http://example.com/?foo=1&bar=2]] + + - In a list? + - [[http://example.com/]] + - It should. + +An e-mail address: [[mailto:nobody@nowhere.net][nobody@nowhere.net]] + + +Blockquoted: [[http://example.com/]] + + +Auto-links should not occur here: + + +or here: + + +---- + +* Images + +From "Voyage dans la Lune" by Georges Melies (1902): + +[[lalune.jpg][Voyage dans la Lune]] + +Here is a movie [[movie.jpg][movie]] icon. + +---- + +* Footnotes + +Here is a footnote reference,[1] and another.[2] This should not be a +footnote reference, because it contains a space.[^my +note] Here is an inline note.[3] + + +Notes can go in quotes.[4] + + + 1. And in list items.[5] + +This paragraph should not be part of the note, as it is not indented. + +[1] Here is the footnote. It can go anywhere after the footnote reference. It + need not be placed at the end of the document. + +[2] Here’s the long note. This one contains multiple blocks. + + Subsequent blocks are indented to show that they belong to the footnote + (as with list items). + + + { } + + + If you want, you can indent every line, but you can also be lazy and just + indent the first line of each block. + +[3] This is easier to type. Inline notes may contain + [[http://google.com][links]] and ] verbatim characters, as + well as [bracketed text]. + +[4] In quote. + +[5] In list. diff --git a/test/writer.native b/test/writer.native new file mode 100644 index 0000000..0587bdd --- /dev/null +++ b/test/writer.native @@ -0,0 +1,409 @@ +Pandoc (Meta {unMeta = fromList [("author",MetaList [MetaInlines [Str "John",Space,Str "MacFarlane"],MetaInlines [Str "Anonymous"]]),("date",MetaInlines [Str "July",Space,Str "17,",Space,Str "2006"]),("title",MetaInlines [Str "Pandoc",Space,Str "Test",Space,Str "Suite"])]}) +[Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "set",Space,Str "of",Space,Str "tests",Space,Str "for",Space,Str "pandoc.",Space,Str "Most",Space,Str "of",Space,Str "them",Space,Str "are",Space,Str "adapted",Space,Str "from",SoftBreak,Str "John",Space,Str "Gruber\8217s",Space,Str "markdown",Space,Str "test",Space,Str "suite."] +,HorizontalRule +,Header 1 ("headers",[],[]) [Str "Headers"] +,Header 2 ("level-2-with-an-embedded-link",[],[]) [Str "Level",Space,Str "2",Space,Str "with",Space,Str "an",Space,Link ("",[],[]) [Str "embedded",Space,Str "link"] ("/url","")] +,Header 3 ("level-3-with-emphasis",[],[]) [Str "Level",Space,Str "3",Space,Str "with",Space,Emph [Str "emphasis"]] +,Header 4 ("level-4",[],[]) [Str "Level",Space,Str "4"] +,Header 5 ("level-5",[],[]) [Str "Level",Space,Str "5"] +,Header 1 ("level-1",[],[]) [Str "Level",Space,Str "1"] +,Header 2 ("level-2-with-emphasis",[],[]) [Str "Level",Space,Str "2",Space,Str "with",Space,Emph [Str "emphasis"]] +,Header 3 ("level-3",[],[]) [Str "Level",Space,Str "3"] +,Para [Str "with",Space,Str "no",Space,Str "blank",Space,Str "line"] +,Header 2 ("level-2",[],[]) [Str "Level",Space,Str "2"] +,Para [Str "with",Space,Str "no",Space,Str "blank",Space,Str "line"] +,HorizontalRule +,Header 1 ("paragraphs",[],[]) [Str "Paragraphs"] +,Para [Str "Here\8217s",Space,Str "a",Space,Str "regular",Space,Str "paragraph."] +,Para [Str "In",Space,Str "Markdown",Space,Str "1.0.0",Space,Str "and",Space,Str "earlier.",Space,Str "Version",SoftBreak,Str "8.",Space,Str "This",Space,Str "line",Space,Str "turns",Space,Str "into",Space,Str "a",Space,Str "list",Space,Str "item.",SoftBreak,Str "Because",Space,Str "a",Space,Str "hard-wrapped",Space,Str "line",Space,Str "in",Space,Str "the",SoftBreak,Str "middle",Space,Str "of",Space,Str "a",Space,Str "paragraph",Space,Str "looked",Space,Str "like",Space,Str "a",SoftBreak,Str "list",Space,Str "item."] +,Para [Str "Here\8217s",Space,Str "one",Space,Str "with",Space,Str "a",Space,Str "bullet.",SoftBreak,Str "*",Space,Str "criminey."] +,Para [Str "There",Space,Str "should",Space,Str "be",Space,Str "a",Space,Str "hard",Space,Str "line",Space,Str "break",LineBreak,Str "here."] +,HorizontalRule +,Header 1 ("block-quotes",[],[]) [Str "Block",Space,Str "Quotes"] +,Para [Str "E-mail",Space,Str "style:"] +,BlockQuote + [Para [Str "This",Space,Str "is",Space,Str "a",Space,Str "block",Space,Str "quote.",SoftBreak,Str "It",Space,Str "is",Space,Str "pretty",Space,Str "short."]] +,BlockQuote + [Para [Str "Code",Space,Str "in",Space,Str "a",Space,Str "block",Space,Str "quote:"] + ,CodeBlock ("",[],[]) "sub status {\n print \"working\";\n}" + ,Para [Str "A",Space,Str "list:"] + ,OrderedList (1,Decimal,Period) + [[Plain [Str "item",Space,Str "one"]] + ,[Plain [Str "item",Space,Str "two"]]] + ,Para [Str "Nested",Space,Str "block",Space,Str "quotes:"] + ,BlockQuote + [Para [Str "nested"]] + ,BlockQuote + [Para [Str "nested"]]] +,Para [Str "This",Space,Str "should",Space,Str "not",Space,Str "be",Space,Str "a",Space,Str "block",Space,Str "quote:",Space,Str "2",SoftBreak,Str ">",Space,Str "1."] +,Para [Str "And",Space,Str "a",Space,Str "following",Space,Str "paragraph."] +,HorizontalRule +,Header 1 ("code-blocks",[],[]) [Str "Code",Space,Str "Blocks"] +,Para [Str "Code:"] +,CodeBlock ("",[],[]) "---- (should be four hyphens)\n\nsub status {\n print \"working\";\n}\n\nthis code block is indented by one tab" +,Para [Str "And:"] +,CodeBlock ("",[],[]) " this code block is indented by two tabs\n\nThese should not be escaped: \\$ \\\\ \\> \\[ \\{" +,HorizontalRule +,Header 1 ("lists",[],[]) [Str "Lists"] +,Header 2 ("unordered",[],[]) [Str "Unordered"] +,Para [Str "Asterisks",Space,Str "tight:"] +,BulletList + [[Plain [Str "asterisk",Space,Str "1"]] + ,[Plain [Str "asterisk",Space,Str "2"]] + ,[Plain [Str "asterisk",Space,Str "3"]]] +,Para [Str "Asterisks",Space,Str "loose:"] +,BulletList + [[Para [Str "asterisk",Space,Str "1"]] + ,[Para [Str "asterisk",Space,Str "2"]] + ,[Para [Str "asterisk",Space,Str "3"]]] +,Para [Str "Pluses",Space,Str "tight:"] +,BulletList + [[Plain [Str "Plus",Space,Str "1"]] + ,[Plain [Str "Plus",Space,Str "2"]] + ,[Plain [Str "Plus",Space,Str "3"]]] +,Para [Str "Pluses",Space,Str "loose:"] +,BulletList + [[Para [Str "Plus",Space,Str "1"]] + ,[Para [Str "Plus",Space,Str "2"]] + ,[Para [Str "Plus",Space,Str "3"]]] +,Para [Str "Minuses",Space,Str "tight:"] +,BulletList + [[Plain [Str "Minus",Space,Str "1"]] + ,[Plain [Str "Minus",Space,Str "2"]] + ,[Plain [Str "Minus",Space,Str "3"]]] +,Para [Str "Minuses",Space,Str "loose:"] +,BulletList + [[Para [Str "Minus",Space,Str "1"]] + ,[Para [Str "Minus",Space,Str "2"]] + ,[Para [Str "Minus",Space,Str "3"]]] +,Header 2 ("ordered",[],[]) [Str "Ordered"] +,Para [Str "Tight:"] +,OrderedList (1,Decimal,Period) + [[Plain [Str "First"]] + ,[Plain [Str "Second"]] + ,[Plain [Str "Third"]]] +,Para [Str "and:"] +,OrderedList (1,Decimal,Period) + [[Plain [Str "One"]] + ,[Plain [Str "Two"]] + ,[Plain [Str "Three"]]] +,Para [Str "Loose",Space,Str "using",Space,Str "tabs:"] +,OrderedList (1,Decimal,Period) + [[Para [Str "First"]] + ,[Para [Str "Second"]] + ,[Para [Str "Third"]]] +,Para [Str "and",Space,Str "using",Space,Str "spaces:"] +,OrderedList (1,Decimal,Period) + [[Para [Str "One"]] + ,[Para [Str "Two"]] + ,[Para [Str "Three"]]] +,Para [Str "Multiple",Space,Str "paragraphs:"] +,OrderedList (1,Decimal,Period) + [[Para [Str "Item",Space,Str "1,",Space,Str "graf",Space,Str "one."] + ,Para [Str "Item",Space,Str "1.",Space,Str "graf",Space,Str "two.",Space,Str "The",Space,Str "quick",Space,Str "brown",Space,Str "fox",Space,Str "jumped",Space,Str "over",Space,Str "the",Space,Str "lazy",Space,Str "dog\8217s",SoftBreak,Str "back."]] + ,[Para [Str "Item",Space,Str "2."]] + ,[Para [Str "Item",Space,Str "3."]]] +,Header 2 ("nested",[],[]) [Str "Nested"] +,BulletList + [[Plain [Str "Tab"] + ,BulletList + [[Plain [Str "Tab"] + ,BulletList + [[Plain [Str "Tab"]]]]]]] +,Para [Str "Here\8217s",Space,Str "another:"] +,OrderedList (1,Decimal,Period) + [[Plain [Str "First"]] + ,[Plain [Str "Second:"] + ,BulletList + [[Plain [Str "Fee"]] + ,[Plain [Str "Fie"]] + ,[Plain [Str "Foe"]]]] + ,[Plain [Str "Third"]]] +,Para [Str "Same",Space,Str "thing",Space,Str "but",Space,Str "with",Space,Str "paragraphs:"] +,OrderedList (1,Decimal,Period) + [[Para [Str "First"]] + ,[Para [Str "Second:"] + ,BulletList + [[Plain [Str "Fee"]] + ,[Plain [Str "Fie"]] + ,[Plain [Str "Foe"]]]] + ,[Para [Str "Third"]]] +,Header 2 ("tabs-and-spaces",[],[]) [Str "Tabs",Space,Str "and",Space,Str "spaces"] +,BulletList + [[Para [Str "this",Space,Str "is",Space,Str "a",Space,Str "list",Space,Str "item",SoftBreak,Str "indented",Space,Str "with",Space,Str "tabs"]] + ,[Para [Str "this",Space,Str "is",Space,Str "a",Space,Str "list",Space,Str "item",SoftBreak,Str "indented",Space,Str "with",Space,Str "spaces"] + ,BulletList + [[Para [Str "this",Space,Str "is",Space,Str "an",Space,Str "example",Space,Str "list",Space,Str "item",SoftBreak,Str "indented",Space,Str "with",Space,Str "tabs"]] + ,[Para [Str "this",Space,Str "is",Space,Str "an",Space,Str "example",Space,Str "list",Space,Str "item",SoftBreak,Str "indented",Space,Str "with",Space,Str "spaces"]]]]] +,Header 2 ("fancy-list-markers",[],[]) [Str "Fancy",Space,Str "list",Space,Str "markers"] +,OrderedList (2,Decimal,TwoParens) + [[Plain [Str "begins",Space,Str "with",Space,Str "2"]] + ,[Para [Str "and",Space,Str "now",Space,Str "3"] + ,Para [Str "with",Space,Str "a",Space,Str "continuation"] + ,OrderedList (4,LowerRoman,Period) + [[Plain [Str "sublist",Space,Str "with",Space,Str "roman",Space,Str "numerals,",SoftBreak,Str "starting",Space,Str "with",Space,Str "4"]] + ,[Plain [Str "more",Space,Str "items"] + ,OrderedList (1,UpperAlpha,TwoParens) + [[Plain [Str "a",Space,Str "subsublist"]] + ,[Plain [Str "a",Space,Str "subsublist"]]]]]]] +,Para [Str "Nesting:"] +,OrderedList (1,UpperAlpha,Period) + [[Plain [Str "Upper",Space,Str "Alpha"] + ,OrderedList (1,UpperRoman,Period) + [[Plain [Str "Upper",Space,Str "Roman."] + ,OrderedList (6,Decimal,TwoParens) + [[Plain [Str "Decimal",Space,Str "start",Space,Str "with",Space,Str "6"] + ,OrderedList (3,LowerAlpha,OneParen) + [[Plain [Str "Lower",Space,Str "alpha",Space,Str "with",Space,Str "paren"]]]]]]]]] +,Para [Str "Autonumbering:"] +,OrderedList (1,DefaultStyle,DefaultDelim) + [[Plain [Str "Autonumber."]] + ,[Plain [Str "More."] + ,OrderedList (1,DefaultStyle,DefaultDelim) + [[Plain [Str "Nested."]]]]] +,Para [Str "Should",Space,Str "not",Space,Str "be",Space,Str "a",Space,Str "list",Space,Str "item:"] +,Para [Str "M.A.\160\&2007"] +,Para [Str "B.",Space,Str "Williams"] +,HorizontalRule +,Header 1 ("definition-lists",[],[]) [Str "Definition",Space,Str "Lists"] +,Para [Str "Tight",Space,Str "using",Space,Str "spaces:"] +,DefinitionList + [([Str "apple"], + [[Plain [Str "red",Space,Str "fruit"]]]) + ,([Str "orange"], + [[Plain [Str "orange",Space,Str "fruit"]]]) + ,([Str "banana"], + [[Plain [Str "yellow",Space,Str "fruit"]]])] +,Para [Str "Tight",Space,Str "using",Space,Str "tabs:"] +,DefinitionList + [([Str "apple"], + [[Plain [Str "red",Space,Str "fruit"]]]) + ,([Str "orange"], + [[Plain [Str "orange",Space,Str "fruit"]]]) + ,([Str "banana"], + [[Plain [Str "yellow",Space,Str "fruit"]]])] +,Para [Str "Loose:"] +,DefinitionList + [([Str "apple"], + [[Para [Str "red",Space,Str "fruit"]]]) + ,([Str "orange"], + [[Para [Str "orange",Space,Str "fruit"]]]) + ,([Str "banana"], + [[Para [Str "yellow",Space,Str "fruit"]]])] +,Para [Str "Multiple",Space,Str "blocks",Space,Str "with",Space,Str "italics:"] +,DefinitionList + [([Emph [Str "apple"]], + [[Para [Str "red",Space,Str "fruit"] + ,Para [Str "contains",Space,Str "seeds,",SoftBreak,Str "crisp,",Space,Str "pleasant",Space,Str "to",Space,Str "taste"]]]) + ,([Emph [Str "orange"]], + [[Para [Str "orange",Space,Str "fruit"] + ,CodeBlock ("",[],[]) "{ orange code block }" + ,BlockQuote + [Para [Str "orange",Space,Str "block",Space,Str "quote"]]]])] +,Para [Str "Multiple",Space,Str "definitions,",Space,Str "tight:"] +,DefinitionList + [([Str "apple"], + [[Plain [Str "red",Space,Str "fruit"]] + ,[Plain [Str "computer"]]]) + ,([Str "orange"], + [[Plain [Str "orange",Space,Str "fruit"]] + ,[Plain [Str "bank"]]])] +,Para [Str "Multiple",Space,Str "definitions,",Space,Str "loose:"] +,DefinitionList + [([Str "apple"], + [[Para [Str "red",Space,Str "fruit"]] + ,[Para [Str "computer"]]]) + ,([Str "orange"], + [[Para [Str "orange",Space,Str "fruit"]] + ,[Para [Str "bank"]]])] +,Para [Str "Blank",Space,Str "line",Space,Str "after",Space,Str "term,",Space,Str "indented",Space,Str "marker,",Space,Str "alternate",Space,Str "markers:"] +,DefinitionList + [([Str "apple"], + [[Para [Str "red",Space,Str "fruit"]] + ,[Para [Str "computer"]]]) + ,([Str "orange"], + [[Para [Str "orange",Space,Str "fruit"] + ,OrderedList (1,Decimal,Period) + [[Plain [Str "sublist"]] + ,[Plain [Str "sublist"]]]]])] +,Header 1 ("html-blocks",[],[]) [Str "HTML",Space,Str "Blocks"] +,Para [Str "Simple",Space,Str "block",Space,Str "on",Space,Str "one",Space,Str "line:"] +,Div ("",[],[]) + [Plain [Str "foo"]] +,Para [Str "And",Space,Str "nested",Space,Str "without",Space,Str "indentation:"] +,Div ("",[],[]) + [Div ("",[],[]) + [Div ("",[],[]) + [Para [Str "foo"]]] + ,Div ("",[],[]) + [Plain [Str "bar"]]] +,Para [Str "Interpreted",Space,Str "markdown",Space,Str "in",Space,Str "a",Space,Str "table:"] +,RawBlock (Format "html") "" +,RawBlock (Format "html") "" +,RawBlock (Format "html") "" +,RawBlock (Format "html") "" +,RawBlock (Format "html") "" +,RawBlock (Format "html") "
    " +,Plain [Str "This",Space,Str "is",Space,Emph [Str "emphasized"]] +,RawBlock (Format "html") "" +,Plain [Str "And",Space,Str "this",Space,Str "is",Space,Strong [Str "strong"]] +,RawBlock (Format "html") "
    " +,RawBlock (Format "html") "" +,Para [Str "Here\8217s",Space,Str "a",Space,Str "simple",Space,Str "block:"] +,Div ("",[],[]) + [Para [Str "foo"]] +,Para [Str "This",Space,Str "should",Space,Str "be",Space,Str "a",Space,Str "code",Space,Str "block,",Space,Str "though:"] +,CodeBlock ("",[],[]) "
    \n foo\n
    " +,Para [Str "As",Space,Str "should",Space,Str "this:"] +,CodeBlock ("",[],[]) "
    foo
    " +,Para [Str "Now,",Space,Str "nested:"] +,Div ("",[],[]) + [Div ("",[],[]) + [Div ("",[],[]) + [Plain [Str "foo"]]]] +,Para [Str "This",Space,Str "should",Space,Str "just",Space,Str "be",Space,Str "an",Space,Str "HTML",Space,Str "comment:"] +,RawBlock (Format "html") "" +,Para [Str "Multiline:"] +,RawBlock (Format "html") "" +,RawBlock (Format "html") "" +,Para [Str "Code",Space,Str "block:"] +,CodeBlock ("",[],[]) "" +,Para [Str "Just",Space,Str "plain",Space,Str "comment,",Space,Str "with",Space,Str "trailing",Space,Str "spaces",Space,Str "on",Space,Str "the",Space,Str "line:"] +,RawBlock (Format "html") "" +,Para [Str "Code:"] +,CodeBlock ("",[],[]) "
    " +,Para [Str "Hr\8217s:"] +,RawBlock (Format "html") "
    " +,RawBlock (Format "html") "
    " +,RawBlock (Format "html") "
    " +,RawBlock (Format "html") "
    " +,RawBlock (Format "html") "
    " +,RawBlock (Format "html") "
    " +,RawBlock (Format "html") "
    " +,RawBlock (Format "html") "
    " +,RawBlock (Format "html") "
    " +,HorizontalRule +,Header 1 ("inline-markup",[],[]) [Str "Inline",Space,Str "Markup"] +,Para [Str "This",Space,Str "is",Space,Emph [Str "emphasized"],Str ",",Space,Str "and",Space,Str "so",Space,Emph [Str "is",Space,Str "this"],Str "."] +,Para [Str "This",Space,Str "is",Space,Strong [Str "strong"],Str ",",Space,Str "and",Space,Str "so",Space,Strong [Str "is",Space,Str "this"],Str "."] +,Para [Str "An",Space,Emph [Link ("",[],[]) [Str "emphasized",Space,Str "link"] ("/url","")],Str "."] +,Para [Strong [Emph [Str "This",Space,Str "is",Space,Str "strong",Space,Str "and",Space,Str "em."]]] +,Para [Str "So",Space,Str "is",Space,Strong [Emph [Str "this"]],Space,Str "word."] +,Para [Strong [Emph [Str "This",Space,Str "is",Space,Str "strong",Space,Str "and",Space,Str "em."]]] +,Para [Str "So",Space,Str "is",Space,Strong [Emph [Str "this"]],Space,Str "word."] +,Para [Str "This",Space,Str "is",Space,Str "code:",Space,Code ("",[],[]) ">",Str ",",Space,Code ("",[],[]) "$",Str ",",Space,Code ("",[],[]) "\\",Str ",",Space,Code ("",[],[]) "\\$",Str ",",Space,Code ("",[],[]) "",Str "."] +,Para [Strikeout [Str "This",Space,Str "is",Space,Emph [Str "strikeout"],Str "."]] +,Para [Str "Superscripts:",Space,Str "a",Superscript [Str "bc"],Str "d",Space,Str "a",Superscript [Emph [Str "hello"]],Space,Str "a",Superscript [Str "hello\160there"],Str "."] +,Para [Str "Subscripts:",Space,Str "H",Subscript [Str "2"],Str "O,",Space,Str "H",Subscript [Str "23"],Str "O,",Space,Str "H",Subscript [Str "many\160of\160them"],Str "O."] +,Para [Str "These",Space,Str "should",Space,Str "not",Space,Str "be",Space,Str "superscripts",Space,Str "or",Space,Str "subscripts,",SoftBreak,Str "because",Space,Str "of",Space,Str "the",Space,Str "unescaped",Space,Str "spaces:",Space,Str "a^b",Space,Str "c^d,",Space,Str "a~b",Space,Str "c~d."] +,HorizontalRule +,Header 1 ("smart-quotes-ellipses-dashes",[],[]) [Str "Smart",Space,Str "quotes,",Space,Str "ellipses,",Space,Str "dashes"] +,Para [Quoted DoubleQuote [Str "Hello,"],Space,Str "said",Space,Str "the",Space,Str "spider.",Space,Quoted DoubleQuote [Quoted SingleQuote [Str "Shelob"],Space,Str "is",Space,Str "my",Space,Str "name."]] +,Para [Quoted SingleQuote [Str "A"],Str ",",Space,Quoted SingleQuote [Str "B"],Str ",",Space,Str "and",Space,Quoted SingleQuote [Str "C"],Space,Str "are",Space,Str "letters."] +,Para [Quoted SingleQuote [Str "Oak,"],Space,Quoted SingleQuote [Str "elm,"],Space,Str "and",Space,Quoted SingleQuote [Str "beech"],Space,Str "are",Space,Str "names",Space,Str "of",Space,Str "trees.",SoftBreak,Str "So",Space,Str "is",Space,Quoted SingleQuote [Str "pine."]] +,Para [Quoted SingleQuote [Str "He",Space,Str "said,",Space,Quoted DoubleQuote [Str "I",Space,Str "want",Space,Str "to",Space,Str "go."]],Space,Str "Were",Space,Str "you",Space,Str "alive",Space,Str "in",Space,Str "the",SoftBreak,Str "70\8217s?"] +,Para [Str "Here",Space,Str "is",Space,Str "some",Space,Str "quoted",Space,Quoted SingleQuote [Code ("",[],[]) "code"],Space,Str "and",Space,Str "a",Space,Quoted DoubleQuote [Link ("",[],[]) [Str "quoted",Space,Str "link"] ("http://example.com/?foo=1&bar=2","")],Str "."] +,Para [Str "Some",Space,Str "dashes:",Space,Str "one\8212two",Space,Str "\8212",Space,Str "three\8212four",Space,Str "\8212",Space,Str "five."] +,Para [Str "Dashes",Space,Str "between",Space,Str "numbers:",Space,Str "5\8211\&7,",Space,Str "255\8211\&66,",Space,Str "1987\8211\&1999."] +,Para [Str "Ellipses\8230and\8230and\8230."] +,HorizontalRule +,Header 1 ("latex",[],[]) [Str "LaTeX"] +,BulletList + [[Plain [RawInline (Format "tex") "\\cite[22-23]{smith.1899}"]] + ,[Plain [Math InlineMath "2+2=4"]] + ,[Plain [Math InlineMath "x \\in y"]] + ,[Plain [Math InlineMath "\\alpha \\wedge \\omega"]] + ,[Plain [Math InlineMath "223"]] + ,[Plain [Math InlineMath "p",Str "-Tree"]] + ,[Plain [Str "Here\8217s",Space,Str "some",Space,Str "display",Space,Str "math:",SoftBreak,Math DisplayMath "\\frac{d}{dx}f(x)=\\lim_{h\\to 0}\\frac{f(x+h)-f(x)}{h}"]] + ,[Plain [Str "Here\8217s",Space,Str "one",Space,Str "that",Space,Str "has",Space,Str "a",Space,Str "line",Space,Str "break",Space,Str "in",Space,Str "it:",Space,Math InlineMath "\\alpha + \\omega \\times x^2",Str "."]]] +,Para [Str "These",Space,Str "shouldn\8217t",Space,Str "be",Space,Str "math:"] +,BulletList + [[Plain [Str "To",Space,Str "get",Space,Str "the",Space,Str "famous",Space,Str "equation,",Space,Str "write",Space,Code ("",[],[]) "$e = mc^2$",Str "."]] + ,[Plain [Str "$22,000",Space,Str "is",Space,Str "a",Space,Emph [Str "lot"],Space,Str "of",Space,Str "money.",Space,Str "So",Space,Str "is",Space,Str "$34,000.",SoftBreak,Str "(It",Space,Str "worked",Space,Str "if",Space,Quoted DoubleQuote [Str "lot"],Space,Str "is",Space,Str "emphasized.)"]] + ,[Plain [Str "Shoes",Space,Str "($20)",Space,Str "and",Space,Str "socks",Space,Str "($5)."]] + ,[Plain [Str "Escaped",Space,Code ("",[],[]) "$",Str ":",Space,Str "$73",Space,Emph [Str "this",Space,Str "should",Space,Str "be",Space,Str "emphasized"],Space,Str "23$."]]] +,Para [Str "Here\8217s",Space,Str "a",Space,Str "LaTeX",Space,Str "table:"] +,RawBlock (Format "latex") "\\begin{tabular}{|l|l|}\\hline\nAnimal & Number \\\\ \\hline\nDog & 2 \\\\\nCat & 1 \\\\ \\hline\n\\end{tabular}" +,HorizontalRule +,Header 1 ("special-characters",[],[]) [Str "Special",Space,Str "Characters"] +,Para [Str "Here",Space,Str "is",Space,Str "some",Space,Str "unicode:"] +,BulletList + [[Plain [Str "I",Space,Str "hat:",Space,Str "\206"]] + ,[Plain [Str "o",Space,Str "umlaut:",Space,Str "\246"]] + ,[Plain [Str "section:",Space,Str "\167"]] + ,[Plain [Str "set",Space,Str "membership:",Space,Str "\8712"]] + ,[Plain [Str "copyright:",Space,Str "\169"]]] +,Para [Str "AT&T",Space,Str "has",Space,Str "an",Space,Str "ampersand",Space,Str "in",Space,Str "their",Space,Str "name."] +,Para [Str "AT&T",Space,Str "is",Space,Str "another",Space,Str "way",Space,Str "to",Space,Str "write",Space,Str "it."] +,Para [Str "This",Space,Str "&",Space,Str "that."] +,Para [Str "4",Space,Str "<",Space,Str "5."] +,Para [Str "6",Space,Str ">",Space,Str "5."] +,Para [Str "Backslash:",Space,Str "\\"] +,Para [Str "Backtick:",Space,Str "`"] +,Para [Str "Asterisk:",Space,Str "*"] +,Para [Str "Underscore:",Space,Str "_"] +,Para [Str "Left",Space,Str "brace:",Space,Str "{"] +,Para [Str "Right",Space,Str "brace:",Space,Str "}"] +,Para [Str "Left",Space,Str "bracket:",Space,Str "["] +,Para [Str "Right",Space,Str "bracket:",Space,Str "]"] +,Para [Str "Left",Space,Str "paren:",Space,Str "("] +,Para [Str "Right",Space,Str "paren:",Space,Str ")"] +,Para [Str "Greater-than:",Space,Str ">"] +,Para [Str "Hash:",Space,Str "#"] +,Para [Str "Period:",Space,Str "."] +,Para [Str "Bang:",Space,Str "!"] +,Para [Str "Plus:",Space,Str "+"] +,Para [Str "Minus:",Space,Str "-"] +,HorizontalRule +,Header 1 ("links",[],[]) [Str "Links"] +,Header 2 ("explicit",[],[]) [Str "Explicit"] +,Para [Str "Just",Space,Str "a",Space,Link ("",[],[]) [Str "URL"] ("/url/",""),Str "."] +,Para [Link ("",[],[]) [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","title"),Str "."] +,Para [Link ("",[],[]) [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","title preceded by two spaces"),Str "."] +,Para [Link ("",[],[]) [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","title preceded by a tab"),Str "."] +,Para [Link ("",[],[]) [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","title with \"quotes\" in it")] +,Para [Link ("",[],[]) [Str "URL",Space,Str "and",Space,Str "title"] ("/url/","title with single quotes")] +,Para [Link ("",[],[]) [Str "with_underscore"] ("/url/with_underscore","")] +,Para [Link ("",[],[]) [Str "Email",Space,Str "link"] ("mailto:nobody@nowhere.net","")] +,Para [Link ("",[],[]) [Str "Empty"] ("",""),Str "."] +,Header 2 ("reference",[],[]) [Str "Reference"] +,Para [Str "Foo",Space,Link ("",[],[]) [Str "bar"] ("/url/",""),Str "."] +,Para [Str "With",Space,Link ("",[],[]) [Str "embedded",Space,Str "[brackets]"] ("/url/",""),Str "."] +,Para [Link ("",[],[]) [Str "b"] ("/url/",""),Space,Str "by",Space,Str "itself",Space,Str "should",Space,Str "be",Space,Str "a",Space,Str "link."] +,Para [Str "Indented",Space,Link ("",[],[]) [Str "once"] ("/url",""),Str "."] +,Para [Str "Indented",Space,Link ("",[],[]) [Str "twice"] ("/url",""),Str "."] +,Para [Str "Indented",Space,Link ("",[],[]) [Str "thrice"] ("/url",""),Str "."] +,Para [Str "This",Space,Str "should",Space,Str "[not][]",Space,Str "be",Space,Str "a",Space,Str "link."] +,CodeBlock ("",[],[]) "[not]: /url" +,Para [Str "Foo",Space,Link ("",[],[]) [Str "bar"] ("/url/","Title with \"quotes\" inside"),Str "."] +,Para [Str "Foo",Space,Link ("",[],[]) [Str "biz"] ("/url/","Title with \"quote\" inside"),Str "."] +,Header 2 ("with-ampersands",[],[]) [Str "With",Space,Str "ampersands"] +,Para [Str "Here\8217s",Space,Str "a",Space,Link ("",[],[]) [Str "link",Space,Str "with",Space,Str "an",Space,Str "ampersand",Space,Str "in",Space,Str "the",Space,Str "URL"] ("http://example.com/?foo=1&bar=2",""),Str "."] +,Para [Str "Here\8217s",Space,Str "a",Space,Str "link",Space,Str "with",Space,Str "an",Space,Str "amersand",Space,Str "in",Space,Str "the",Space,Str "link",Space,Str "text:",Space,Link ("",[],[]) [Str "AT&T"] ("http://att.com/","AT&T"),Str "."] +,Para [Str "Here\8217s",Space,Str "an",Space,Link ("",[],[]) [Str "inline",Space,Str "link"] ("/script?foo=1&bar=2",""),Str "."] +,Para [Str "Here\8217s",Space,Str "an",Space,Link ("",[],[]) [Str "inline",Space,Str "link",Space,Str "in",Space,Str "pointy",Space,Str "braces"] ("/script?foo=1&bar=2",""),Str "."] +,Header 2 ("autolinks",[],[]) [Str "Autolinks"] +,Para [Str "With",Space,Str "an",Space,Str "ampersand:",Space,Link ("",[],[]) [Str "http://example.com/?foo=1&bar=2"] ("http://example.com/?foo=1&bar=2","")] +,BulletList + [[Plain [Str "In",Space,Str "a",Space,Str "list?"]] + ,[Plain [Link ("",[],[]) [Str "http://example.com/"] ("http://example.com/","")]] + ,[Plain [Str "It",Space,Str "should."]]] +,Para [Str "An",Space,Str "e-mail",Space,Str "address:",Space,Link ("",[],[]) [Str "nobody@nowhere.net"] ("mailto:nobody@nowhere.net","")] +,BlockQuote + [Para [Str "Blockquoted:",Space,Link ("",[],[]) [Str "http://example.com/"] ("http://example.com/","")]] +,Para [Str "Auto-links",Space,Str "should",Space,Str "not",Space,Str "occur",Space,Str "here:",Space,Code ("",[],[]) ""] +,CodeBlock ("",[],[]) "or here: " +,HorizontalRule +,Header 1 ("images",[],[]) [Str "Images"] +,Para [Str "From",Space,Quoted DoubleQuote [Str "Voyage",Space,Str "dans",Space,Str "la",Space,Str "Lune"],Space,Str "by",Space,Str "Georges",Space,Str "Melies",Space,Str "(1902):"] +,Para [Image ("",[],[]) [Str "lalune"] ("lalune.jpg","fig:Voyage dans la Lune")] +,Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "movie",Space,Image ("",[],[]) [Str "movie"] ("movie.jpg",""),Space,Str "icon."] +,HorizontalRule +,Header 1 ("footnotes",[],[]) [Str "Footnotes"] +,Para [Str "Here",Space,Str "is",Space,Str "a",Space,Str "footnote",Space,Str "reference,",Note [Para [Str "Here",Space,Str "is",Space,Str "the",Space,Str "footnote.",Space,Str "It",Space,Str "can",Space,Str "go",Space,Str "anywhere",Space,Str "after",Space,Str "the",Space,Str "footnote",SoftBreak,Str "reference.",Space,Str "It",Space,Str "need",Space,Str "not",Space,Str "be",Space,Str "placed",Space,Str "at",Space,Str "the",Space,Str "end",Space,Str "of",Space,Str "the",Space,Str "document."]],Space,Str "and",Space,Str "another.",Note [Para [Str "Here\8217s",Space,Str "the",Space,Str "long",Space,Str "note.",Space,Str "This",Space,Str "one",Space,Str "contains",Space,Str "multiple",SoftBreak,Str "blocks."],Para [Str "Subsequent",Space,Str "blocks",Space,Str "are",Space,Str "indented",Space,Str "to",Space,Str "show",Space,Str "that",Space,Str "they",Space,Str "belong",Space,Str "to",Space,Str "the",SoftBreak,Str "footnote",Space,Str "(as",Space,Str "with",Space,Str "list",Space,Str "items)."],CodeBlock ("",[],[]) " { }",Para [Str "If",Space,Str "you",Space,Str "want,",Space,Str "you",Space,Str "can",Space,Str "indent",Space,Str "every",Space,Str "line,",Space,Str "but",Space,Str "you",Space,Str "can",Space,Str "also",Space,Str "be",SoftBreak,Str "lazy",Space,Str "and",Space,Str "just",Space,Str "indent",Space,Str "the",Space,Str "first",Space,Str "line",Space,Str "of",Space,Str "each",Space,Str "block."]],SoftBreak,Str "This",Space,Str "should",Space,Emph [Str "not"],Space,Str "be",Space,Str "a",Space,Str "footnote",Space,Str "reference,",Space,Str "because",Space,Str "it",SoftBreak,Str "contains",Space,Str "a",Space,Str "space.[^my",Space,Str "note]",Space,Str "Here",Space,Str "is",Space,Str "an",Space,Str "inline",Space,Str "note.",Note [Para [Str "This",SoftBreak,Str "is",Space,Emph [Str "easier"],Space,Str "to",Space,Str "type.",Space,Str "Inline",Space,Str "notes",Space,Str "may",Space,Str "contain",SoftBreak,Link ("",[],[]) [Str "links"] ("http://google.com",""),Space,Str "and",Space,Code ("",[],[]) "]",Space,Str "verbatim",Space,Str "characters,",SoftBreak,Str "as",Space,Str "well",Space,Str "as",Space,Str "[bracketed",Space,Str "text]."]]] +,BlockQuote + [Para [Str "Notes",Space,Str "can",Space,Str "go",Space,Str "in",Space,Str "quotes.",Note [Para [Str "In",Space,Str "quote."]]]] +,OrderedList (1,Decimal,Period) + [[Plain [Str "And",Space,Str "in",Space,Str "list",Space,Str "items.",Note [Para [Str "In",Space,Str "list."]]]]] +,Para [Str "This",Space,Str "paragraph",Space,Str "should",Space,Str "not",Space,Str "be",Space,Str "part",Space,Str "of",Space,Str "the",Space,Str "note,",Space,Str "as",Space,Str "it",Space,Str "is",Space,Str "not",Space,Str "indented."]] diff --git a/test/writer.opendocument b/test/writer.opendocument new file mode 100644 index 0000000..77c79d1 --- /dev/null +++ b/test/writer.opendocument @@ -0,0 +1,1535 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Pandoc Test Suite +John MacFarlane +Anonymous +July 17, 2006 +This is a set of tests for pandoc. Most +of them are adapted from John Gruber’s markdown test suite. + +Headers +Level 2 with an +embedded +link +Level 3 with +emphasis +Level 4 +Level 5 +Level 1 +Level 2 with +emphasis +Level 3 +with no blank line +Level 2 +with no blank line + +Paragraphs +Here’s a regular +paragraph. +In Markdown 1.0.0 and earlier. Version +8. This line turns into a list item. Because a hard-wrapped line in the middle +of a paragraph looked like a list item. +Here’s one with a bullet. * +criminey. +There should be a hard line +breakhere. + +Block +Quotes +E-mail style: +This is a block quote. It is pretty +short. +Code in a block quote: +sub status { +print "working"; +} +A list: + + + item one + + + item two + + +Nested block quotes: +nested +nested +This should not be a block quote: +2 > 1. +And a following paragraph. + +Code +Blocks +Code: +---- (should be four hyphens) + +sub status { +print "working"; +} + +this code block is indented by one tab +And: +this code block is indented by two tabs + +These should not be escaped: \$ \\ \> \[ \{ + +Lists +Unordered +Asterisks tight: + + + asterisk 1 + + + asterisk 2 + + + asterisk 3 + + +Asterisks loose: + + + asterisk 1 + + + asterisk 2 + + + asterisk 3 + + +Pluses tight: + + + Plus 1 + + + Plus 2 + + + Plus 3 + + +Pluses loose: + + + Plus 1 + + + Plus 2 + + + Plus 3 + + +Minuses tight: + + + Minus 1 + + + Minus 2 + + + Minus 3 + + +Minuses loose: + + + Minus 1 + + + Minus 2 + + + Minus 3 + + +Ordered +Tight: + + + First + + + Second + + + Third + + +and: + + + One + + + Two + + + Three + + +Loose using tabs: + + + First + + + Second + + + Third + + +and using spaces: + + + One + + + Two + + + Three + + +Multiple paragraphs: + + + Item 1, graf one. + Item 1. graf two. The quick brown fox jumped + over the lazy dog’s back. + + + Item 2. + + + Item 3. + + +Nested + + + Tab + + Tab + + Tab + + + + + + +Here’s another: + + + First + + + Second: + + + Fee + + + Fie + + + Foe + + + + + Third + + +Same thing but with +paragraphs: + + + First + + + Second: + + + Fee + + + Fie + + + Foe + + + + + Third + + +Tabs and +spaces + + + this is a list item indented with + tabs + + + this is a list item indented with + spaces + + this is an example list item indented + with tabs + + + this is an example list item indented + with spaces + + + + +Fancy list +markers + + + begins with 2 + + + and now 3 + with a continuation + + + sublist with roman numerals, starting + with 4 + + + more items + + + a subsublist + + + a subsublist + + + + + + +Nesting: + + + Upper Alpha + + + Upper Roman. + + + Decimal start with 6 + + + Lower alpha with paren + + + + + + + + +Autonumbering: + + + Autonumber. + + + More. + + + Nested. + + + + +Should not be a list +item: +M.A. 2007 +B. Williams + +Definition +Lists +Tight using spaces: +apple +red fruit +orange +orange +fruit +banana +yellow +fruit +Tight using tabs: +apple +red fruit +orange +orange +fruit +banana +yellow +fruit +Loose: +apple +red fruit +orange +orange fruit +banana +yellow fruit +Multiple blocks with +italics: +apple +red +fruitcontains +seeds, crisp, pleasant to taste +orange +orange fruit{ orange code block }orange +block quote +Multiple definitions, +tight: +apple +red fruit +computer +orange +orange +fruit +bank +Multiple definitions, +loose: +apple +red fruit +computer +orange +orange fruit +bank +Blank line after term, indented +marker, alternate markers: +apple +red fruit +computer +orange +orange +fruit + + sublist + + + sublist + + +HTML +Blocks +Simple block on one +line: +foo +And nested without +indentation: +foo +bar +Interpreted markdown in a +table: +This is +emphasized +And this is +strong +Here’s a simple block: +foo +This should be a code block, +though: +<div> +foo +</div> +As should this: +<div>foo</div> +Now, nested: +foo +This should just be an HTML +comment: +Multiline: +Code block: +<!-- Comment --> +Just plain comment, with trailing +spaces on the line: +Code: +<hr /> +Hr’s: + +Inline +Markup +This is +emphasized, and so +is this. +This is +strong, and so +is this. +An +emphasized +link. +This is +strong and em. +So is +this word. +This is +strong and em. +So is +this word. +This is code: +>, +$, +\, +\$, +<html>. +This is +strikeout. +Superscripts: +abcd +ahello +ahello there. +Subscripts: +H2O, +H23O, +Hmany of themO. +These should not be superscripts or +subscripts, because of the unescaped spaces: a^b c^d, a~b c~d. + +Smart quotes, +ellipses, dashes +“Hello,” said the spider. +“‘Shelob’ is my name.” +‘A’, ‘B’, and ‘C’ are letters. +‘Oak,’ ‘elm,’ and ‘beech’ are names of +trees. So is ‘pine.’ +‘He said, “I want to go.”’ Were you +alive in the 70’s? +Here is some quoted +‘code’ and a +“quoted +link”. +Some dashes: one—two — three—four — +five. +Dashes between numbers: 5–7, 255–66, +1987–1999. +Ellipses…and…and…. + +LaTeX + + + + + + 2 + 2 = 4 + + + x ∈ y + + + α ∧ ω + + + 223 + + + p-Tree + + + Here’s some display math: + $$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$$ + + + Here’s one that has a line break in it: + α + ω × x2. + + +These shouldn’t be math: + + + To get the famous equation, write + $e = mc^2$. + + + $22,000 is a + lot of money. So is $34,000. + (It worked if “lot” is emphasized.) + + + Shoes ($20) and socks ($5). + + + Escaped + $: $73 + this should be emphasized + 23$. + + +Here’s a LaTeX table: + +Special +Characters +Here is some unicode: + + + I hat: Î + + + o umlaut: ö + + + section: § + + + set membership: ∈ + + + copyright: © + + +AT&T has an ampersand in +their name. +AT&T is another way to write +it. +This & that. +4 < 5. +6 > 5. +Backslash: \ +Backtick: ` +Asterisk: * +Underscore: _ +Left brace: { +Right brace: } +Left bracket: [ +Right bracket: ] +Left paren: ( +Right paren: ) +Greater-than: > +Hash: # +Period: . +Bang: ! +Plus: + +Minus: - + +Links +Explicit +Just a +URL. +URL +and title. +URL +and title. +URL +and title. +URL +and title +URL +and title +with_underscore +Email +link +Empty. +Reference +Foo +bar. +With +embedded +[brackets]. +b +by itself should be a link. +Indented +once. +Indented +twice. +Indented +thrice. +This should [not][] be a link. +[not]: /url +Foo +bar. +Foo +biz. +With +ampersands +Here’s a +link +with an ampersand in the URL. +Here’s a link with an amersand in the +link text: +AT&T. +Here’s an +inline +link. +Here’s an +inline +link in pointy braces. +Autolinks +With an ampersand: +http://example.com/?foo=1&bar=2 + + + In a list? + + + http://example.com/ + + + It should. + + +An e-mail address: +nobody@nowhere.net +Blockquoted: +http://example.com/ +Auto-links should not occur here: +<http://example.com/> +or here: <http://example.com/> + +Images +From “Voyage dans la Lune” by +Georges Melies (1902): + +lalune +Here is a movie + +icon. + +Footnotes +Here is a footnote +reference,1Here +is the footnote. It can go anywhere after the footnote reference. It need not +be placed at the end of the document. +and +another.2Here’s +the long note. This one contains multiple +blocks.Subsequent blocks are +indented to show that they belong to the footnote (as with list +items).{ <code> }If +you want, you can indent every line, but you can also be lazy and just indent +the first line of each block. This +should not be a footnote +reference, because it contains a space.[^my note] Here is an inline +note.3This +is easier to type. Inline notes +may contain +links +and ] verbatim +characters, as well as [bracketed +text]. +Notes can go in +quotes.4In +quote. + + + And in list + items.5In + list. + + +This paragraph should not be part +of the note, as it is not indented. + + + diff --git a/test/writer.opml b/test/writer.opml new file mode 100644 index 0000000..4e67652 --- /dev/null +++ b/test/writer.opml @@ -0,0 +1,72 @@ + + + + Pandoc Test Suite + Mon, 17 Jul 2006 00:00:00 UTC + John MacFarlane; Anonymous + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/writer.org b/test/writer.org new file mode 100644 index 0000000..1ae0ca8 --- /dev/null +++ b/test/writer.org @@ -0,0 +1,851 @@ +#+TITLE: Pandoc Test Suite + +#+AUTHOR: John MacFarlane; Anonymous +#+DATE: July 17, 2006 + +This is a set of tests for pandoc. Most of them are adapted from John Gruber's +markdown test suite. + +-------------- + +* Headers + :PROPERTIES: + :CUSTOM_ID: headers + :END: + +** Level 2 with an [[/url][embedded link]] + :PROPERTIES: + :CUSTOM_ID: level-2-with-an-embedded-link + :END: + +*** Level 3 with /emphasis/ + :PROPERTIES: + :CUSTOM_ID: level-3-with-emphasis + :END: + +**** Level 4 + :PROPERTIES: + :CUSTOM_ID: level-4 + :END: + +***** Level 5 + :PROPERTIES: + :CUSTOM_ID: level-5 + :END: + +* Level 1 + :PROPERTIES: + :CUSTOM_ID: level-1 + :END: + +** Level 2 with /emphasis/ + :PROPERTIES: + :CUSTOM_ID: level-2-with-emphasis + :END: + +*** Level 3 + :PROPERTIES: + :CUSTOM_ID: level-3 + :END: + +with no blank line + +** Level 2 + :PROPERTIES: + :CUSTOM_ID: level-2 + :END: + +with no blank line + +-------------- + +* Paragraphs + :PROPERTIES: + :CUSTOM_ID: paragraphs + :END: + +Here's a regular paragraph. + +In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item. +Because a hard-wrapped line in the middle of a paragraph looked like a list +item. + +Here's one with a bullet. * criminey. + +There should be a hard line break\\ +here. + +-------------- + +* Block Quotes + :PROPERTIES: + :CUSTOM_ID: block-quotes + :END: + +E-mail style: + +#+BEGIN_QUOTE + This is a block quote. It is pretty short. +#+END_QUOTE + +#+BEGIN_QUOTE + Code in a block quote: + + #+BEGIN_EXAMPLE + sub status { + print "working"; + } + #+END_EXAMPLE + + A list: + + 1. item one + 2. item two + + Nested block quotes: + + #+BEGIN_QUOTE + nested + #+END_QUOTE + + #+BEGIN_QUOTE + nested + #+END_QUOTE +#+END_QUOTE + +This should not be a block quote: 2 > 1. + +And a following paragraph. + +-------------- + +* Code Blocks + :PROPERTIES: + :CUSTOM_ID: code-blocks + :END: + +Code: + +#+BEGIN_EXAMPLE + ---- (should be four hyphens) + + sub status { + print "working"; + } + + this code block is indented by one tab +#+END_EXAMPLE + +And: + +#+BEGIN_EXAMPLE + this code block is indented by two tabs + + These should not be escaped: \$ \\ \> \[ \{ +#+END_EXAMPLE + +-------------- + +* Lists + :PROPERTIES: + :CUSTOM_ID: lists + :END: + +** Unordered + :PROPERTIES: + :CUSTOM_ID: unordered + :END: + +Asterisks tight: + +- asterisk 1 +- asterisk 2 +- asterisk 3 + +Asterisks loose: + +- asterisk 1 + +- asterisk 2 + +- asterisk 3 + +Pluses tight: + +- Plus 1 +- Plus 2 +- Plus 3 + +Pluses loose: + +- Plus 1 + +- Plus 2 + +- Plus 3 + +Minuses tight: + +- Minus 1 +- Minus 2 +- Minus 3 + +Minuses loose: + +- Minus 1 + +- Minus 2 + +- Minus 3 + +** Ordered + :PROPERTIES: + :CUSTOM_ID: ordered + :END: + +Tight: + +1. First +2. Second +3. Third + +and: + +1. One +2. Two +3. Three + +Loose using tabs: + +1. First + +2. Second + +3. Third + +and using spaces: + +1. One + +2. Two + +3. Three + +Multiple paragraphs: + +1. Item 1, graf one. + + Item 1. graf two. The quick brown fox jumped over the lazy dog's back. + +2. Item 2. + +3. Item 3. + +** Nested + :PROPERTIES: + :CUSTOM_ID: nested + :END: + +- Tab + + - Tab + + - Tab + +Here's another: + +1. First +2. Second: + + - Fee + - Fie + - Foe + +3. Third + +Same thing but with paragraphs: + +1. First + +2. Second: + + - Fee + - Fie + - Foe + +3. Third + +** Tabs and spaces + :PROPERTIES: + :CUSTOM_ID: tabs-and-spaces + :END: + +- this is a list item indented with tabs + +- this is a list item indented with spaces + + - this is an example list item indented with tabs + + - this is an example list item indented with spaces + +** Fancy list markers + :PROPERTIES: + :CUSTOM_ID: fancy-list-markers + :END: + +2) begins with 2 +3) and now 3 + + with a continuation + + 4. sublist with roman numerals, starting with 4 + 5. more items + + 1) a subsublist + 2) a subsublist + +Nesting: + +1. Upper Alpha + + 1. Upper Roman. + + 6) Decimal start with 6 + + 3) Lower alpha with paren + +Autonumbering: + +1. Autonumber. +2. More. + + 1. Nested. + +Should not be a list item: + +M.A. 2007 + +B. Williams + +-------------- + +* Definition Lists + :PROPERTIES: + :CUSTOM_ID: definition-lists + :END: + +Tight using spaces: + +- apple :: red fruit +- orange :: orange fruit +- banana :: yellow fruit + +Tight using tabs: + +- apple :: red fruit +- orange :: orange fruit +- banana :: yellow fruit + +Loose: + +- apple :: red fruit + +- orange :: orange fruit + +- banana :: yellow fruit + +Multiple blocks with italics: + +- /apple/ :: red fruit + + contains seeds, crisp, pleasant to taste + +- /orange/ :: orange fruit + + #+BEGIN_EXAMPLE + { orange code block } + #+END_EXAMPLE + + #+BEGIN_QUOTE + orange block quote + #+END_QUOTE + +Multiple definitions, tight: + +- apple :: red fruit + computer +- orange :: orange fruit + bank + +Multiple definitions, loose: + +- apple :: red fruit + + computer + +- orange :: orange fruit + + bank + +Blank line after term, indented marker, alternate markers: + +- apple :: red fruit + + computer + +- orange :: orange fruit + + 1. sublist + 2. sublist + +* HTML Blocks + :PROPERTIES: + :CUSTOM_ID: html-blocks + :END: + +Simple block on one line: + +foo + +And nested without indentation: + +foo + +bar + +Interpreted markdown in a table: + +#+BEGIN_HTML + +#+END_HTML + +#+BEGIN_HTML + +#+END_HTML + +#+BEGIN_HTML + +#+END_HTML + +#+BEGIN_HTML + +#+END_HTML + +#+BEGIN_HTML + +#+END_HTML + +#+BEGIN_HTML +
    +#+END_HTML + +This is /emphasized/ + +#+BEGIN_HTML + +#+END_HTML + +And this is *strong* + +#+BEGIN_HTML +
    +#+END_HTML + +#+BEGIN_HTML + +#+END_HTML + +Here's a simple block: + +foo + +This should be a code block, though: + +#+BEGIN_EXAMPLE +
    + foo +
    +#+END_EXAMPLE + +As should this: + +#+BEGIN_EXAMPLE +
    foo
    +#+END_EXAMPLE + +Now, nested: + +foo + +This should just be an HTML comment: + +#+BEGIN_HTML + +#+END_HTML + +Multiline: + +#+BEGIN_HTML + +#+END_HTML + +#+BEGIN_HTML + +#+END_HTML + +Code block: + +#+BEGIN_EXAMPLE + +#+END_EXAMPLE + +Just plain comment, with trailing spaces on the line: + +#+BEGIN_HTML + +#+END_HTML + +Code: + +#+BEGIN_EXAMPLE +
    +#+END_EXAMPLE + +Hr's: + +#+BEGIN_HTML +
    +#+END_HTML + +#+BEGIN_HTML +
    +#+END_HTML + +#+BEGIN_HTML +
    +#+END_HTML + +#+BEGIN_HTML +
    +#+END_HTML + +#+BEGIN_HTML +
    +#+END_HTML + +#+BEGIN_HTML +
    +#+END_HTML + +#+BEGIN_HTML +
    +#+END_HTML + +#+BEGIN_HTML +
    +#+END_HTML + +#+BEGIN_HTML +
    +#+END_HTML + +-------------- + +* Inline Markup + :PROPERTIES: + :CUSTOM_ID: inline-markup + :END: + +This is /emphasized/, and so /is this/. + +This is *strong*, and so *is this*. + +An /[[/url][emphasized link]]/. + +*/This is strong and em./* + +So is */this/* word. + +*/This is strong and em./* + +So is */this/* word. + +This is code: =>=, =$=, =\=, =\$=, ==. + ++This is /strikeout/.+ + +Superscripts: a^{bc}d a^{/hello/} a^{hello there}. + +Subscripts: H_{2}O, H_{23}O, H_{many of them}O. + +These should not be superscripts or subscripts, because of the unescaped +spaces: a\^b c\^d, a~b c~d. + +-------------- + +* Smart quotes, ellipses, dashes + :PROPERTIES: + :CUSTOM_ID: smart-quotes-ellipses-dashes + :END: + +"Hello," said the spider. "'Shelob' is my name." + +'A', 'B', and 'C' are letters. + +'Oak,' 'elm,' and 'beech' are names of trees. So is 'pine.' + +'He said, "I want to go."' Were you alive in the 70's? + +Here is some quoted '=code=' and a "[[http://example.com/?foo=1&bar=2][quoted +link]]". + +Some dashes: one---two --- three---four --- five. + +Dashes between numbers: 5--7, 255--66, 1987--1999. + +Ellipses...and...and.... + +-------------- + +* LaTeX + :PROPERTIES: + :CUSTOM_ID: latex + :END: + +- \cite[22-23]{smith.1899} +- $2+2=4$ +- $x \in y$ +- $\alpha \wedge \omega$ +- $223$ +- $p$-Tree +- Here's some display math: + $$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$$ +- Here's one that has a line break in it: $\alpha + \omega \times x^2$. + +These shouldn't be math: + +- To get the famous equation, write =$e = mc^2$=. +- $22,000 is a /lot/ of money. So is $34,000. (It worked if "lot" is + emphasized.) +- Shoes ($20) and socks ($5). +- Escaped =$=: $73 /this should be emphasized/ 23$. + +Here's a LaTeX table: + +\begin{tabular}{|l|l|}\hline +Animal & Number \\ \hline +Dog & 2 \\ +Cat & 1 \\ \hline +\end{tabular} + +-------------- + +* Special Characters + :PROPERTIES: + :CUSTOM_ID: special-characters + :END: + +Here is some unicode: + +- I hat: Î +- o umlaut: ö +- section: § +- set membership: ∈ +- copyright: © + +AT&T has an ampersand in their name. + +AT&T is another way to write it. + +This & that. + +4 < 5. + +6 > 5. + +Backslash: \ + +Backtick: ` + +Asterisk: * + +Underscore: \_ + +Left brace: { + +Right brace: } + +Left bracket: [ + +Right bracket: ] + +Left paren: ( + +Right paren: ) + +Greater-than: > + +Hash: # + +Period: . + +Bang: ! + +Plus: + + +Minus: - + +-------------- + +* Links + :PROPERTIES: + :CUSTOM_ID: links + :END: + +** Explicit + :PROPERTIES: + :CUSTOM_ID: explicit + :END: + +Just a [[/url/][URL]]. + +[[/url/][URL and title]]. + +[[/url/][URL and title]]. + +[[/url/][URL and title]]. + +[[/url/][URL and title]] + +[[/url/][URL and title]] + +[[/url/with_underscore][with\_underscore]] + +[[mailto:nobody@nowhere.net][Email link]] + +[[][Empty]]. + +** Reference + :PROPERTIES: + :CUSTOM_ID: reference + :END: + +Foo [[/url/][bar]]. + +With [[/url/][embedded [brackets]]]. + +[[/url/][b]] by itself should be a link. + +Indented [[/url][once]]. + +Indented [[/url][twice]]. + +Indented [[/url][thrice]]. + +This should [not][] be a link. + +#+BEGIN_EXAMPLE + [not]: /url +#+END_EXAMPLE + +Foo [[/url/][bar]]. + +Foo [[/url/][biz]]. + +** With ampersands + :PROPERTIES: + :CUSTOM_ID: with-ampersands + :END: + +Here's a [[http://example.com/?foo=1&bar=2][link with an ampersand in the +URL]]. + +Here's a link with an amersand in the link text: [[http://att.com/][AT&T]]. + +Here's an [[/script?foo=1&bar=2][inline link]]. + +Here's an [[/script?foo=1&bar=2][inline link in pointy braces]]. + +** Autolinks + :PROPERTIES: + :CUSTOM_ID: autolinks + :END: + +With an ampersand: [[http://example.com/?foo=1&bar=2]] + +- In a list? +- [[http://example.com/]] +- It should. + +An e-mail address: [[mailto:nobody@nowhere.net][nobody@nowhere.net]] + +#+BEGIN_QUOTE + Blockquoted: [[http://example.com/]] +#+END_QUOTE + +Auto-links should not occur here: == + +#+BEGIN_EXAMPLE + or here: +#+END_EXAMPLE + +-------------- + +* Images + :PROPERTIES: + :CUSTOM_ID: images + :END: + +From "Voyage dans la Lune" by Georges Melies (1902): + +#+CAPTION: lalune +[[file:lalune.jpg]] + +Here is a movie [[file:movie.jpg]] icon. + +-------------- + +* Footnotes + :PROPERTIES: + :CUSTOM_ID: footnotes + :END: + +Here is a footnote reference,[fn:1] and another.[fn:2] This should /not/ be a +footnote reference, because it contains a space.[\^my note] Here is an inline +note.[fn:3] + +#+BEGIN_QUOTE + Notes can go in quotes.[fn:4] +#+END_QUOTE + +1. And in list items.[fn:5] + +This paragraph should not be part of the note, as it is not indented. + +[fn:1] Here is the footnote. It can go anywhere after the footnote reference. + It need not be placed at the end of the document. + +[fn:2] Here's the long note. This one contains multiple blocks. + + Subsequent blocks are indented to show that they belong to the footnote + (as with list items). + + #+BEGIN_EXAMPLE + { } + #+END_EXAMPLE + + If you want, you can indent every line, but you can also be lazy and + just indent the first line of each block. + +[fn:3] This is /easier/ to type. Inline notes may contain + [[http://google.com][links]] and =]= verbatim characters, as well as + [bracketed text]. + +[fn:4] In quote. + +[fn:5] In list. diff --git a/test/writer.plain b/test/writer.plain new file mode 100644 index 0000000..031c4a3 --- /dev/null +++ b/test/writer.plain @@ -0,0 +1,691 @@ +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: + + 1. item one + 2. item two + + Nested block quotes: + + nested + + nested + +This should not be a block quote: 2 > 1. + +And a following paragraph. + +------------------------------------------------------------------------------ + + + +CODE BLOCKS + + +Code: + + ---- (should be four hyphens) + + sub status { + print "working"; + } + + this code block is indented by one tab + +And: + + this code block is indented by two tabs + + These should not be escaped: \$ \\ \> \[ \{ + +------------------------------------------------------------------------------ + + + +LISTS + + +Unordered + +Asterisks tight: + +- asterisk 1 +- asterisk 2 +- asterisk 3 + +Asterisks loose: + +- asterisk 1 + +- asterisk 2 + +- asterisk 3 + +Pluses tight: + +- Plus 1 +- Plus 2 +- Plus 3 + +Pluses loose: + +- Plus 1 + +- Plus 2 + +- Plus 3 + +Minuses tight: + +- Minus 1 +- Minus 2 +- Minus 3 + +Minuses loose: + +- Minus 1 + +- Minus 2 + +- Minus 3 + + +Ordered + +Tight: + +1. First +2. Second +3. Third + +and: + +1. One +2. Two +3. Three + +Loose using tabs: + +1. First + +2. Second + +3. Third + +and using spaces: + +1. One + +2. Two + +3. Three + +Multiple paragraphs: + +1. Item 1, graf one. + + Item 1. graf two. The quick brown fox jumped over the lazy dog’s back. + +2. Item 2. + +3. Item 3. + + +Nested + +- Tab + - Tab + - Tab + +Here’s another: + +1. First +2. Second: + - Fee + - Fie + - Foe +3. Third + +Same thing but with paragraphs: + +1. First + +2. Second: + + - Fee + - Fie + - Foe + +3. Third + + +Tabs and spaces + +- this is a list item indented with tabs + +- this is a list item indented with spaces + + - this is an example list item indented with tabs + + - this is an example list item indented with spaces + + +Fancy list markers + +(2) begins with 2 +(3) and now 3 + + with a continuation + + iv. sublist with roman numerals, starting with 4 + v. more items + (A) a subsublist + (B) a subsublist + +Nesting: + +A. Upper Alpha + I. Upper Roman. + (6) Decimal start with 6 + c) Lower alpha with paren + +Autonumbering: + +1. Autonumber. +2. More. + 1. Nested. + +Should not be a list item: + +M.A. 2007 + +B. Williams + +------------------------------------------------------------------------------ + + + +DEFINITION LISTS + + +Tight using spaces: + +apple + red fruit + +orange + orange fruit + +banana + yellow fruit + +Tight using tabs: + +apple + red fruit + +orange + orange fruit + +banana + yellow fruit + +Loose: + +apple + + red fruit + +orange + + orange fruit + +banana + + yellow fruit + +Multiple blocks with italics: + +_apple_ + + red fruit + + contains seeds, crisp, pleasant to taste + +_orange_ + + orange fruit + + { orange code block } + + orange block quote + +Multiple definitions, tight: + +apple + red fruit + computer + +orange + orange fruit + bank + +Multiple definitions, loose: + +apple + + red fruit + + computer + +orange + + orange fruit + + bank + +Blank line after term, indented marker, alternate markers: + +apple + + red fruit + + computer + +orange + + orange fruit + + 1. sublist + 2. sublist + + + +HTML BLOCKS + + +Simple block on one line: + +foo + +And nested without indentation: + +foo + +bar + +Interpreted markdown in a table: + +This is _emphasized_ +And this is STRONG +Here’s a simple block: + +foo + +This should be a code block, though: + +
    + foo +
    + +As should this: + +
    foo
    + +Now, nested: + +foo + +This should just be an HTML comment: + +Multiline: + +Code block: + + + +Just plain comment, with trailing spaces on the line: + +Code: + +
    + +Hr’s: + +------------------------------------------------------------------------------ + + + +INLINE MARKUP + + +This is _emphasized_, and so _is this_. + +This is STRONG, and so IS THIS. + +An _emphasized link_. + +_THIS IS STRONG AND EM._ + +So is _THIS_ word. + +_THIS IS STRONG AND EM._ + +So is _THIS_ word. + +This is code: >, $, \, \$, . + +~~This is _strikeout_.~~ + +Superscripts: a^(bc)d a^(_hello_) a^(hello there). + +Subscripts: H₂O, H₂₃O, H_(many of them)O. + +These should not be superscripts or subscripts, because of the unescaped +spaces: a^b c^d, a~b c~d. + +------------------------------------------------------------------------------ + + + +SMART QUOTES, ELLIPSES, DASHES + + +“Hello,” said the spider. “‘Shelob’ is my name.” + +‘A’, ‘B’, and ‘C’ are letters. + +‘Oak,’ ‘elm,’ and ‘beech’ are names of trees. So is ‘pine.’ + +‘He said, “I want to go.”’ Were you alive in the 70’s? + +Here is some quoted ‘code’ and a “quoted link”. + +Some dashes: one—two — three—four — five. + +Dashes between numbers: 5–7, 255–66, 1987–1999. + +Ellipses…and…and…. + +------------------------------------------------------------------------------ + + + +LATEX + + +- +- 2 + 2 = 4 +- x ∈ y +- α ∧ ω +- 223 +- p-Tree +- Here’s some display math: + $$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$$ +- Here’s one that has a line break in it: α + ω × x². + +These shouldn’t be math: + +- To get the famous equation, write $e = mc^2$. +- $22,000 is a _lot_ of money. So is $34,000. (It worked if “lot” is + emphasized.) +- Shoes ($20) and socks ($5). +- Escaped $: $73 _this should be emphasized_ 23$. + +Here’s a LaTeX table: + +------------------------------------------------------------------------------ + + + +SPECIAL CHARACTERS + + +Here is some unicode: + +- I hat: Î +- o umlaut: ö +- section: § +- set membership: ∈ +- copyright: © + +AT&T has an ampersand in their name. + +AT&T is another way to write it. + +This & that. + +4 < 5. + +6 > 5. + +Backslash: \ + +Backtick: ` + +Asterisk: * + +Underscore: _ + +Left brace: { + +Right brace: } + +Left bracket: [ + +Right bracket: ] + +Left paren: ( + +Right paren: ) + +Greater-than: > + +Hash: # + +Period: . + +Bang: ! + +Plus: + + +Minus: - + +------------------------------------------------------------------------------ + + + +LINKS + + +Explicit + +Just a URL. + +URL and title. + +URL and title. + +URL and title. + +URL and title + +URL and title + +with_underscore + +Email link + +Empty. + + +Reference + +Foo bar. + +With embedded [brackets]. + +b by itself should be a link. + +Indented once. + +Indented twice. + +Indented thrice. + +This should [not][] be a link. + + [not]: /url + +Foo bar. + +Foo biz. + + +With ampersands + +Here’s a link with an ampersand in the URL. + +Here’s a link with an amersand in the link text: AT&T. + +Here’s an inline link. + +Here’s an inline link in pointy braces. + + +Autolinks + +With an ampersand: http://example.com/?foo=1&bar=2 + +- In a list? +- http://example.com/ +- It should. + +An e-mail address: nobody@nowhere.net + + Blockquoted: http://example.com/ + +Auto-links should not occur here: + + or here: + +------------------------------------------------------------------------------ + + + +IMAGES + + +From “Voyage dans la Lune” by Georges Melies (1902): + +[lalune] + +Here is a movie [movie] icon. + +------------------------------------------------------------------------------ + + + +FOOTNOTES + + +Here is a footnote reference,[1] and another.[2] This should _not_ be a +footnote reference, because it contains a space.[^my note] Here is an inline +note.[3] + + Notes can go in quotes.[4] + +1. And in list items.[5] + +This paragraph should not be part of the note, as it is not indented. + +[1] Here is the footnote. It can go anywhere after the footnote reference. It +need not be placed at the end of the document. + +[2] Here’s the long note. This one contains multiple blocks. + +Subsequent blocks are indented to show that they belong to the footnote (as +with list items). + + { } + +If you want, you can indent every line, but you can also be lazy and just +indent the first line of each block. + +[3] This is _easier_ to type. Inline notes may contain links and ] verbatim +characters, as well as [bracketed text]. + +[4] In quote. + +[5] In list. diff --git a/test/writer.rst b/test/writer.rst new file mode 100644 index 0000000..def149f --- /dev/null +++ b/test/writer.rst @@ -0,0 +1,894 @@ +================= +Pandoc Test Suite +================= + +:Author: John MacFarlane +:Author: Anonymous +:Date: July 17, 2006 + +.. role:: math(raw) + :format: html latex +.. + +.. role:: raw-latex(raw) + :format: latex +.. + +This is a set of tests for pandoc. Most of them are adapted from John Gruber’s +markdown test suite. + +-------------- + +Headers +======= + +Level 2 with an `embedded link `__ +---------------------------------------- + +Level 3 with *emphasis* +~~~~~~~~~~~~~~~~~~~~~~~ + +Level 4 +^^^^^^^ + +Level 5 +''''''' + +Level 1 +======= + +Level 2 with *emphasis* +----------------------- + +Level 3 +~~~~~~~ + +with no blank line + +Level 2 +------- + +with no blank line + +-------------- + +Paragraphs +========== + +Here’s a regular paragraph. + +In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item. +Because a hard-wrapped line in the middle of a paragraph looked like a list +item. + +Here’s one with a bullet. \* criminey. + +| There should be a hard line break +| here. + +-------------- + +Block Quotes +============ + +E-mail style: + + This is a block quote. It is pretty short. + +.. + + Code in a block quote: + + :: + + sub status { + print "working"; + } + + A list: + + 1. item one + 2. item two + + Nested block quotes: + + nested + + .. + + nested + +This should not be a block quote: 2 > 1. + +And a following paragraph. + +-------------- + +Code Blocks +=========== + +Code: + +:: + + ---- (should be four hyphens) + + sub status { + print "working"; + } + + this code block is indented by one tab + +And: + +:: + + this code block is indented by two tabs + + These should not be escaped: \$ \\ \> \[ \{ + +-------------- + +Lists +===== + +Unordered +--------- + +Asterisks tight: + +- asterisk 1 +- asterisk 2 +- asterisk 3 + +Asterisks loose: + +- asterisk 1 + +- asterisk 2 + +- asterisk 3 + +Pluses tight: + +- Plus 1 +- Plus 2 +- Plus 3 + +Pluses loose: + +- Plus 1 + +- Plus 2 + +- Plus 3 + +Minuses tight: + +- Minus 1 +- Minus 2 +- Minus 3 + +Minuses loose: + +- Minus 1 + +- Minus 2 + +- Minus 3 + +Ordered +------- + +Tight: + +1. First +2. Second +3. Third + +and: + +1. One +2. Two +3. Three + +Loose using tabs: + +1. First + +2. Second + +3. Third + +and using spaces: + +1. One + +2. Two + +3. Three + +Multiple paragraphs: + +1. Item 1, graf one. + + Item 1. graf two. The quick brown fox jumped over the lazy dog’s back. + +2. Item 2. + +3. Item 3. + +Nested +------ + +- Tab + + - Tab + + - Tab + +Here’s another: + +1. First +2. Second: + + - Fee + - Fie + - Foe + +3. Third + +Same thing but with paragraphs: + +1. First + +2. Second: + + - Fee + - Fie + - Foe + +3. Third + +Tabs and spaces +--------------- + +- this is a list item indented with tabs + +- this is a list item indented with spaces + + - this is an example list item indented with tabs + + - this is an example list item indented with spaces + +Fancy list markers +------------------ + +(2) begins with 2 +(3) and now 3 + + with a continuation + + iv. sublist with roman numerals, starting with 4 + v. more items + + (A) a subsublist + (B) a subsublist + +Nesting: + +A. Upper Alpha + + I. Upper Roman. + + (6) Decimal start with 6 + + c) Lower alpha with paren + +Autonumbering: + +#. Autonumber. +#. More. + + #. Nested. + +Should not be a list item: + +M.A. 2007 + +B. Williams + +-------------- + +Definition Lists +================ + +Tight using spaces: + +apple + red fruit +orange + orange fruit +banana + yellow fruit + +Tight using tabs: + +apple + red fruit +orange + orange fruit +banana + yellow fruit + +Loose: + +apple + red fruit + +orange + orange fruit + +banana + yellow fruit + +Multiple blocks with italics: + +*apple* + red fruit + + contains seeds, crisp, pleasant to taste + +*orange* + orange fruit + + :: + + { orange code block } + + .. + + orange block quote + +Multiple definitions, tight: + +apple + red fruit + computer +orange + orange fruit + bank + +Multiple definitions, loose: + +apple + red fruit + + computer + +orange + orange fruit + + bank + +Blank line after term, indented marker, alternate markers: + +apple + red fruit + + computer + +orange + orange fruit + + 1. sublist + 2. sublist + +HTML Blocks +=========== + +Simple block on one line: + +.. raw:: html + +
    + +foo + +.. raw:: html + +
    + +And nested without indentation: + +.. raw:: html + +
    + +.. raw:: html + +
    + +.. raw:: html + +
    + +foo + +.. raw:: html + +
    + +.. raw:: html + +
    + +.. raw:: html + +
    + +bar + +.. raw:: html + +
    + +.. raw:: html + +
    + +Interpreted markdown in a table: + +.. raw:: html + + + +.. raw:: html + + + +.. raw:: html + + + +.. raw:: html + + + +.. raw:: html + + + +.. raw:: html + +
    + +This is *emphasized* + +.. raw:: html + + + +And this is **strong** + +.. raw:: html + +
    + +.. raw:: html + + + +Here’s a simple block: + +.. raw:: html + +
    + +foo + +.. raw:: html + +
    + +This should be a code block, though: + +:: + +
    + foo +
    + +As should this: + +:: + +
    foo
    + +Now, nested: + +.. raw:: html + +
    + +.. raw:: html + +
    + +.. raw:: html + +
    + +foo + +.. raw:: html + +
    + +.. raw:: html + +
    + +.. raw:: html + +
    + +This should just be an HTML comment: + +.. raw:: html + + + +Multiline: + +.. raw:: html + + + +.. raw:: html + + + +Code block: + +:: + + + +Just plain comment, with trailing spaces on the line: + +.. raw:: html + + + +Code: + +:: + +
    + +Hr’s: + +.. raw:: html + +
    + +.. raw:: html + +
    + +.. raw:: html + +
    + +.. raw:: html + +
    + +.. raw:: html + +
    + +.. raw:: html + +
    + +.. raw:: html + +
    + +.. raw:: html + +
    + +.. raw:: html + +
    + +-------------- + +Inline Markup +============= + +This is *emphasized*, and so *is this*. + +This is **strong**, and so **is this**. + +An *`emphasized link `__*. + +***This is strong and em.*** + +So is ***this*** word. + +***This is strong and em.*** + +So is ***this*** word. + +This is code: ``>``, ``$``, ``\``, ``\$``, ````. + +[STRIKEOUT:This is *strikeout*.] + +Superscripts: a\ :sup:`bc`\ d a\ :sup:`*hello*` a\ :sup:`hello there`. + +Subscripts: H\ :sub:`2`\ O, H\ :sub:`23`\ O, H\ :sub:`many of them`\ O. + +These should not be superscripts or subscripts, because of the unescaped +spaces: a^b c^d, a~b c~d. + +-------------- + +Smart quotes, ellipses, dashes +============================== + +“Hello,” said the spider. “‘Shelob’ is my name.” + +‘A’, ‘B’, and ‘C’ are letters. + +‘Oak,’ ‘elm,’ and ‘beech’ are names of trees. So is ‘pine.’ + +‘He said, “I want to go.”’ Were you alive in the 70’s? + +Here is some quoted ‘``code``’ and a “`quoted +link `__”. + +Some dashes: one—two — three—four — five. + +Dashes between numbers: 5–7, 255–66, 1987–1999. + +Ellipses…and…and…. + +-------------- + +LaTeX +===== + +- :raw-latex:`\cite[22-23]{smith.1899}` +- :math:`2+2=4` +- :math:`x \in y` +- :math:`\alpha \wedge \omega` +- :math:`223` +- :math:`p`-Tree +- Here’s some display math: + + .. math:: \frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h} + +- Here’s one that has a line break in it: :math:`\alpha + \omega \times x^2`. + +These shouldn’t be math: + +- To get the famous equation, write ``$e = mc^2$``. +- $22,000 is a *lot* of money. So is $34,000. (It worked if “lot” is + emphasized.) +- Shoes ($20) and socks ($5). +- Escaped ``$``: $73 *this should be emphasized* 23$. + +Here’s a LaTeX table: + +.. raw:: latex + + \begin{tabular}{|l|l|}\hline + Animal & Number \\ \hline + Dog & 2 \\ + Cat & 1 \\ \hline + \end{tabular} + +-------------- + +Special Characters +================== + +Here is some unicode: + +- I hat: Î +- o umlaut: ö +- section: § +- set membership: ∈ +- copyright: © + +AT&T has an ampersand in their name. + +AT&T is another way to write it. + +This & that. + +4 < 5. + +6 > 5. + +Backslash: \\ + +Backtick: \` + +Asterisk: \* + +Underscore: \_ + +Left brace: { + +Right brace: } + +Left bracket: [ + +Right bracket: ] + +Left paren: ( + +Right paren: ) + +Greater-than: > + +Hash: # + +Period: . + +Bang: ! + +Plus: + + +Minus: - + +-------------- + +Links +===== + +Explicit +-------- + +Just a `URL `__. + +`URL and title `__. + +`URL and title `__. + +`URL and title `__. + +`URL and title `__ + +`URL and title `__ + +`with_underscore `__ + +`Email link `__ + +`Empty <>`__. + +Reference +--------- + +Foo `bar `__. + +With `embedded [brackets] `__. + +`b `__ by itself should be a link. + +Indented `once `__. + +Indented `twice `__. + +Indented `thrice `__. + +This should [not][] be a link. + +:: + + [not]: /url + +Foo `bar `__. + +Foo `biz `__. + +With ampersands +--------------- + +Here’s a `link with an ampersand in the +URL `__. + +Here’s a link with an amersand in the link text: `AT&T `__. + +Here’s an `inline link `__. + +Here’s an `inline link in pointy braces `__. + +Autolinks +--------- + +With an ampersand: http://example.com/?foo=1&bar=2 + +- In a list? +- http://example.com/ +- It should. + +An e-mail address: nobody@nowhere.net + + Blockquoted: http://example.com/ + +Auto-links should not occur here: ```` + +:: + + or here: + +-------------- + +Images +====== + +From “Voyage dans la Lune” by Georges Melies (1902): + +.. figure:: lalune.jpg + :alt: Voyage dans la Lune + + lalune + +Here is a movie |movie| icon. + +-------------- + +Footnotes +========= + +Here is a footnote reference, [1]_ and another. [2]_ This should *not* be a +footnote reference, because it contains a space.[^my note] Here is an inline +note. [3]_ + + Notes can go in quotes. [4]_ + +1. And in list items. [5]_ + +This paragraph should not be part of the note, as it is not indented. + +.. [1] + Here is the footnote. It can go anywhere after the footnote reference. It + need not be placed at the end of the document. + +.. [2] + Here’s the long note. This one contains multiple blocks. + + Subsequent blocks are indented to show that they belong to the footnote (as + with list items). + + :: + + { } + + If you want, you can indent every line, but you can also be lazy and just + indent the first line of each block. + +.. [3] + This is *easier* to type. Inline notes may contain + `links `__ and ``]`` verbatim characters, as well as + [bracketed text]. + +.. [4] + In quote. + +.. [5] + In list. + +.. |movie| image:: movie.jpg diff --git a/test/writer.rtf b/test/writer.rtf new file mode 100644 index 0000000..c67c67a --- /dev/null +++ b/test/writer.rtf @@ -0,0 +1,443 @@ +{\rtf1\ansi\deff0{\fonttbl{\f0 \fswiss Helvetica;}{\f1 Courier;}} +{\colortbl;\red255\green0\blue0;\red0\green0\blue255;} +\widowctrl\hyphauto + +{\pard \qc \f0 \sa180 \li0 \fi0 \b \fs36 Pandoc Test Suite\par} +{\pard \qc \f0 \sa180 \li0 \fi0 John MacFarlane\par} +{\pard \qc \f0 \sa180 \li0 \fi0 Anonymous\par} +{\pard \qc \f0 \sa180 \li0 \fi0 July 17, 2006\par} +{\pard \ql \f0 \sa180 \li0 \fi0 \par} +{\pard \ql \f0 \sa180 \li0 \fi0 This is a set of tests for pandoc. Most of them are adapted from John Gruber\u8217's markdown test suite.\par} +{\pard \qc \f0 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par} +{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs36 Headers\par} +{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs32 Level 2 with an {\field{\*\fldinst{HYPERLINK "/url"}}{\fldrslt{\ul +embedded link +}}} +\par} +{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs28 Level 3 with {\i emphasis}\par} +{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs24 Level 4\par} +{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs20 Level 5\par} +{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs36 Level 1\par} +{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs32 Level 2 with {\i emphasis}\par} +{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs28 Level 3\par} +{\pard \ql \f0 \sa180 \li0 \fi0 with no blank line\par} +{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs32 Level 2\par} +{\pard \ql \f0 \sa180 \li0 \fi0 with no blank line\par} +{\pard \qc \f0 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par} +{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs36 Paragraphs\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Here\u8217's a regular paragraph.\par} +{\pard \ql \f0 \sa180 \li0 \fi0 In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item. Because a hard-wrapped line in the middle of a paragraph looked like a list item.\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Here\u8217's one with a bullet. * criminey.\par} +{\pard \ql \f0 \sa180 \li0 \fi0 There should be a hard line break\line here.\par} +{\pard \qc \f0 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par} +{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs36 Block Quotes\par} +{\pard \ql \f0 \sa180 \li0 \fi0 E-mail style:\par} +{\pard \ql \f0 \sa180 \li720 \fi0 This is a block quote. It is pretty short.\par} +{\pard \ql \f0 \sa180 \li720 \fi0 Code in a block quote:\par} +{\pard \ql \f0 \sa180 \li720 \fi0 \f1 sub status \{\line + print "working";\line +\}\par} +{\pard \ql \f0 \sa180 \li720 \fi0 A list:\par} +{\pard \ql \f0 \sa0 \li1080 \fi-360 1.\tx360\tab item one\par} +{\pard \ql \f0 \sa0 \li1080 \fi-360 2.\tx360\tab item two\sa180\par} +{\pard \ql \f0 \sa180 \li720 \fi0 Nested block quotes:\par} +{\pard \ql \f0 \sa180 \li1440 \fi0 nested\par} +{\pard \ql \f0 \sa180 \li1440 \fi0 nested\par} +{\pard \ql \f0 \sa180 \li0 \fi0 This should not be a block quote: 2 > 1.\par} +{\pard \ql \f0 \sa180 \li0 \fi0 And a following paragraph.\par} +{\pard \qc \f0 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par} +{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs36 Code Blocks\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Code:\par} +{\pard \ql \f0 \sa180 \li0 \fi0 \f1 ---- (should be four hyphens)\line +\line +sub status \{\line + print "working";\line +\}\line +\line +this code block is indented by one tab\par} +{\pard \ql \f0 \sa180 \li0 \fi0 And:\par} +{\pard \ql \f0 \sa180 \li0 \fi0 \f1 this code block is indented by two tabs\line +\line +These should not be escaped: \\$ \\\\ \\> \\[ \\\{\par} +{\pard \qc \f0 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par} +{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs36 Lists\par} +{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs32 Unordered\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Asterisks tight:\par} +{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab asterisk 1\par} +{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab asterisk 2\par} +{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab asterisk 3\sa180\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Asterisks loose:\par} +{\pard \ql \f0 \sa180 \li360 \fi-360 \bullet \tx360\tab asterisk 1\par} +{\pard \ql \f0 \sa180 \li360 \fi-360 \bullet \tx360\tab asterisk 2\par} +{\pard \ql \f0 \sa180 \li360 \fi-360 \bullet \tx360\tab asterisk 3\sa180\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Pluses tight:\par} +{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab Plus 1\par} +{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab Plus 2\par} +{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab Plus 3\sa180\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Pluses loose:\par} +{\pard \ql \f0 \sa180 \li360 \fi-360 \bullet \tx360\tab Plus 1\par} +{\pard \ql \f0 \sa180 \li360 \fi-360 \bullet \tx360\tab Plus 2\par} +{\pard \ql \f0 \sa180 \li360 \fi-360 \bullet \tx360\tab Plus 3\sa180\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Minuses tight:\par} +{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab Minus 1\par} +{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab Minus 2\par} +{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab Minus 3\sa180\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Minuses loose:\par} +{\pard \ql \f0 \sa180 \li360 \fi-360 \bullet \tx360\tab Minus 1\par} +{\pard \ql \f0 \sa180 \li360 \fi-360 \bullet \tx360\tab Minus 2\par} +{\pard \ql \f0 \sa180 \li360 \fi-360 \bullet \tx360\tab Minus 3\sa180\par} +{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs32 Ordered\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Tight:\par} +{\pard \ql \f0 \sa0 \li360 \fi-360 1.\tx360\tab First\par} +{\pard \ql \f0 \sa0 \li360 \fi-360 2.\tx360\tab Second\par} +{\pard \ql \f0 \sa0 \li360 \fi-360 3.\tx360\tab Third\sa180\par} +{\pard \ql \f0 \sa180 \li0 \fi0 and:\par} +{\pard \ql \f0 \sa0 \li360 \fi-360 1.\tx360\tab One\par} +{\pard \ql \f0 \sa0 \li360 \fi-360 2.\tx360\tab Two\par} +{\pard \ql \f0 \sa0 \li360 \fi-360 3.\tx360\tab Three\sa180\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Loose using tabs:\par} +{\pard \ql \f0 \sa180 \li360 \fi-360 1.\tx360\tab First\par} +{\pard \ql \f0 \sa180 \li360 \fi-360 2.\tx360\tab Second\par} +{\pard \ql \f0 \sa180 \li360 \fi-360 3.\tx360\tab Third\sa180\par} +{\pard \ql \f0 \sa180 \li0 \fi0 and using spaces:\par} +{\pard \ql \f0 \sa180 \li360 \fi-360 1.\tx360\tab One\par} +{\pard \ql \f0 \sa180 \li360 \fi-360 2.\tx360\tab Two\par} +{\pard \ql \f0 \sa180 \li360 \fi-360 3.\tx360\tab Three\sa180\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Multiple paragraphs:\par} +{\pard \ql \f0 \sa180 \li360 \fi-360 1.\tx360\tab Item 1, graf one.\par} +{\pard \ql \f0 \sa180 \li360 \fi0 Item 1. graf two. The quick brown fox jumped over the lazy dog\u8217's back.\par} +{\pard \ql \f0 \sa180 \li360 \fi-360 2.\tx360\tab Item 2.\par} +{\pard \ql \f0 \sa180 \li360 \fi-360 3.\tx360\tab Item 3.\sa180\par} +{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs32 Nested\par} +{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab Tab\par} +{\pard \ql \f0 \sa0 \li720 \fi-360 \endash \tx360\tab Tab\par} +{\pard \ql \f0 \sa0 \li1080 \fi-360 \bullet \tx360\tab Tab\sa180\sa180\sa180\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Here\u8217's another:\par} +{\pard \ql \f0 \sa0 \li360 \fi-360 1.\tx360\tab First\par} +{\pard \ql \f0 \sa0 \li360 \fi-360 2.\tx360\tab Second:\par} +{\pard \ql \f0 \sa0 \li720 \fi-360 \endash \tx360\tab Fee\par} +{\pard \ql \f0 \sa0 \li720 \fi-360 \endash \tx360\tab Fie\par} +{\pard \ql \f0 \sa0 \li720 \fi-360 \endash \tx360\tab Foe\sa180\par} +{\pard \ql \f0 \sa0 \li360 \fi-360 3.\tx360\tab Third\sa180\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Same thing but with paragraphs:\par} +{\pard \ql \f0 \sa180 \li360 \fi-360 1.\tx360\tab First\par} +{\pard \ql \f0 \sa180 \li360 \fi-360 2.\tx360\tab Second:\par} +{\pard \ql \f0 \sa0 \li720 \fi-360 \endash \tx360\tab Fee\par} +{\pard \ql \f0 \sa0 \li720 \fi-360 \endash \tx360\tab Fie\par} +{\pard \ql \f0 \sa0 \li720 \fi-360 \endash \tx360\tab Foe\sa180\par} +{\pard \ql \f0 \sa180 \li360 \fi-360 3.\tx360\tab Third\sa180\par} +{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs32 Tabs and spaces\par} +{\pard \ql \f0 \sa180 \li360 \fi-360 \bullet \tx360\tab this is a list item indented with tabs\par} +{\pard \ql \f0 \sa180 \li360 \fi-360 \bullet \tx360\tab this is a list item indented with spaces\par} +{\pard \ql \f0 \sa180 \li720 \fi-360 \endash \tx360\tab this is an example list item indented with tabs\par} +{\pard \ql \f0 \sa180 \li720 \fi-360 \endash \tx360\tab this is an example list item indented with spaces\sa180\sa180\par} +{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs32 Fancy list markers\par} +{\pard \ql \f0 \sa0 \li360 \fi-360 (2)\tx360\tab begins with 2\par} +{\pard \ql \f0 \sa180 \li360 \fi-360 (3)\tx360\tab and now 3\par} +{\pard \ql \f0 \sa180 \li360 \fi0 with a continuation\par} +{\pard \ql \f0 \sa0 \li720 \fi-360 iv.\tx360\tab sublist with roman numerals, starting with 4\par} +{\pard \ql \f0 \sa0 \li720 \fi-360 v.\tx360\tab more items\par} +{\pard \ql \f0 \sa0 \li1080 \fi-360 (A)\tx360\tab a subsublist\par} +{\pard \ql \f0 \sa0 \li1080 \fi-360 (B)\tx360\tab a subsublist\sa180\sa180\sa180\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Nesting:\par} +{\pard \ql \f0 \sa0 \li360 \fi-360 A.\tx360\tab Upper Alpha\par} +{\pard \ql \f0 \sa0 \li720 \fi-360 I.\tx360\tab Upper Roman.\par} +{\pard \ql \f0 \sa0 \li1080 \fi-360 (6)\tx360\tab Decimal start with 6\par} +{\pard \ql \f0 \sa0 \li1440 \fi-360 c)\tx360\tab Lower alpha with paren\sa180\sa180\sa180\sa180\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Autonumbering:\par} +{\pard \ql \f0 \sa0 \li360 \fi-360 1.\tx360\tab Autonumber.\par} +{\pard \ql \f0 \sa0 \li360 \fi-360 2.\tx360\tab More.\par} +{\pard \ql \f0 \sa0 \li720 \fi-360 a.\tx360\tab Nested.\sa180\sa180\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Should not be a list item:\par} +{\pard \ql \f0 \sa180 \li0 \fi0 M.A.\u160?2007\par} +{\pard \ql \f0 \sa180 \li0 \fi0 B. Williams\par} +{\pard \qc \f0 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par} +{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs36 Definition Lists\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Tight using spaces:\par} +{\pard \ql \f0 \sa0 \li0 \fi0 apple\par} +{\pard \ql \f0 \sa0 \li360 \fi0 red fruit\par} +{\pard \ql \f0 \sa0 \li0 \fi0 orange\par} +{\pard \ql \f0 \sa0 \li360 \fi0 orange fruit\par} +{\pard \ql \f0 \sa0 \li0 \fi0 banana\par} +{\pard \ql \f0 \sa0 \li360 \fi0 yellow fruit\sa180\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Tight using tabs:\par} +{\pard \ql \f0 \sa0 \li0 \fi0 apple\par} +{\pard \ql \f0 \sa0 \li360 \fi0 red fruit\par} +{\pard \ql \f0 \sa0 \li0 \fi0 orange\par} +{\pard \ql \f0 \sa0 \li360 \fi0 orange fruit\par} +{\pard \ql \f0 \sa0 \li0 \fi0 banana\par} +{\pard \ql \f0 \sa0 \li360 \fi0 yellow fruit\sa180\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Loose:\par} +{\pard \ql \f0 \sa0 \li0 \fi0 apple\par} +{\pard \ql \f0 \sa180 \li360 \fi0 red fruit\par} +{\pard \ql \f0 \sa0 \li0 \fi0 orange\par} +{\pard \ql \f0 \sa180 \li360 \fi0 orange fruit\par} +{\pard \ql \f0 \sa0 \li0 \fi0 banana\par} +{\pard \ql \f0 \sa180 \li360 \fi0 yellow fruit\sa180\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Multiple blocks with italics:\par} +{\pard \ql \f0 \sa0 \li0 \fi0 {\i apple}\par} +{\pard \ql \f0 \sa180 \li360 \fi0 red fruit\par} +{\pard \ql \f0 \sa180 \li360 \fi0 contains seeds, crisp, pleasant to taste\par} +{\pard \ql \f0 \sa0 \li0 \fi0 {\i orange}\par} +{\pard \ql \f0 \sa180 \li360 \fi0 orange fruit\par} +{\pard \ql \f0 \sa180 \li360 \fi0 \f1 \{ orange code block \}\par} +{\pard \ql \f0 \sa180 \li1080 \fi0 orange block quote\sa180\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Multiple definitions, tight:\par} +{\pard \ql \f0 \sa0 \li0 \fi0 apple\par} +{\pard \ql \f0 \sa0 \li360 \fi0 red fruit\par} +{\pard \ql \f0 \sa0 \li360 \fi0 computer\par} +{\pard \ql \f0 \sa0 \li0 \fi0 orange\par} +{\pard \ql \f0 \sa0 \li360 \fi0 orange fruit\par} +{\pard \ql \f0 \sa0 \li360 \fi0 bank\sa180\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Multiple definitions, loose:\par} +{\pard \ql \f0 \sa0 \li0 \fi0 apple\par} +{\pard \ql \f0 \sa180 \li360 \fi0 red fruit\par} +{\pard \ql \f0 \sa180 \li360 \fi0 computer\par} +{\pard \ql \f0 \sa0 \li0 \fi0 orange\par} +{\pard \ql \f0 \sa180 \li360 \fi0 orange fruit\par} +{\pard \ql \f0 \sa180 \li360 \fi0 bank\sa180\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Blank line after term, indented marker, alternate markers:\par} +{\pard \ql \f0 \sa0 \li0 \fi0 apple\par} +{\pard \ql \f0 \sa180 \li360 \fi0 red fruit\par} +{\pard \ql \f0 \sa180 \li360 \fi0 computer\par} +{\pard \ql \f0 \sa0 \li0 \fi0 orange\par} +{\pard \ql \f0 \sa180 \li360 \fi0 orange fruit\par} +{\pard \ql \f0 \sa0 \li720 \fi-360 1.\tx360\tab sublist\par} +{\pard \ql \f0 \sa0 \li720 \fi-360 2.\tx360\tab sublist\sa180\sa180\par} +{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs36 HTML Blocks\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Simple block on one line:\par} +{\pard \ql \f0 \sa0 \li0 \fi0 foo\par} +{\pard \ql \f0 \sa180 \li0 \fi0 And nested without indentation:\par} +{\pard \ql \f0 \sa180 \li0 \fi0 foo\par} +{\pard \ql \f0 \sa0 \li0 \fi0 bar\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Interpreted markdown in a table:\par} +{\pard \ql \f0 \sa0 \li0 \fi0 This is {\i emphasized}\par} +{\pard \ql \f0 \sa0 \li0 \fi0 And this is {\b strong}\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Here\u8217's a simple block:\par} +{\pard \ql \f0 \sa180 \li0 \fi0 foo\par} +{\pard \ql \f0 \sa180 \li0 \fi0 This should be a code block, though:\par} +{\pard \ql \f0 \sa180 \li0 \fi0 \f1
    \line + foo\line +
    \par} +{\pard \ql \f0 \sa180 \li0 \fi0 As should this:\par} +{\pard \ql \f0 \sa180 \li0 \fi0 \f1
    foo
    \par} +{\pard \ql \f0 \sa180 \li0 \fi0 Now, nested:\par} +{\pard \ql \f0 \sa0 \li0 \fi0 foo\par} +{\pard \ql \f0 \sa180 \li0 \fi0 This should just be an HTML comment:\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Multiline:\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Code block:\par} +{\pard \ql \f0 \sa180 \li0 \fi0 \f1 \par} +{\pard \ql \f0 \sa180 \li0 \fi0 Just plain comment, with trailing spaces on the line:\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Code:\par} +{\pard \ql \f0 \sa180 \li0 \fi0 \f1
    \par} +{\pard \ql \f0 \sa180 \li0 \fi0 Hr\u8217's:\par} +{\pard \qc \f0 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par} +{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs36 Inline Markup\par} +{\pard \ql \f0 \sa180 \li0 \fi0 This is {\i emphasized}, and so {\i is this}.\par} +{\pard \ql \f0 \sa180 \li0 \fi0 This is {\b strong}, and so {\b is this}.\par} +{\pard \ql \f0 \sa180 \li0 \fi0 An {\i {\field{\*\fldinst{HYPERLINK "/url"}}{\fldrslt{\ul +emphasized link +}}} +}.\par} +{\pard \ql \f0 \sa180 \li0 \fi0 {\b {\i This is strong and em.}}\par} +{\pard \ql \f0 \sa180 \li0 \fi0 So is {\b {\i this}} word.\par} +{\pard \ql \f0 \sa180 \li0 \fi0 {\b {\i This is strong and em.}}\par} +{\pard \ql \f0 \sa180 \li0 \fi0 So is {\b {\i this}} word.\par} +{\pard \ql \f0 \sa180 \li0 \fi0 This is code: {\f1 >}, {\f1 $}, {\f1 \\}, {\f1 \\$}, {\f1 }.\par} +{\pard \ql \f0 \sa180 \li0 \fi0 {\strike This is {\i strikeout}.}\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Superscripts: a{\super bc}d a{\super {\i hello}} a{\super hello\u160?there}.\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Subscripts: H{\sub 2}O, H{\sub 23}O, H{\sub many\u160?of\u160?them}O.\par} +{\pard \ql \f0 \sa180 \li0 \fi0 These should not be superscripts or subscripts, because of the unescaped spaces: a^b c^d, a~b c~d.\par} +{\pard \qc \f0 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par} +{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs36 Smart quotes, ellipses, dashes\par} +{\pard \ql \f0 \sa180 \li0 \fi0 \u8220"Hello,\u8221" said the spider. \u8220"\u8216'Shelob\u8217' is my name.\u8221"\par} +{\pard \ql \f0 \sa180 \li0 \fi0 \u8216'A\u8217', \u8216'B\u8217', and \u8216'C\u8217' are letters.\par} +{\pard \ql \f0 \sa180 \li0 \fi0 \u8216'Oak,\u8217' \u8216'elm,\u8217' and \u8216'beech\u8217' are names of trees. So is \u8216'pine.\u8217'\par} +{\pard \ql \f0 \sa180 \li0 \fi0 \u8216'He said, \u8220"I want to go.\u8221"\u8217' Were you alive in the 70\u8217's?\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Here is some quoted \u8216'{\f1 code}\u8217' and a \u8220"{\field{\*\fldinst{HYPERLINK "http://example.com/?foo=1&bar=2"}}{\fldrslt{\ul +quoted link +}}} +\u8221".\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Some dashes: one\u8212-two \u8212- three\u8212-four \u8212- five.\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Dashes between numbers: 5\u8211-7, 255\u8211-66, 1987\u8211-1999.\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Ellipses\u8230?and\u8230?and\u8230?.\par} +{\pard \qc \f0 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par} +{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs36 LaTeX\par} +{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab \par} +{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab 2\u8197?+\u8197?2\u8196?=\u8196?4\par} +{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab {\i x}\u8196?\u8712?\u8196?{\i y}\par} +{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab {\i \u945?}\u8197?\u8743?\u8197?{\i \u969?}\par} +{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab 223\par} +{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab {\i p}-Tree\par} +{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab Here\u8217's some display math: $$\\frac\{d\}\{dx\}f(x)=\\lim_\{h\\to 0\}\\frac\{f(x+h)-f(x)\}\{h\}$$\par} +{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab Here\u8217's one that has a line break in it: {\i \u945?}\u8197?+\u8197?{\i \u969?}\u8197?\u215?\u8197?{\i x}{\super 2}.\sa180\par} +{\pard \ql \f0 \sa180 \li0 \fi0 These shouldn\u8217't be math:\par} +{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab To get the famous equation, write {\f1 $e = mc^2$}.\par} +{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab $22,000 is a {\i lot} of money. So is $34,000. (It worked if \u8220"lot\u8221" is emphasized.)\par} +{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab Shoes ($20) and socks ($5).\par} +{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab Escaped {\f1 $}: $73 {\i this should be emphasized} 23$.\sa180\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Here\u8217's a LaTeX table:\par} +{\pard \qc \f0 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par} +{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs36 Special Characters\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Here is some unicode:\par} +{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab I hat: \u206?\par} +{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab o umlaut: \u246?\par} +{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab section: \u167?\par} +{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab set membership: \u8712?\par} +{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab copyright: \u169?\sa180\par} +{\pard \ql \f0 \sa180 \li0 \fi0 AT&T has an ampersand in their name.\par} +{\pard \ql \f0 \sa180 \li0 \fi0 AT&T is another way to write it.\par} +{\pard \ql \f0 \sa180 \li0 \fi0 This & that.\par} +{\pard \ql \f0 \sa180 \li0 \fi0 4 < 5.\par} +{\pard \ql \f0 \sa180 \li0 \fi0 6 > 5.\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Backslash: \\\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Backtick: `\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Asterisk: *\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Underscore: _\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Left brace: \{\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Right brace: \}\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Left bracket: [\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Right bracket: ]\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Left paren: (\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Right paren: )\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Greater-than: >\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Hash: #\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Period: .\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Bang: !\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Plus: +\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Minus: -\par} +{\pard \qc \f0 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par} +{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs36 Links\par} +{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs32 Explicit\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Just a {\field{\*\fldinst{HYPERLINK "/url/"}}{\fldrslt{\ul +URL +}}} +.\par} +{\pard \ql \f0 \sa180 \li0 \fi0 {\field{\*\fldinst{HYPERLINK "/url/"}}{\fldrslt{\ul +URL and title +}}} +.\par} +{\pard \ql \f0 \sa180 \li0 \fi0 {\field{\*\fldinst{HYPERLINK "/url/"}}{\fldrslt{\ul +URL and title +}}} +.\par} +{\pard \ql \f0 \sa180 \li0 \fi0 {\field{\*\fldinst{HYPERLINK "/url/"}}{\fldrslt{\ul +URL and title +}}} +.\par} +{\pard \ql \f0 \sa180 \li0 \fi0 {\field{\*\fldinst{HYPERLINK "/url/"}}{\fldrslt{\ul +URL and title +}}} +\par} +{\pard \ql \f0 \sa180 \li0 \fi0 {\field{\*\fldinst{HYPERLINK "/url/"}}{\fldrslt{\ul +URL and title +}}} +\par} +{\pard \ql \f0 \sa180 \li0 \fi0 {\field{\*\fldinst{HYPERLINK "/url/with_underscore"}}{\fldrslt{\ul +with_underscore +}}} +\par} +{\pard \ql \f0 \sa180 \li0 \fi0 {\field{\*\fldinst{HYPERLINK "mailto:nobody@nowhere.net"}}{\fldrslt{\ul +Email link +}}} +\par} +{\pard \ql \f0 \sa180 \li0 \fi0 {\field{\*\fldinst{HYPERLINK ""}}{\fldrslt{\ul +Empty +}}} +.\par} +{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs32 Reference\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Foo {\field{\*\fldinst{HYPERLINK "/url/"}}{\fldrslt{\ul +bar +}}} +.\par} +{\pard \ql \f0 \sa180 \li0 \fi0 With {\field{\*\fldinst{HYPERLINK "/url/"}}{\fldrslt{\ul +embedded [brackets] +}}} +.\par} +{\pard \ql \f0 \sa180 \li0 \fi0 {\field{\*\fldinst{HYPERLINK "/url/"}}{\fldrslt{\ul +b +}}} + by itself should be a link.\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Indented {\field{\*\fldinst{HYPERLINK "/url"}}{\fldrslt{\ul +once +}}} +.\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Indented {\field{\*\fldinst{HYPERLINK "/url"}}{\fldrslt{\ul +twice +}}} +.\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Indented {\field{\*\fldinst{HYPERLINK "/url"}}{\fldrslt{\ul +thrice +}}} +.\par} +{\pard \ql \f0 \sa180 \li0 \fi0 This should [not][] be a link.\par} +{\pard \ql \f0 \sa180 \li0 \fi0 \f1 [not]: /url\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Foo {\field{\*\fldinst{HYPERLINK "/url/"}}{\fldrslt{\ul +bar +}}} +.\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Foo {\field{\*\fldinst{HYPERLINK "/url/"}}{\fldrslt{\ul +biz +}}} +.\par} +{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs32 With ampersands\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Here\u8217's a {\field{\*\fldinst{HYPERLINK "http://example.com/?foo=1&bar=2"}}{\fldrslt{\ul +link with an ampersand in the URL +}}} +.\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Here\u8217's a link with an amersand in the link text: {\field{\*\fldinst{HYPERLINK "http://att.com/"}}{\fldrslt{\ul +AT&T +}}} +.\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Here\u8217's an {\field{\*\fldinst{HYPERLINK "/script?foo=1&bar=2"}}{\fldrslt{\ul +inline link +}}} +.\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Here\u8217's an {\field{\*\fldinst{HYPERLINK "/script?foo=1&bar=2"}}{\fldrslt{\ul +inline link in pointy braces +}}} +.\par} +{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs32 Autolinks\par} +{\pard \ql \f0 \sa180 \li0 \fi0 With an ampersand: {\field{\*\fldinst{HYPERLINK "http://example.com/?foo=1&bar=2"}}{\fldrslt{\ul +http://example.com/?foo=1&bar=2 +}}} +\par} +{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab In a list?\par} +{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab {\field{\*\fldinst{HYPERLINK "http://example.com/"}}{\fldrslt{\ul +http://example.com/ +}}} +\par} +{\pard \ql \f0 \sa0 \li360 \fi-360 \bullet \tx360\tab It should.\sa180\par} +{\pard \ql \f0 \sa180 \li0 \fi0 An e-mail address: {\field{\*\fldinst{HYPERLINK "mailto:nobody@nowhere.net"}}{\fldrslt{\ul +nobody@nowhere.net +}}} +\par} +{\pard \ql \f0 \sa180 \li720 \fi0 Blockquoted: {\field{\*\fldinst{HYPERLINK "http://example.com/"}}{\fldrslt{\ul +http://example.com/ +}}} +\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Auto-links should not occur here: {\f1 }\par} +{\pard \ql \f0 \sa180 \li0 \fi0 \f1 or here: \par} +{\pard \qc \f0 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par} +{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs36 Images\par} +{\pard \ql \f0 \sa180 \li0 \fi0 From \u8220"Voyage dans la Lune\u8221" by Georges Melies (1902):\par} +{\pard \ql \f0 \sa180 \li0 \fi0 {\pict\jpegblip\picw250\pich250\picwgoal3000\pichgoal3000\bin ffd8ffe000104a46494600010101007800780000ffdb00430006040506050406060506070706080a100a0a09090a140e0f0c1017141818171416161a1d251f1a1b231c1616202c20232627292a29191f2d302d283025282928ffdb0043010707070a080a130a0a13281a161a2828282828282828282828282828282828282828282828282828282828282828282828282828282828282828282828282828ffc000110800fa00fa03011100021101031101ffc4001c0000000701010000000000000000000000010203040506070008ffc4003e100002010303020404040502050500030001020300041105122106311322415107617181143291a1234252b1c115f016336272d1082443e1f1265382ffc40017010101010100000000000000000000000000010204ffc4001b11010101010003010000000000000000000001110212213141ffda000c03010002110311003f00dadd18a10a704f6a95ccc57e37750782b0d8d9ea0cd32e7c5446e07e9f4ad723119a7b89e61e348f260719278aad613cbb640002938c76a182b264fc87bd13009c0c019c76e3d68a072e1cf6f4cd502d330c28269a61bb39c923923d4fad44c08dccb95cfd28b8280769ee08a263891e1808739e4f1d8d149392172cc714050dbb9fde8960ed8c60b79b1ed44103b05c331dbdb1dc5026ac1946d20ff8140aa631c773ec738a0346a003bf93e9cf02801895e7b9a01886796c923bd0090a06393c76a0142003ce3d86680d8dd9392303f5341ccc1b3cf7a2c812c37e4923d381429757013209fa511c18146c9247a0f6a007900c0c671c6280854e086c673eb45c27c038fd68aedff2fda836ef881f136f25d5e6b7d1262964aa02b03f98fbf153131935edcc97576f35c33349212cc4f39f7ab26186dfce5b200f73451f7600dcb8cf27e7400c0b291914046c9e0718fde81371b8e7273f4ef4007691919240e714097f31f376e7b5008caee27807b0f5a02c8e1b3c6d27d33cd0201d839523144d1a149ae084b78da47638211771fd050d582c3a0faab5119b6d12f8ab1c06788a0fd4e2ac356fd1fe08754ddccaba849696309e598c9e2103fed1dcfdeadc44fea5ff00a7f956366d375e492403ca935bedcf1eea4ff6ac68a55efc1beb3b552574f8e7009ff933a927ec715bc82b3a8f4d6bba5ca1352d22fe061cf9a0383f71dea5119cc6c0baed3eaac0f1fad40897dcc3d81f7a052366c1007df3400f21edefc5008c28f30c9c5170ee4fc37830086395250a7c66770c18e78da31c0c63de8609b41f7c515c5172a30c3b76344a3e377cb2339cf7a242aea89808cce368272b8c1a2e107c672a49f5c1a181c9c7ae7da8a2119e7b1f5068099ffa68258a132062d8f9e0f34059502b61bf2824e681bb297ced2a71efda80f19c47b9c77fdbe74057c13e539cf3c1a0eeeb9c73f33405ddb4f18249c1e28062b79ae242902024465b9214614649e7bd0362a7249eddc513456e5720f38f5a1a98e96e95d6baa6ebc2d1ad1e65521649bb469f563534d6d7d31f04347d2a2fc5f535db6a0e83718906c887cbbe5a9a8bef44dce9f731ca9a2e89169d6d6f2184b1455dc07b11dcfeb4d16f119c649a681285b03d3e5500f87820ff006a0e098191de80ac9b8904647b55d11da9681a56a31f87a869f6970b8ffe4883629a289aefc16e92d441682da5b098f21ed9f033f353914d19b751fc08d66cc16d12fe2bf45ec92ff0df1fdbfb559ec667aff4eeb1a04db359d3ae6d40eccebe53f46ec7f5ab82263da7dcf3eb5174e5181076918c7de869503232491ee4515c1803824f03b51287f30e0e7d803449494832c157278a2e8c71fcb9f9d144639236824d01e142efb1768cfb9c7ef40512a818de78ff00a682518e7cc30ab9e00a02cce9953247bd41e467191ed9a04205ee99da4e4e3d283a524b0427b5026c18a8e082067db8341ce0e39ed409b6502907391edda80f2dfdc496f0c124ac6184b144cf0a4e338fd2894f7a7342d4ba9b568f4fd261f12571966270a8bfd47d8511bae85f02b47b7fc34bac5d5c5dc88a0c90ab6c8d9bedce3ef4d1ad691a6dae976a96d616d15b409f9638d70054a1dbc68ea51d4329f4619a8022b78e04548515117b05000a035c5c4702a995c26e3819f534047bcb68a458cce866719540724d02e41c0f7a012a40f6141cbc8e7bd01719e38e6838af1c0a04ca8206d3cd037bdb082fad9e0bd8a39e0718649141047d0d5d18f759fc0cd3af164b8e9999acae4e4f81236e898f7c0f55fed574615aee83a96817ef67abda3db4ebdb7f66f983d88a061bb8db9e3d45165076db83c1f950a53780d8247c80a2398f182724f1c7ad080c608cfa7a51a0062adc7afbd0130173bb9c5070f071cb37e82826106e8f615e01c9e680d6b35bc534be3c1e3831b2aa962bb188f2b71df1de819ae4b1048c7f57bd01a58268e332642ae0704f7cf6207af6a01b99e17b7b6416e227407c494139909ed9f4c0a04a4e501e0f1eb40d263e53dce7fa682c9d0bd13abf58dd6db18bc2b157c4975270ab8ef8f563f21447a73a03a1f4de8eb031582b497328066b97fcd21ff038edfde88b7e32703bd64188e7e6283864b73400cd804b67ca3268317eacea6d56ff005233592f8b6303f953fa4af7c2fa93417fe98b763e0ea171297bab98558068f695ce0e08fdbd281e5c6a57ba5e9d14d716ef7774f2ec112601da4f27ec2827ada74bab559a20e148fcae36b0f91140283729c77a0e0a7777a01dac68395719e39a029607cb901b19c501480ab9279f4a086ea8d0b48d76c0586b7143224a76c61ce1831fe93e86b43cd1f12fe19ea7d2533dcdbeebcd20b612651e68f9ece3fcf6fa5067cbcf20ff009a051724905411e94032799060723da8406d6c67e7ea68d0e1770fe5cfb5026c37039ef9a02eca098c91e6e01e71c500b1d8a49c12786cf6a06a4e256008e3d050119958007920e2801154e32fb4120927b014017eb1c523ac5209a356215c291b87be28957ef853f0d66eaa99352d515e1d190f947669ce7b0ffa7e74a8f4be996569a5d9c56b6704705b46bb5238d42851f2ac875712bc70b3c30f892019540704d01ad2669a0491936330c95ce7140b2e4939a03638c7e8680ae485e33bbe540d60d3ada162c90a02c7270a39340a4f28b68da4645007a8f6a069a746f73235ddcefc391e12b2e1916824948742c99382473c73404791c617695279dc0640f9502c578c9efeb4095cb4cb0830ba21cf999c6401f4f5a05061d430c8079a02e03b3004311c7d281b5e3cd676c65489ee594e4aafe6c7ae07a9a0a075bbea3a8ea96f047d3935ebc404f04ad29411e08e011d98fed416fd212ee5b05b4d5ad6300c615807f1171eaa49eff5ad418c7c55f8466dd66d57a521f20cbcd66a7247a9283dbe5418a63862479877cf1f6c5008e400bdf1ce684016fe53dfbd1a73794600e08ce3d6800377c8c7d6800a9cf75fd4503d91492460f7ee3d28247a7b459f5fd592d22711c206f9e563858a31f99cfd050583518ba75247b1d134f9aed21396d4669769931dc01c003f7a329c4d17458ac5b55d36c12e040a3f1da75c1cb04ede2447f7f6a94567ad7a66db4fbbb29ba7d65b8b4bd8ccd09c8231eaa07b8ab04a7c2cf87b3f53ea8d77abc72c1a5dabe2452bb5a561fc83e5ee7e541e988218ed2dd22b7855228d76a46a00000ec00a510bd4dd511f4fe84da95cc31f880022da4902b1e7d3e99ac86fd03d631f565b4ee6d4dbbc649009cab2e48c83f514165b8b94b6895c44f279c280839e78ce28178ae6de46748a789e453865570483ec6812d42e85a421fc37918b00a883924d024c6e99b7a2a966c0009e17dc9f9fed40f81c77e28139218e4ff9815b9cf23340a01c907b9140201038ed402fcafd28386464e4fd33c50272bc60032609cf00fbd024f722dc66f24822ddf972f8feff00e280f69b24844919cac9ce7de83a447f30ded823007b50459d6ecacb528349b979127651b1dc795f1f3f7a0990148054823dc5015d491c0a0c3be337c2ff00c489b5ee9c87172016b9b541c49ff5a8f7f71eb560c1fc43e0a47e1aa94277310431f91fa551c1727f29ed409b641c86e31839a3454805739c1f6a026f1fd740f64665fc8c31cfde82db79bb40e9e8f49b62eb7d7e8b717ec832c91ff247fa1dc7df2281bcc9369d671493c422b7911654c1215f92bb8827bf068624ba635392df5eb4b9924558ee5bc19b71cee43c6dc7cf34c657be8db0b0b9d0f51d2afe668934dbf9628ddb8c2b8c0073f3a80da37546a7d25174fd95dc125c69f7313ee5655dfc313bd483cf07b1f6a68d5b48d5ec758b612e9d7293211c8fe653f35ee2a084eb9e8bb1eafb3582fe496278f3e1c919fcb9f97ad03ee8dd017a6741b6d3229dae161057c5750a48249ec3eb4139238568f6a9e7b103b5037934cb3793c610a2cd9277a8da73f5140ee38f6280c4b11c65b934023006d50050030e4647de80c846de3b500fcf9fbd0197273ed4007b91400e580c8e45074a82400e72682b36fd2162b7f25ddc09af2766ceeb872db79cf00f6a0b3229550140e07007a50092db860673de818df473c862686dad6470d9cce3b7b63e740fa1de6252ebb5bd81cd00bee2d800d003a6464004763ce683ce9f1cbe1f1d3a67ea1d1a30b68edffba814708c7f9c63d0fafceaca31e6dc71e1f07daa82608c83819f7a1a11ce149238fd68d0a579ec682cfd27a7c3a86bd10bc38b3b756b8b93c1fe1a8c91f7381f7a034f752ea5aa5c5eb292f732128037619c018f6ec282e5a2cb047abda74d5ce9b6da80f136de4a496219b3e48c92000323ea73467519d3da5bb757dbda410ac90c77c23058f99007ee7ec31416882ee47d23acb5185caf8bab4691b1efe57fff0038a9457ee75a82f6e7429350466b482f2742c0f74241c80c38c64541a9cfa1e89ac0177d33ab3d8de28f2b5bca429f91140e2c7a9b5ae9fb85b6ea9b46b9b3c796fe040768f76ec0fafb1f9505df4ebdb3d4edd6e74db98ee216fe68ce47d280648f75e2485a44da385ddc13f4a025ddbdbea16a633286566ce55f9c8f6c502ad750db2c514f30dec428247e6340bbf04100b73402afb943ed2b9e30683836defe9403bc1e06734020e06280cafe8683a375941d841c77c1a0151b467b50159f00e4127e5402872371040c5046eb5aadbe9b1c02e2f6dad25b89047099c677b7b0140fe3f1010afc803f3018e68160c3041ee2823f5dba92d34db89a1d9e2843b03b6d05bd013560c1748d57aa2797c6b35bab78e6959dc47231580ff336dcfb03c1a58364b5bbb7d7fa7b7427f1f673830c8664285bd1815238fad20f2c7c41e979ba43aa2e2c1cb1b663bede438f3a13c7dc76fb5515e9065b851f7a02950002a09c51a1b83cf14176e90d3645e9ad7752752aac23b3439c066665c827e944d29a6410aea725c4567135bd840d3c88a723728c29c9efe6c50d3ee9545b0bf8ef2e6e3c2fc2c6f72f2920e5f19039ee4938a9a875d03278377acf52ddf867f036ef71923932bfe51fbd3475cdc369df0db4fb389d4ea37970fa9cc0b00511795ce7d4f181eb4cd2451755fc45ac16d637381b14ca36b641dfce723e4053170d6cb52bbb362f6d3cb19241f2b9029862f09f143549ba7e7d2eef6caf2797c66ee17fdfd69862d1a069da7dfdac579d17adcda5ea9e1a992376c4723e39e3b024fd7e94c458ac3e25dee8d31d3bae74e7b79002bf8b8549471db38f5f4ed4c165e943a06a328d4ba605b4b22a1523c420c64fbaf38a82d36f0ce7cf7463790729b53017e940e0b0ceceed8ce0500e1b70daa08f5c9ed41d271cd0132476e7d7ff00aa069797d2411168ed9a41fcc858211f73c5075acb25ca6fb82aa31e58a36c81f561dcd033d42169e158ac64b98151b3981c2966cf639f4a064c7a8ac55e4865b7d493701e1c8e52403ea3cbfda827e390ca3f2c914aa81991bd281cdacc2747215c60e0ee5c67e940cb51b0b2bcbd824bfb08ee1a252d1caea1821cfa67b1fa504982b2283ce08f518a08abb82f6dd0369a5662081e14ce40c7ae1b04fda82275cb0bfd4f4536f7114589a5412461f3e4ce4e0e060f63f6ab2893d3b4b5b5b78e22ed22aae3cc3cc7e64fad3449a22a461500007602a0cd7e3b74c26b5d2ad79147baf34eccca40e4a7f30ff3f6aba3cd0543267eb5427b86f1f4c76ef45d0eca1ad5ef224d13e1cf4fd9b22192fa67bc955f8c8c617fba9fb510d7a6ed3fd43a735e5b54964be658c048fb6cdd9e7eb8a186bac97d174e6d22e23437b7ac26b95e77c68bf950fa7279e2b22dba45b59e97a669fa4ea36aeff89cea9a90451fc355ff0096ad9f4ce3f41570675d4fa8c77da8de5cde5be26bc653171ca47dc1f6c9fed5562b97f70276808da7c24f0c1c63804e33fa8a2928c0e0383c8f7ed41d92a41393f4a2548595c2c37493db4cd04e8a08f139566edfef3445b6e7aeaf65d2df48ea2b11776ae02a93e564c772adef409f4ee8ba9a21d73a36fa579ad9f325afe599171ed9c30a960d5ba0fe2843abb47a6f510fc26a4c36890f9558fcc6783506a1147b510024e30339ce680d2c6ae9861eb9a009178a0205443b989e39cd01d8075e3047ce80563057ca381ed4011c4531e503d85013c91b804a21279c903341131cda8c3abdc8650f6d20c4321232adec3dc504bab2c113c9293bb1963df3408dd4b75e1efb2856463dbc43b4631fad047e9177ad4fe32ea16b1db4b8fe1aa92571f5f5a0916bc8e0895af5c46c17cd8c9ff7da80f6d736f7f6915c59cab35bc837238ed8a072a31c1ef4062870718a06f7702dc5b3c522ee4752ae0fa8230683c75d6ba3b74ef535fe984929149e4278ca9e47edfdab42058003763ed409f88ffd6dfad06b1f12ae612fa0c76e0b471e9916d23f973eb4158d3efeff004a984da5debc1295d8e4018dbf3145d583a2ad96f356bbd7f5d90dc59587f1e79a6392f28fcaa3ee47159444ea3aa5ddfc7acf50dcdc344d7a4dbc317f52641200f6000fdeb41b5ef51d8eab672ffa9e971c97c11638268e431a46000012a3b9a351567db823b11f3ef40948e428048207a8340ab48ae83cb83ee0f3428a982719edf3e68c9cc97d3fe15ad8c9be138f2bf38e7b8f6ef40f7a5f55bdd3f56b46d3649127f1405f08e7249c76f5fa50689d48ba5f545cdcbdb462cba9206411b2b055bb07d4fb1c73528d4fa8f52d62cf47b6b8d2e65fc458c49f8a818795c151939f977a823ba0fe253750eb7fe937b04293f9f6c90be41dbdc7ff006283473c1efc1a06f69776d73bbf0f2aca32572bc80470450284a46dfca19f819f5a04e799614def26c0bdce09cfd85045dc75769d12dc3c3e2491db0dd3c85195235f7c91cfd066ae0cdba9be31f4ec61a386c1ef9d4ee473e45cfb1cf34c101d3ff1ac9d481d46c628ed24751881880833f988e7b0fa5328dfed2f2def2ce2b9b79925b791772ca87208f7a60182ee2b95cc0c48f53823fbd40ac658b30f4f4a086d4ee1d75bb6b78f4e965596366fc5211b23238008fde81f43692da5bc30d97831a0397dc09e3d714087506bf61a2c4cd77324726d2caaec141f9fd2ae0c435bf8c57173ad7876f7a2daca10489121244cdf319ce3dbf5a834fe81f881a6f57bcb6ba7c53c72c11873e28cee1db391dbef4199ff00ea4348116a5a66a8a8a04aad04847a90723f6ad7d18c312ddc02a3815423ba0f63fa541687bd9efe1b533b3c9e0a78473e899e318a09bd0ba6eef543e3b2bd8e9b10064bd9e4da001dc81401aeeb29a984d0ba7d5e1d06d4e6594f06523bc8e7f5c0ac8af752dfc17d7090d9218ec6d9447129ee71fcc4fb9cd6842ab10dc0014f3e5a2c1704b671dfdc734525226dc939e283a362c7f940344a380393df144733e2276e38f5efcd01b4bbbfc3dda4a9298a44395902e4a9c70682660d4265d62de40b1bdc1545054f95c8fe627df141af7c3af8808f3dd68dd5d2a45765884b8908d8c3b6c27b7a77a945d7a5fa474bd2ba8e4d5748b28624955d5d8b13b79ee9e983d8d40a753758c7a46b96f6114725dc92279a2810b3a64f94900763cfafa503fd3b59b79ed84da34713c0cd890f0a158fa1f981de826e1b548959fc4dc5cee24b6467e59ed4101ff19e9f676baa5d6a72c50adb4ad1ac790ccc076200f7ad41e7df881d79a87576a5f87b0f161d381db1c2a36e7e6d8ff3416bf87ff082c6f208ef7a82f22b9761bd6d619785f6dc477fa53705ab57f83bd297ceb1e9caf67708db9c4526723e849e3e94f212dd25d117fd29a8c09a76b534fa39cf8b6b71ced38e36fb73417f52e64548e34007e673e9f21ef590a1c918c90718dc281a69b68f67118d9da5058b798f6fa7fe280daadd1b2d36eae70710c4d263df0a4d583cc7a668fd4bf11b5837d7c93dcd9a3146959822a0e781f4cfa55161e9dd7fa67a4f55b9e9aea3e9f81fc09ca0ba118998fcdb2338c7b528d39f4cd2ba76e2d357d292df4eb391809963420ce1b1b576fa1e7359119f1eb4e17dd033ca172d6b2a4df303383fdeb5c8f2eef3bce4e0e335684cb0c9f354160d36f64b0baf16072b91b5f03391f43c51aab23a5debe91c4fad4d73689e6fc3a290573ff4f03e59f4a3280d67581ce916567f84b58ce0a1fccec3d58fa9a084de08c90464e4d1a8e419059b201f4a05630a176918efc50176293872c17bf14042aa0125b03db14046c60b60123fde6827fa0c68edd5365ff11346ba6292ee64194240c807e59a32b7fc51bfe8bd5ed5db424860beb62b89218422ce09c11c01dbbd0660ae110bf1bf2154838dbebfefeb41a8f4cdac7f117458f4d9ecd2df53b4cf81a822808c47255c0f7c8e7fb54a2ec2cfabba3b4b4b8d3af12eedad40926b0f070a13f9b633649f7a82eba6ea4357d321d4ecad512daf20df26e016507fa4fbfaf3e98f9d067dd2bd2faac9aa4d72d72d1e9510ca46a7631c7a320e18f1dfd7bd059afb7da816d23de4ba5de211346a1e4785f190548e4648c63b64e6b43ce9d5baafe3b539c5b452dbda46c638a167cb281c73ee4ff9340e3a3fa5f5aea4ba58f4bb57dbfcf2b02a8bf7f7a0de3a5fa0b50d2a2d92eb3e048c0a97c867dbedcf6a944e5cf4f6b76d1b3d8ea42795066266c87c81c65b9cfaf15048e83af3cd64abac08edaf01546c38dae4e0657ee6826e5b892de3702292e2545ddb55700fd0fbfca81c4b3bc718716eef9eeaa402280d14ab3c0b2c65c06fe571823ed40df56b217fa6dd5ab9216689a33f2c8c558307e83b8d77a37aaa7d22f2512c28768800c9954671b3d33ebef568d0ef7a7749eb0b5bbbb162d657b32b46d2e1564c8ed9c5644d1b0b9bbd261d2a440af6cb0e2e5b1e7dbc1238e0f7a0375b696daa7496a3a4dac8a92cf078685b271db04d391e40d5ec4586a1716de2a49e0c8c85d3b120f715ba1899173ff305413070abd89cfe9f5a2d3ee9c8639fa874eb6b804c52dc46b20c9f302c3bd11e84d47e1af4d5dc6521d3e3b662c19a58721ff5a9a321f89bd27a374b456d158dccd34d333332c9b4b2afbe47a7cb1f7aa33d2bc0d8c0f1c8f6a2c14b6d501b39cf63450897380c319e3de8065031c038f7ed40d8faf1ce41e4d004876a8dc3cc7e743025c956c818028c904579e7f0e15695c9c0541924f6c00283d0bf07f42d6b48820b8d62d20b2b58d656404959e52f83c8ff00fcfafbd4a35bb06f12391a48dd55cee2b2f3818ed8f6a8158a159890f02242079147623e631c502b0db436d1ecb7458d4738038fb0a087d6eeb508f48bb7d32d95750752b6c26c905b3ddb6f61eb574794f5cb6b9d0fa9678b512b25d24bbe52b8c1638278fbd582c57ff12afaed45b5bc0d0d8a8c08a2731ee3eec5793f40450466a1d59af446293c186cd53ca0c36eab93dc649e49fbd048e89f1675ed35e301e293919dcbf9867b37cbe94a35fe94ea4d33aba6824306dc48015750d86c6e247b0cf63591a40b8dc23fc30f14138dcac3000f9d03687547f12e8dd5af816b13148dddbcd29039c0f6f6f7a0eb5d62caf5636825db70c9bc4328f0dc0271c8a090627d3073ce681acf6505ccf14d35bc2f2c2731bb28254fb8a075144a83ca806792400334049ee6281e2496408656d880ff0031f61fa50446bd76058ea1b9e21025a3bb48afe71df9c7b71de9c8f196a0de23ca7b827d4f7add117e0cbfd4b5059392369663ff004e71c51aa97e8f555eadd258f2bf8a889cff00dc28cbd0bf123a926e96d163bdb74490bca2321c678209ff001591e71eafd7a7d7ef45cde2c20aae144638033fb9ad2e1b5e69d058da431ccf21d4a5c3b4631b62523807feaf5c7a50222f2d648c25f5aeec8c2cd19dae3d3e87e944d3eb7e90d425b49ef2292de38224f1505c3f8724a9eeaa7bd0d57a60406059436306868a7803839c7ad1a158039c13f4a33a716767f8cb9b6b55e1ae2458813e9938cd07a9f42d0b4de99b4b7d1f41b58ff19b03c93ba06607fa8b1f5f619a5b8266d74a65d42da6ba90cce996dcdc8c9fff006a5a2c2635083b05ef83eb5028076341db4b1ed9f7a04651fc41db18ed419d75b744dbea335fcb0db0335f2057901c05da73c8f9d5d18a75174a3f4c47335e35da4ce418a489374254f707d463d33565d1529b569a489a17944b06ec8057d71dcd037b4b6b8bfba31584124b27e62a8a4f1ea68357f83da7ea5a76bfe0912453ccabb49194653cb60f6ce3dfda983d196cd108c2401711f9768e306b2297d73fc6d02773a8b591922693c5004bb9d72542fa2f6efde8314ff867aeeec27500b77bb5670e36ca19b1dff2e7f2fd2837ce8bd5dd348b78b552219022870d9c46e792a4f6c608a0b846c8e03232b29ec41cd0199f1410fd4b24b1e8f712c0a5e4452d851e6c639dbf3238a0afa42ba77475e4ba8470896681da45180b18da76af3c9029c8f26dc1df2b9c606e273e86b743331924f27f4a82c12280e59b008e79f6a2d4d74188ff00e30d203a82ad7519c1ff00b860d11ba7c5e86c9fa3afae6f4091e043e021270b21e01c7dcd6479ab4dd3aeb56be4b7b184cf2b301b57d07bfd2b4bad0fe25e9f6960ba7c7a55ac50cd750335ccaade7723b83b8f6e38a2207a5ba4e7ea3d93780cb616ca53781f99fbff009a0b675a5be9765d43a75a6ad3b25adb4185429b831c70303dfdfd2831eb8954ca48f3827819c71ed406b2b1b9bf9a5fc1c4ce2253238047957dc9345d122b792eee522811a495ce1157b93ed444ff0049f476b1aaf51c761345269d25be269259570c833c6077249e062a68f53e8ef0da69509d4ae225b92a04af232ab16f98cf1f4a5a266d4dbca8af13a329ecca723f51502d14f0cb9f05d1c8ee01c91f6a0393b4edfe63c8a031608859b38f97340d84d04e5846eae50f9829ce3eb400fb24466041f5e3d2823f56d22db57b192d6e61468a41c823ff0035651916bbf04ada7badda5cad6d1b72c09dc33f2a6875d25f0865d06fe2bc6d4c4d3282026cca8cfafcfd29a34cd234a10c768f711a78f1bb392a3001208e3ec69a26a58d640c832091c90706a084ea1d3eeafdadf4f86da3166c0b4b397c18f046140f5ce4d04f4702436e91c28a9122e028ed8a0a9f5a5b6a09a1bc5a135bc72cce048b3c5bc15c638f9d59043fc2db997481aa69dae49e1cb6bb643239211939e467818f97bd305965ebce9a10bc8da9dbaa2679dd9ce3d8530572cfac87566ab05ae9f1490692b9696e1f833738555f96793504df5f25945d2576b7ec16dc46792381c7b7ad5e60f234980e42f6c9c56a82ec3eff00bd4124e49700f1c646e3cd169ce9575f83d52cee324347323f6e3861ff008a23d47d4ba6a75074fdcd8ef317e2e2ff0098bdd4706a60c3f4ae8cd5f44eb8fc3e97248a638cbc73bf90483d463b373e9574685abf42a6b5649fea72bbdeac4a8d3b018cfae31f7a6895b6b29b41d30d8e9f6bbed9213e1b7a994e724fcbb5064bd7835a9752d3af75d8116354778f660788cbd9483dbb0a0cd20b2b8d43528ad2088bdcccf854039cff00e2827a0d34e9da1de896f2182492efc0976f998aa827d3d334113a74aa9a9298628e74570478bc0c7cf1da83724bb8246d3e6416b0384da61b5501c9f5c3704f152c037561a95f5fce61d3ad6db4ab950f34b331dd9f4191db8fdcd406d67a675ab4b6d325d1af248272a43430315ddec7038f6ad4b3f448bf47eb71cb69abddebf21d5e26896203846c30c8603b9c6452d9835901405660376319ac84bf13180779d8bb82827d4fb0a06f777367a75acd7170f1430a9f331200cfceae061a0cf6dac692d7365266191db0578f5edf3a6075a6c9278b3433188a467860d96fbd40fe540471409aa0c1140750001ed8ed4058e15133c983960077edf6a06faade5c5b7822d2d926766cb967da2341dd8f0727d85033d27597d62e2ee3163756915bbf8799d71e2f19dcbf2a092b88dd9a311950a0e5b70ce47fe6ac18af53f5b69da9752dd69da9ca906876e24465d9e69881c6ff005c679c0aa2bfd267a347512c93dbb5d42d90d3c800b68c9ce0ec3cfa528db74ad034db5905ee8be1ac728dc153984f3f980f4fb56453be2de8f647a6aff53796596f0aed46798ec033ce149c0fb0ad71479c9bb9dc3bf3c55a0b95f65a825150b481a407b93c0fda8a29c06671dc93803bd131eafd0af6dffe18d2ee25982a4b04603b7a9c631fad03bbe586381bc5945b96385718c827db3eb5288eb8ba934eb15fc3c535f05427796dcccdec7150637d5bd55d5362b7975aa4d0d919018adec8637807bb60723000e4f7cd58203538aefa8aeb478a7b9beba924547b8774cf8608036a80704639cf1f9855d1a7f4c68b67a03de5e5d59dad8d988c62e1c0f107a1e7fdf7a082ea6d07a6e3e99375a7cb6b3db093c727701e2360f7f53dfb50653d4130d42ee18f48b3f0232a15218936963ebf5fbd06dbf0cfa74855b9d46e04b730c6144691e12307d33ea7de8348ba6b5478a279a004f98c479247b81f5a9438805ac0be2e02e73c9ef8fbd40c2346d43578eefc40da7da1dc8b8eefea4fcb9fef419beabf12a4bcebcb2d2fa7ee0dc58492084b30236bb6467dce383f6a0b87556a67a7f4d95a0bbb5468816f0a69c78b2e072572719ce78357079dfab3af2e7a92c963b88d94abbbf91cedc93edf418aa2c5f0dbe2a6a9a0c90d8de34773a6a8da1186d6403fa48fec682d9adeb7a9b4c9d572dacc9a6c9700456e5ca910e000ecbd8e580352fb1ae7476bd6dd49a325e5a9f3025245fe961dea097523cc0919a032af039a006936c81423104649c703ef40dcce64bc3035a87b6f0c378f9fe7cf2b8fdf340a4b6e25962915d94a67807839f7a043586922b5636ec44c061063f31f6ab079d7fe19b7eb2d4efeef55d5d74f992e9a0fc3a441dcb13927b838c9aa2d4bf042c618e178efee6e18104870172318edf5c1e6945bbe1a748ea7d2315edbea3a99bcb190030c401010e4e783ee0fa56455be3d6b90c1a6268d69e17f1486900ee98ec29ccc183119419e7e55ba11f089f523ef5058363a8059fb8e31e9421b491056c01819e28d3d0ff07eea3d53a1e3b6b8db235aca63c139c0eea68ca47a9fa6ef757b83ff00bf68ad428c2f248c7a8f9fcea518df516adac74e7544f63a2ea172f1800291e6cee19ec78cd5826344e85b6bad25ba8fade5b99dae0ee11efc71e858f7e7d054a2d7d39a75ae8f7b6b00b8917f1516624b78429da327cec493db1db1d8540cf4aea28f58d6aeae2f6dd64b498082d880488d149fcea7d4939ab04175e6850a8d32de3b78e380c8de32c4db4e18e430fef543cf86fd0d691b4fabdf6648b3b2db69ce7dd87be68342d2f4fb9b5b891af1a28a2dc05bc5036d001e0eef7352884b961a2ea9aa7555c885e08d45b5bc52b61b686c120fb939fb541276bd4b61d53624d942e2f6200bc32290633e99f4233416dd3ad3f0d611c0c77b632e71dc9ef41156dd27a45addcb3dbd9c513b1dd941821bdc7b558333b9f873757fd69a85e3f813e9c7723b5d93265d872473c11544a68ff08fa75e290b42ec4e4124e70738fa5048e89f0f745d2aeadd2decedda6525c975121183c77f7a945c754d0e0d563682ed43425369403bff00bcd58308ba7d5fe13f5a05889974a9d8b46aede4914f707d88ff001528ddf4fd7edb54d1a1d56c312dab2e64dbc9418e78f5c541296d70b716d1cd6f8789977230ecc280cb7519b816f212b205de4e0843ce300f6cfcb39a0545c42cee88e0b458ddec33ee680eac92266360debc7b5056fad2d354b9b189745744be121daf27e550548ce3d4d58324d07a725e98ea2b7ff5381f5169a7579d021fe13904ee43ddfbe49038ab46e76cf05cc714f6d309232a4a98ce54fd6b2196bb7f2e9b631b2c427b891b6851db3eff002007341e5bf887aa2ea3d4f77378be381e42fdb711ed5a1554395caf1cd07617dcd04fc85402101da791421b49920331381c60d1a69bf02f56f03a925b12c162b98c955f775e47df19a32d99b518268e4491668704a79d4aeec7b7bd4a30feb7e9144d76e265697c3e2693631674273803e556087d76f35fd49859e9925ccf611141106f2e182e3241f727f5a94681a268f79ad1b1b8b9dd66b1c2b1ce9bb06361c1e7bf3fe6a096b0d3ba57488e485b52b40909c386901607d47bf7a0ae758eb69ac4d15be81a748f0a9c35cc90b2eff4c03c1c638a0b77405c5d5d45f87be5fe359a88b81b401dc1c7d38fb50586fed18ea3015790091591e447c1518c8c7a0a0a5754d8c9d49a8d9f4ee9dba0b3b5224b9692327728f627e7c6682f9a7e996b6b3a8b6b748a348820c7720761412c064e3041ce282b5d4bd73d3bd3f33daea97ac2e540dd0a292dc8cd043c1f15ba2a7923b65bb910371b9a12141f9d02edf13ba2ade56857551e5e77244c54fd0e280746ebfe99bbbd655d56dcdc9ce08465565f4ee3bfca82d53eb3a6dac3e25c5f5ba646402e33fa77a0aff5b74ad8757e9ca972844aa37c520fcca7d3f5ab067bd369a8f467544d626c98e9f7118f0200e4465c903049c8c9e6ad1b24334b6fa6249716cab20037c309dd83db03b5640dddac3764a4f02cb1103863919fa7a1a06d6f600c37162911b7b252b87dc773f1927393f4a079f868edae1ae6328a8b1ed38e30050226e85d5dc1f879011b3c47c2f604719f9d01eff4f4b83e3c6b18bb452b1cac9b8a83de80b16e8208a3b7b58e1407cc061427cc0ff1560ce7a8f592d69a97504cad2dac01a2b53900c3e9e51ea58f727d0551e73bfb86b99a49a46dcf21c96340dc13804f20f6f9501c0e3b8a0963316fcc4607007f57bd084d64dec01200ce483468ff0040d525d1755b4d4206ff0095207c11dc67ff0019a18f56584f6daad9dade4211e39104a8ded9152b235cd8c530613229c8c1c8ef50472e81690ee00322b0c100f0debdbb7ca8111ace856371358cba85aa5cc407891ccf83f2ef4048b4ad2e59bf116769672c72f99dd1437239078e2824a4d3e1b94559234110e781839fa0a0561b38ad532a12319c86c6307e740a9732a3a00cac870cd8e0faf0681be8b6db965bb909df3c85806eeabced5a09523647e6e0fef419a6adf116daf7ac34be9dd1da686e7f1ca2e243b76320ce57df9ff1560cc3e3f470ff00c78255b842b35bc6c4af9b6e323d3e95467b6365f8dbcf062beb68c119595d8aaff6e282422e9899b4f6bb5d46cda2562a76316c1078f4a0859e1b9b762c0bf94f0e84feb4125a57505c58ea70dd5d0174a986d92b1c13f6f5a0de7a5be366877260b5d42dee2d2423124a487507ebdf15289dd3fac7a7bab6feded74d61733473acdb5a162142ff00313d81ed505fa58fc6d809380c1b9f5c502e0e05040ea367a85dea454de2ff00a610375b04c16c7a16ef8340b5f6930dce9375636acf6a278f04c5dd4f1dbf4a084e91d06f3a52dee62bbd4a2b882494ced3c8a448063b63b638fde803ab7ae749b2b3096d792c93c8c109b55dcd18ce3710473ffdd043dc758dc5869044565aa5dda4c3c2b7bc78c1f14e3963db03e7c0ab066bf1327d41ba76ca6bc48ecad24c456f6b0c87cf8e4bbfa138c0fa9aa3297c83dd4e28395811cf2680a5b93c7ed413cd1ff0f3c797b8031406645236b0508406f30e68ba49c051b97d0e0e7d28ad57e19f575c5be8f269515dac772877c11bc464dea7ba8c739ce78f9d3193bb8ebfea2bcbd6b5b6b8b58bb7f13c2f0ce31cf0deb4c0f2dbad6d743d2ee99efae752d6c02a86e0054524f6383c7ff94c0b6af274c75149a46a5a82c46f1e1479fc3190bd8156fbe7f4a960bf74e9d253f1167a3ac09e0856610e3041ec7f6c540f67b892cee7f8d18368232ef2af2508c7047cf340ead5bf130accc9b1186541e723d09ffc5033bbb1b82d74d6b37f1244daa1b38073df3f4a08eeb1d3b50d4fa6a5b4d32f12cef1902ee73e523d476fde8306eb0d3fabfa4ba92c278af67bb7281606472f90bdd58558253a6afb40ea1d62283a8b461a66a6f931cf6a7c2466f7cfb939e7b5515fbed3747b5eb8f06eb78d35080a2ec9719c76f98049a0b4ebdd37d1bad869acbf0b03c5c16b29444adf50ded41995f68564a263a66b31cd02be152505493f51c1a088bab69ad1bc179e320f07c37c8a0692b46c4995f0381db39a0b2fc34e971d57d4705bc8db6c50ef9dd97b81fcbf7381528f5ae97a1d8e996d1db69b0c7648855b10a81b80f43c739c54134147b9a036063279fb5046e957726a0f2cfe04915b06db1788305ffeac7a0a00d72f8d9c491c06337533050ac7185cf2df6a06da2da4293488f34973328c34aea428c9ec3eded40ee7d2ad249448f6b133820ee2833df3fde819ea96897461b05b87815f2ee919e5d47704fa039ab079b3e326b70eafd4ef6d6650d8e9ebf868b69c8247723efebf2aa280eb9193ebedc5002a124e015340018fb8fde82cf32b1603d0678cd02406dce3008e47ce81b499c331383c9c9f5a2e9c69377369f7d6f796a4acf148acb83fb511e91b3b3d0bab745b7d45acedd8e3732b71b1fd73f7a5a19eafd09a56a0a96b1c705b49c48510761ce4fcfbd4d0d752826b2b583476fc3daacb295b79d768de8a32b1e71f989e49f6a7d14dd1af5ba275a45b8b093c054492ea769092373765c1da4679fbd306e36ba9595fe9f0dcdbcc92c33e1579cf27d0d409ea178f68521b6b76926ee8a7853f7ff140bc768d78f6f73748d1cd103b543f0091cf6efc502f7319dac194371d8b6326829f0c501d7ae6fa568d5d4942c806d4db81839f53c8cd59456fae6e628749b5bab8b1865b08e4726588ec11e7f2e49071c93da9a31dd4341d675e9a5bad374f9858162d0b4ac70e18f0573df35a0c759f87bd53a404f174f965dfff00f479b1ef570576e34bd4b4cc0bdb3b9b7258a00e846e3f2a94376475cee4914af7ca9150685f09ba61efb52fc7dd69bf8eb7c158d1d0b47bb38f37efde968d6eeb4eb5e91d6ad25b660aee59974db6881690918e31ce39279e062a5a34bb57b88adedd1e379679065d80036679e6a07e8391bce7e940c659ef5afe1286de3b16f2b8903094b7b2fa7ce81eb380c4260ed193f2a0cd6fa5d4a4ea0fc7bdadcce923158a3039db83c038e3ef41a0e96b2ad8a35e009291b8a939d9f227e43bd590436bbd6fa269202c974b7123602c76e779624e00e29833bf897d493e896525dbcb2a6b5a9c3e1456b91b6d60cf989c7f31f7a60c02490961ebcf3eb541308e39e067b507007b96007a67fb50178f97eb4165ce18165c2927b773fad023202d9c8dbb7818ff003408300b87f2f1c107d0d0c15a4f2e339c90467f6a18bdfc2cea8ff4bd561b4b9ba686d6e64552c4f954e7d7e46a60f4688d240af1b2bc6cbf5047ca960617ba658de1b792f2d94a5ab33461b18524633fa1a81b5c8b5168967369d23c0e0a24622dc981d81c76aba29df0bb48d660d52fceb88d069f04aeb69130037127f37b9c0ed9a8350781240bbc06da72323b1f7a0eb8816e633192ebc8c9472a78fa50349b4c83c068e24f0ddbcc1c13b837be4d055b57e98b996d4db5b4a893dc1e6620b6ccf2c467efc504ce97a38d3f4d874bf09af6d46e2f25cb82724e791db15650a43f878b51fc34f3da8f132b6d6a98c80a39ff007e99aba249631b58b9047239ec3e55368aeeb7d2da6f52c0eb7f16e87f2c6e836ba90724ab7a67b55d115ac7c3e8aed2182def4c56a14096368959a423d77e3229a27b41e9d8343b01069c8a8dc9660aa3713df3c64d4a1c695d3d6b67a8cba94b9b8d4e61869e4e4a8c636a7f4afcaa09a485519caae19b966f7a0435196582c656b74df3e308beec7b50629375775b691ac5bdb6b16d6378779f019b00a31cf391c9c2f1daae0b35ef52f5374de88d77aa45a6cd25ddc0108694ee2188c28007603d6a0d16c92430a4b2ed3230dc401855cfa0a0a07c45d7b5db9d462e9ee960b14b2ee134ef8c850012147ec78ab0670b643a2efae753d72686e6e2da211db42176079c8e768f65e39f7aa332d6f58bbd635096f6fe6692695b24f603d801e82823cb900ee00e68006460051dfd680ed9f0c905b713d8d006d5f5419fa505a18f94e40501b1b81a04186d62402c87be3d6810b81290aea8467201231cd1749dbc437f9f1e201db3de8ba07dc0175c027f28a335b17c26f888d6b6d0e8fabf892a29c453b1e547f49f7a946d6424f08236491c833ee0835073294888894120700f0280813c40a6711bc8843e00fca7d3ef40e41dc081f9a811681c6f7565329185623b7e9de812b3bcf11ff0b74563bd50494cf120071b97e5fda80d7577046c9019d5669dbc340324eec67fb734103d5da96bf67a7cf0e916f6e2765f25ddc4c11107ab1c8c647cce2816d3ec7f0f6564cae6e67da375e6d52cc4af2e4fb13ed4145f899d47b3499f4bb6d46cda49b69b92921565c3648e3dd40c81cd5c0ae89f13ec246d3e379ed2d6da180b5d34849da1780b128e49271c9f4a60ba685d5fa36bc42d95c324ec7090cc9b1d87b81ed50588958977cacaaa3b9341c655f12348d1dcb8dc1946540f99a019e2134454eeda7bed3839cd052fe2136b536b5d3563a1ca53c49da4b9507198940ce7e5c9fbe281c6b7a974cf4ee4ea7242d76dc784a3c595b3e9b464e3f6ad0ac745ccbd4fadcbabea42da56959a382ce7460d6b1a93c01f97272093ebf6a82f1ad6af0e9da5cb3cecf6902216919f82aa3818c7a9f4c530649a9f5269ba7429d472239bc991a1b0d3c3152880f0f23039e7bf3de90635ab6a377aa5ebdcdecef2c9239e59f3827e5ed54302195fcc38cd01245395c1f5f4a05b606538e483c501b6939e3b5077860f3914165754c33e549000dbe87de813b820c27fa7baafb8a04a69c98e281e42618c795338033df1f3a06c03e4e029247007ad010093c35674da71f977640340081a190658e41c820f141b0fc33f8926c218b4ed609366a02249bb2d19ce3ea4528dbece68eead926b7916689c643a9e0d643387521fea2f693c2d6efc786ee46d9bfed3eff2a04669edf5295ff057a60bd865309246d3bbbedc1efef41d63a8dec9ab4fa7dd4510fc3c69234ca186e2d9c003b7a67bd034bad0a5bb96e25d575267889cc1b54446d9bd0a37bfbfbd02925945a72cba8dddc48b3f87b1e58f23c623f292bdb7fa7cf38a0a5750f54ebba56a9a67fc516b6d6fd3970ea9234677c8dc7f38f6e4640ce282d1ac4b16bfa72c1d2bad430cd1ba822061865f5007d3daac19cf547c189357d561bbd3eee683c62cd786e9b73337b8c7bd512bd39f06adedec2de0d5ae639da372e6485363107f97767b505cee755d03a5e58ac228659af123184b7b733322e38c91dbf5a943ab3d52e64b49ee755d2e64950e238e35f10c884e17cbe87dc540e6d7509a4f110e9f7566a471712850abf6ce463e6280bacea36fd33a4497f773cf32c698dcc4beee33938edc7ad05534aea683ae61d64c4d2a69b6b88d16d5ca5c303f3e386cf61db140e27b5e99e96b64bdd562b6b30aa36c6c37cac7dc9eec6b42c1a66a962fa70beb6b516d0cbe76322f86c78f6c66831bf8b5d5d2dfa35a5dce60b1933b6ce3c788769f2b331ec1b8fd2831b79649984b239773c1dc68129725c1c640e73400ec781d8fb1a03c4a85d0c8582640257bd01e51fc42236263c9c67be280429c6037eb405dbf5fd682c2a0bb976cf07d3fc5009279ef8ec4e68193a9902b28e7dc71fb501d95b098e0f6dd9e0d0049131019b047b8390281bb292484e47c8500c4f242c3076bf704704739a0be7c3febfbae9a5daf23cd017c7e19fb107bb67d0f6fd6837cd2757d1fab34f4f05e37dde630b1c3a91edf4f7159103d6eb7da65fdbdf59dadb5e2460ac876ed9e1c8c060f9efe9c8a0a75cfc42d5742d2ee5a7e9dbb494b6d6b9bc930cce4f940e3cd81ed4160e98f88315e689fff0022b57664199cc5196f0c7a164ef8f98cd0589baffa68590985eb15c0db1985839f6c2919340b69d03f5285bdd6f4bf021424db4329cb153fccc3d09c76a090d3340d2f479a7bab3b38e2924e5e451cfd280d7dafe936f6c5e4bd89813b02a36589ce318a0358dc35cc4e17f9bf234cdbb78fa0c607a7340e6cec20b1596610c6934b8323226379edda81da8dcb9ec40a042f50b5bb21645473b58b11dbd7bfca8304f8add5d67a9ea8ba5d8ea72c1a4d8a952f10f2c920e368cf71e99fad5833dd0754d6ed66bdb2e9a91a5babb2a310465a57c1ddc1038e7bd5171d3748b8d46ee1ff005298dc6a764c27d4eeaee7fe1c01795881c9e7804fe940dbe287c4b6d75a1b1d1c986d62277c91bf131f4c0f6fad0663737135d3b497124924871f98e7803007d2811dc5b83903dc0a0333f03be7de8122df2c9a05a11e5f51f7a05ce7071804fca8033e5da0734020b0183bb23e5416269577ed0e5323078ceeefdff6a03dbcd62914c2f629a47c622689800879e4fbd046f9d8a2a03e31385c0e73da8b83ca590947dcaead8208e73da8849b3e19ce704f7c5015586d006431f5cf61f3a04ee586ff002481c8fe6191408f0011eb8e30682774dea9bbb5784492ca6385832e1ca95e3d2834be9df8c312e2db5eb4375080337000f1303d18763591a469baef4d755989ec6f6dae5a23e20b599406dd8e080ddbed41272f4dd8caf1c86d163910f9595882a3d718a035edd695d3b6a926b57d0ac65b10b4e06eedd863bf141077fd7af2782bd3fa26a1a8891d57c630948c0279393dcd04cf5875258f4de9f0cb7b7b6d66d2b81ba752d85f5214724fed41036bd79d2fe319d7a8f4b9c81e58de2f04827b9ce09a07a3acecf54b790685ace8697606009e52c377b7f2e682b097d7d36acf0f55df5edbdc0977412468cb6ce3be10af3c63b9c8a0b0751f505be9690dd5d752436f62a3fe4c6448f3b7b0c64e38f615734651f107e3045ac42b67a7693018633b965bc1bc838ee173807bf7cd33065baaeb1a95f2c11dfcd2bc51fe48880aa3e8a062a8b059f595df4ae9a74de9e9ec499d43c97b1427c6e47e525bb63e4282ad3ea3712893c599dbc4259c1627713c927de81043950df97db1406da8411c92063be280230839627078e79a0390a71b5bb5003a8c1232338e4507025573e9fbd02a0e41dc0e680c3691cf714053bb34160895dc16f291d98d02322aa39f3e14707ffaa06f202a5bb0c7201f4a343aca51090497efdfbfce89840c8db8e46573923ff14410b00490d9f5c1a0425dd8ce4673e873cd0265e4dbe7041ed814009b8cbb8e5863bd07163b7716e0607b6698060b96b7b9478dc8643918247ee39a60b7e97f133a8b4e0c63d4ee597380923970a3ef4c0e13e25dfcfab457ba95bdbddb212016501867b9cfbfda982f907c74b282da34874a9048aa479c83838edc62982b7ac7c42d235cd67f15ac5b40c366418a2cb0c1c81e6f5e31db14c160d035de8cd4a3f18ea96562cc37359dfe9cac887fef039fd6b39446f56ea5d13a9dca4579a922496b1975b8d22dfc3566cf9557230703be715ac1431d4d2275325d7fae6b4f6f182a93ef1e32a9f41938f6a60afeb1a95c5fea53dccf772cf2c8c489240031f627e7565c0d67bbf160487c1801073bc0c31f91f953420f2bc8c7c52cc540032738a809905c0f4fa501940208e73df34028e703938a0577ae013f4a001300db4f03b71407461ce0502dca8c9c7dcf6a003fafcbdcd0070bc1e0fd734070db467b8a04cb9c9e68274b93bcb1daa40200ed4099765249ec476cf340849b8b264823bf34689ee009cb671df1409bc8e8b8e770e3ec68984d9c953cf97be2860b248caaebc107dc67f7a184c31232db88fd451031ce50e76039f5c8045026efb8f93279e0fd680b239504f0483d88ef409ee25bb90c79c0e050151c6e21b39ce783eb40adbcc2cefa17bdb61322387781c950e3dbdf9c8a066f28790b22e013db3dbef54726081e63c6460d34191b1bb0720f634060e7600412c781502409c8e3d7b500ed71dbef8ed40243f181c0a02e5d4e0fad006f644e4819e3b501f7e3049e7b501bc43b4e391da80558003392d40a23305e320d02e64cf998e1bf5a032b0c927b8e68049c8c8e71c6280377043118f4e680bbff00de0504ddbb3128371c1c64668024e59f3cd02521254e4fad1a2107e48fe6a6809ddb9e78a029e1463d05027ffc744a6c3857c7b1a205ff00e637fbf4a02b12b1794e39f4a02024e7249ed409924720906800005173fd7404989698ee39e4f7a04cf723d07a501fff0097ed406ffe36a018ff00281e99a037f4d0731f3bfd28007e53400ff99a810248c0cf140bc60123233cff008a0557f9beb4056eff007a07109243e79a03778b27bfbd02b128c27039a054001b818a06609de793da815006070283ffd9}\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Here is a movie {\pict\jpegblip\picw20\pich22\picwgoal400\pichgoal440\bin ffd8ffe000104a46494600010101004800480000fffe0050546869732061727420697320696e20746865207075626c696320646f6d61696e2e204b6576696e204875676865732c206b6576696e68406569742e636f6d2c2053657074656d6265722031393935ffdb00430001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101ffdb00430101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101ffc00011080016001403012200021101031101ffc4001a000100020301000000000000000000000000080905060a07ffc400231000010501000300010500000000000000060304050708020001090a11153976b7ffc400160101010100000000000000000000000000060800ffc400261101000102050109000000000000000000010200030405061121b33134365154717475b4ffda000c03010002110311003f00a90cf388f366a62aa720ed6ae07f96901f3831d973452b8cf36fe3570fc908e46d466433e5dd954f2e96992d9e498c7753faa44916e016ca91cc7d88b38fe60a5b97737defcbcc539c98d336a57f4fc2ca9a486bf07ab575ad9a3af4df221d8215e36df86c4504ff0024574551b3d687ee0575757b3ad64e311ee62bd94158d37e24198c43973099f1fc0c41614d950246513a081abf76cfe7061f6863281e6352fd1670949c148dd6dfb0d25f5b3689b1d5c965b0eacbf4e0932ad28e22ab9ae945633f4744bd3c8cee0a7fdf085b9000f449c5f7afa30b83e0b6fd7b0c8429c9467ff9715347c891e25fa24a205861aa715e6a09bd0488237dc2723414d9891381524e8ca7c0894664f835653631ab55ee7e3de433e4ff001b30949124e4c10c8b6ad0a479b3f9c937b2cf5bc0095ad600a0a41a0e9faee174a1c605e161c6c7a313539650b0113190f1a8368e60d5b24f30ff008ea7f0bf867fa6595feeb6978f1fe0f9c26177f4d63a51a9235184750e7d18811339cd000000c75f000e00380380ae390c350def826ed42ad051fa6f501c50f9b699c3b69cbeb76476d202bf3ac985b6e0e968be66572893e6a744540bd9722e5c87956848629bc2559306bd113e8653d3b6aff651dfad7a3ac8b02958cba02a93ccf525757039bae6cff090e1d90688e8aa233ee86a4c4a3e0586d6b2340522e47dcb7d0046d8a5acb05a123ee25d2b230b2ada6e2e2f9ede3c05202520ec2487b0d56562529d8b3393bca76adca4ec1bca508abb001babc007915d84fe3dd14e207e3c62f8379da2a3b861fb6629d28dba53b6ea388ebfed866bf6dfb553455e91ed547ae92e9445253a4fdf3efb4f8ebdfbe7d3c78f1ee0bb9e13e358e942a4ed49e22cff00eeb35fdd7ebfffd9} icon.\par} +{\pard \qc \f0 \sa180 \li0 \fi0 \emdash\emdash\emdash\emdash\emdash\par} +{\pard \ql \f0 \sa180 \li0 \fi0 \b \fs36 Footnotes\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Here is a footnote reference,{\super\chftn}{\*\footnote\chftn\~\plain\pard {\pard \ql \f0 \sa180 \li0 \fi0 Here is the footnote. It can go anywhere after the footnote reference. It need not be placed at the end of the document.\par} +} and another.{\super\chftn}{\*\footnote\chftn\~\plain\pard {\pard \ql \f0 \sa180 \li0 \fi0 Here\u8217's the long note. This one contains multiple blocks.\par} +{\pard \ql \f0 \sa180 \li0 \fi0 Subsequent blocks are indented to show that they belong to the footnote (as with list items).\par} +{\pard \ql \f0 \sa180 \li0 \fi0 \f1 \{ \}\par} +{\pard \ql \f0 \sa180 \li0 \fi0 If you want, you can indent every line, but you can also be lazy and just indent the first line of each block.\par} +} This should {\i not} be a footnote reference, because it contains a space.[^my note] Here is an inline note.{\super\chftn}{\*\footnote\chftn\~\plain\pard {\pard \ql \f0 \sa180 \li0 \fi0 This is {\i easier} to type. Inline notes may contain {\field{\*\fldinst{HYPERLINK "http://google.com"}}{\fldrslt{\ul +links +}}} + and {\f1 ]} verbatim characters, as well as [bracketed text].\par} +}\par} +{\pard \ql \f0 \sa180 \li720 \fi0 Notes can go in quotes.{\super\chftn}{\*\footnote\chftn\~\plain\pard {\pard \ql \f0 \sa180 \li0 \fi0 In quote.\par} +}\par} +{\pard \ql \f0 \sa0 \li360 \fi-360 1.\tx360\tab And in list items.{\super\chftn}{\*\footnote\chftn\~\plain\pard {\pard \ql \f0 \sa180 \li0 \fi0 In list.\par} +}\sa180\par} +{\pard \ql \f0 \sa180 \li0 \fi0 This paragraph should not be part of the note, as it is not indented.\par} +} diff --git a/test/writer.tei b/test/writer.tei new file mode 100644 index 0000000..ecbe92e --- /dev/null +++ b/test/writer.tei @@ -0,0 +1,859 @@ + + + + + + Pandoc Test Suite + John MacFarlane + Anonymous + + +

    +
    + +

    Produced by pandoc.

    +
    +
    +
    + + +

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

    + +
    + Headers + +
    +
    + Level 1 +
    + Level 2 with emphasis +
    + Level 3 +

    with no blank line

    +
    +
    +
    + Level 2 +

    with no blank line

    + +
    +
    +
    + Paragraphs +

    Here’s a regular paragraph.

    +

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

    +

    Here’s one with a bullet. * criminey.

    +

    There should be a hard line breakhere.

    + +
    +
    + Block Quotes +

    E-mail style:

    + +

    This is a block quote. It is pretty short.

    +
    + +

    Code in a block quote:

    + +sub status { + print "working"; +} + +

    A list:

    + + +

    item one

    +
    + +

    item two

    +
    +
    +

    Nested block quotes:

    + +

    nested

    +
    + +

    nested

    +
    +
    +

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

    +

    And a following paragraph.

    + +
    +
    + Code Blocks +

    Code:

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

    And:

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

    Asterisks tight:

    + + +

    asterisk 1

    +
    + +

    asterisk 2

    +
    + +

    asterisk 3

    +
    +
    +

    Asterisks loose:

    + + +

    asterisk 1

    +
    + +

    asterisk 2

    +
    + +

    asterisk 3

    +
    +
    +

    Pluses tight:

    + + +

    Plus 1

    +
    + +

    Plus 2

    +
    + +

    Plus 3

    +
    +
    +

    Pluses loose:

    + + +

    Plus 1

    +
    + +

    Plus 2

    +
    + +

    Plus 3

    +
    +
    +

    Minuses tight:

    + + +

    Minus 1

    +
    + +

    Minus 2

    +
    + +

    Minus 3

    +
    +
    +

    Minuses loose:

    + + +

    Minus 1

    +
    + +

    Minus 2

    +
    + +

    Minus 3

    +
    +
    +
    +
    + Ordered +

    Tight:

    + + +

    First

    +
    + +

    Second

    +
    + +

    Third

    +
    +
    +

    and:

    + + +

    One

    +
    + +

    Two

    +
    + +

    Three

    +
    +
    +

    Loose using tabs:

    + + +

    First

    +
    + +

    Second

    +
    + +

    Third

    +
    +
    +

    and using spaces:

    + + +

    One

    +
    + +

    Two

    +
    + +

    Three

    +
    +
    +

    Multiple paragraphs:

    + + +

    Item 1, graf one.

    +

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

    +
    + +

    Item 2.

    +
    + +

    Item 3.

    +
    +
    +
    +
    + Nested + + +

    Tab

    + + +

    Tab

    + + +

    Tab

    +
    +
    +
    +
    +
    +
    +

    Here’s another:

    + + +

    First

    +
    + +

    Second:

    + + +

    Fee

    +
    + +

    Fie

    +
    + +

    Foe

    +
    +
    +
    + +

    Third

    +
    +
    +

    Same thing but with paragraphs:

    + + +

    First

    +
    + +

    Second:

    + + +

    Fee

    +
    + +

    Fie

    +
    + +

    Foe

    +
    +
    +
    + +

    Third

    +
    +
    +
    +
    + Tabs and spaces + + +

    this is a list item indented with tabs

    +
    + +

    this is a list item indented with spaces

    + + +

    this is an example list item indented with tabs

    +
    + +

    this is an example list item indented with spaces

    +
    +
    +
    +
    +
    +
    + Fancy list markers + + +

    begins with 2

    +
    + +

    and now 3

    +

    with a continuation

    + + +

    sublist with roman numerals, starting with 4

    +
    + +

    more items

    + + +

    a subsublist

    +
    + +

    a subsublist

    +
    +
    +
    +
    +
    +
    +

    Nesting:

    + + +

    Upper Alpha

    + + +

    Upper Roman.

    + + +

    Decimal start with 6

    + + +

    Lower alpha with paren

    +
    +
    +
    +
    +
    +
    +
    +
    +

    Autonumbering:

    + + +

    Autonumber.

    +
    + +

    More.

    + + +

    Nested.

    +
    +
    +
    +
    +

    Should not be a list item:

    +

    M.A. 2007

    +

    B. Williams

    + +
    +
    +
    + Definition Lists +

    Tight using spaces:

    + + + +

    red fruit

    +
    + + +

    orange fruit

    +
    + + +

    yellow fruit

    +
    +
    +

    Tight using tabs:

    + + + +

    red fruit

    +
    + + +

    orange fruit

    +
    + + +

    yellow fruit

    +
    +
    +

    Loose:

    + + + +

    red fruit

    +
    + + +

    orange fruit

    +
    + + +

    yellow fruit

    +
    +
    +

    Multiple blocks with italics:

    + + + +

    red fruit

    +

    contains seeds, crisp, pleasant to taste

    +
    + + +

    orange fruit

    + +{ orange code block } + + +

    orange block quote

    +
    +
    +
    +

    Multiple definitions, tight:

    + + + +

    red fruit

    +

    computer

    +
    + + +

    orange fruit

    +

    bank

    +
    +
    +

    Multiple definitions, loose:

    + + + +

    red fruit

    +

    computer

    +
    + + +

    orange fruit

    +

    bank

    +
    +
    +

    Blank line after term, indented marker, alternate markers:

    + + + +

    red fruit

    +

    computer

    +
    + + +

    orange fruit

    + + +

    sublist

    +
    + +

    sublist

    +
    +
    +
    +
    +
    +
    + HTML Blocks +

    Simple block on one line:

    +

    foo

    +

    And nested without indentation:

    +

    foo

    +

    bar

    +

    Interpreted markdown in a table:

    +

    This is emphasized

    +

    And this is strong

    +

    Here’s a simple block:

    +

    foo

    +

    This should be a code block, though:

    + +<div> + foo +</div> + +

    As should this:

    + +<div>foo</div> + +

    Now, nested:

    +

    foo

    +

    This should just be an HTML comment:

    +

    Multiline:

    +

    Code block:

    + +<!-- Comment --> + +

    Just plain comment, with trailing spaces on the line:

    +

    Code:

    + +<hr /> + +

    Hr’s:

    + +
    +
    + Inline Markup +

    This is emphasized, and so + is this.

    +

    This is strong, and so + is this.

    +

    An emphasized + link.

    +

    This is strong + and em.

    +

    So is + this + word.

    +

    This is strong + and em.

    +

    So is + this + word.

    +

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

    +

    This is + strikeout.

    +

    Superscripts: abcd + ahello + ahello there.

    +

    Subscripts: H2O, + H23O, + Hmany of themO.

    +

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

    + +
    +
    + Smart quotes, ellipses, dashes +

    Hello, said the spider. Shelob is my + name.

    +

    A, B, and C are letters.

    +

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

    +

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

    +

    Here is some quoted code and a + quoted + link.

    +

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

    +

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

    +

    Ellipses…and…and….

    + +
    +
    + LaTeX + + +

    +
    + +

    2+2=4

    +
    + +

    x \in y

    +
    + +

    \alpha \wedge \omega

    +
    + +

    223

    +
    + +

    p-Tree

    +
    + +

    Here’s some display math:

    + \frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h} +

    +
    + +

    Here’s one that has a line break in it: + \alpha + \omega \times x^2.

    +
    +
    +

    These shouldn’t be math:

    + + +

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

    +
    + +

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

    +
    + +

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

    +
    + +

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

    +
    +
    +

    Here’s a LaTeX table:

    + +
    +
    + Special Characters +

    Here is some unicode:

    + + +

    I hat: Î

    +
    + +

    o umlaut: ö

    +
    + +

    section: §

    +
    + +

    set membership: ∈

    +
    + +

    copyright: ©

    +
    +
    +

    AT&T has an ampersand in their name.

    +

    AT&T is another way to write it.

    +

    This & that.

    +

    4 < 5.

    +

    6 > 5.

    +

    Backslash: \

    +

    Backtick: `

    +

    Asterisk: *

    +

    Underscore: _

    +

    Left brace: {

    +

    Right brace: }

    +

    Left bracket: [

    +

    Right bracket: ]

    +

    Left paren: (

    +

    Right paren: )

    +

    Greater-than: >

    +

    Hash: #

    +

    Period: .

    +

    Bang: !

    +

    Plus: +

    +

    Minus: -

    + +
    + +
    + Images +

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

    +

    + lalune + + fig:Voyage dans la Lune +

    +

    Here is a movie

    + movie + +
    icon.

    + +
    +
    + Footnotes +

    Here is a footnote reference, +

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

    + and another. +

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

    +

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

    + + { <code> } + +

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

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

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

    +

    + +

    Notes can go in quotes. +

    In quote.

    +

    +
    + + +

    And in list items. +

    In list.

    +

    +
    +
    +

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

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

      +

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

    2. +
    3. Item 2.

    4. +
    5. Item 3.

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

      +

      with a continuation

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

    red fruit

    +
    orange
    +

    orange fruit

    +
    banana
    +

    yellow fruit

    +
    + +Multiple blocks with italics: + +
    +
    _apple_
    +

    red fruit

    +

    contains seeds, crisp, pleasant to taste

    +
    _orange_
    +

    orange fruit

    +bc. { orange code block } + + +bq.

    orange block quote

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

    red fruit

    +

    computer

    +
    orange
    +

    orange fruit

    +

    bank

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

    red fruit

    +

    computer

    +
    orange
    +

    orange fruit

    +
      +
    1. sublist
    2. +
    3. sublist
    4. +
    +
    +
    + +h1(#html-blocks). HTML Blocks + +Simple block on one line: + +
    + +foo + +
    + +And nested without indentation: + +
    + +
    + +
    + +foo + + +
    + + +
    + +
    + +bar + +
    + + +
    + +Interpreted markdown in a table: + + + + + + +
    +This is _emphasized_ + +And this is *strong* +
    + +Here's a simple block: + +
    + +foo + + +
    + +This should be a code block, though: + +bc.
    + foo +
    + + +As should this: + +bc.
    foo
    + + +Now, nested: + +
    + +
    + +
    + +foo + +
    + + +
    + + +
    + +This should just be an HTML comment: + + +Multiline: + + + +Code block: + +bc. + + +Just plain comment, with trailing spaces on the line: + + +Code: + +bc.
    + + +Hr's: + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + +h1(#inline-markup). Inline Markup + +This is _emphasized_, and so _is this_. + +This is *strong*, and so *is this*. + +An _"emphasized link":/url_. + +*_This is strong and em._* + +So is *_this_* word. + +*_This is strong and em._* + +So is *_this_* word. + +This is code: @>@, @$@, @\@, @\$@, @@. + +-This is _strikeout_.- + +Superscripts: a[^bc^]d a[^_hello_^] a[^hello there^]. + +Subscripts: H[~2~]O, H[~23~]O, H[~many of them~]O. + +These should not be superscripts or subscripts, because of the unescaped spaces: a^b c^d, a~b c~d. + +
    + +h1(#smart-quotes-ellipses-dashes). Smart quotes, ellipses, dashes + +"Hello," said the spider. "'Shelob' is my name." + +'A', 'B', and 'C' are letters. + +'Oak,' 'elm,' and 'beech' are names of trees. So is 'pine.' + +'He said, "I want to go."' Were you alive in the 70's? + +Here is some quoted '@code@' and a ""quoted link":http://example.com/?foo=1&bar=2". + +Some dashes: one -- two -- three -- four -- five. + +Dashes between numbers: 5 - 7, 255 - 66, 1987 - 1999. + +Ellipses...and...and.... + +
    + +h1(#latex). LaTeX + +* +* 2+2=4 +* x \in y +* \alpha \wedge \omega +* 223 +* p-Tree +* Here's some display math: \frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h} +* Here's one that has a line break in it: \alpha + \omega \times x^2. + +These shouldn't be math: + +* To get the famous equation, write @$e = mc^2$@. +* $22,000 is a _lot_ of money. So is $34,000. (It worked if "lot" is emphasized.) +* Shoes ($20) and socks ($5). +* Escaped @$@: $73 _this should be emphasized_ 23$. + +Here's a LaTeX table: + + +
    + +h1(#special-characters). Special Characters + +Here is some unicode: + +* I hat: Î +* o umlaut: ö +* section: § +* set membership: ∈ +* copyright: © + +AT&T has an ampersand in their name. + +AT&T is another way to write it. + +This & that. + +4 < 5. + +6 > 5. + +Backslash: \ + +Backtick: ` + +Asterisk: * + +Underscore: _ + +Left brace: { + +Right brace: } + +Left bracket: [ + +Right bracket: ] + +Left paren: ( + +Right paren: ) + +Greater-than: > + +Hash: # + +Period: . + +Bang: ! + +Plus: + + +Minus: - + +
    + +h1(#links). Links + +h2(#explicit). Explicit + +Just a "URL":/url/. + +"URL and title":/url/. + +"URL and title":/url/. + +"URL and title":/url/. + +"URL and title":/url/ + +"URL and title":/url/ + +"with_underscore":/url/with_underscore + +"Email link":mailto:nobody@nowhere.net + +"Empty":. + +h2(#reference). Reference + +Foo "bar":/url/. + +With "embedded [brackets]":/url/. + +"b":/url/ by itself should be a link. + +Indented "once":/url. + +Indented "twice":/url. + +Indented "thrice":/url. + +This should [not][] be a link. + +bc. [not]: /url + + +Foo "bar":/url/. + +Foo "biz":/url/. + +h2(#with-ampersands). With ampersands + +Here's a "link with an ampersand in the URL":http://example.com/?foo=1&bar=2. + +Here's a link with an amersand in the link text: "AT&T":http://att.com/. + +Here's an "inline link":/script?foo=1&bar=2. + +Here's an "inline link in pointy braces":/script?foo=1&bar=2. + +h2(#autolinks). Autolinks + +With an ampersand: "$":http://example.com/?foo=1&bar=2 + +* In a list? +* "$":http://example.com/ +* It should. + +An e-mail address: "nobody@nowhere.net":mailto:nobody@nowhere.net + +bq. Blockquoted: "$":http://example.com/ + + + +Auto-links should not occur here: @@ + +bc. or here: + + +
    + +h1(#images). Images + +From "Voyage dans la Lune" by Georges Melies (1902): + +!lalune.jpg(Voyage dans la Lune)! +lalune + +Here is a movie !movie.jpg(movie)! icon. + +
    + +h1(#footnotes). Footnotes + +Here is a footnote reference,[1] and another.[2] This should _not_ be a footnote reference, because it contains a space.[^my note] Here is an inline note.[3] + +bq. Notes can go in quotes.[4] + + + +# And in list items.[5] + +This paragraph should not be part of the note, as it is not indented. + + +fn1. Here is the footnote. It can go anywhere after the footnote reference. It need not be placed at the end of the document. + + +fn2. Here's the long note. This one contains multiple blocks. + +Subsequent blocks are indented to show that they belong to the footnote (as with list items). + +bc. { } + + +If you want, you can indent every line, but you can also be lazy and just indent the first line of each block. + + +fn3. This is _easier_ to type. Inline notes may contain "links":http://google.com and @]@ verbatim characters, as well as [bracketed text]. + + +fn4. In quote. + + +fn5. In list. diff --git a/test/writer.zimwiki b/test/writer.zimwiki new file mode 100644 index 0000000..91f018b --- /dev/null +++ b/test/writer.zimwiki @@ -0,0 +1,619 @@ +Content-Type: text/x-zim-wiki +Wiki-Format: zim 0.4 + +This is a set of tests for pandoc. Most of them are adapted from John Gruber’s markdown test suite. + + +---- + +====== Headers ====== + +===== Level 2 with an embedded link ===== + +==== Level 3 with emphasis ==== + +=== Level 4 === + +== Level 5 == + +====== Level 1 ====== + +===== Level 2 with emphasis ===== + +==== Level 3 ==== + +with no blank line + +===== Level 2 ===== + +with no blank line + + +---- + +====== Paragraphs ====== + +Here’s a regular paragraph. + +In Markdown 1.0.0 and earlier. Version 8. This line turns into a list item. Because a hard-wrapped line in the middle of a paragraph looked like a list item. + +Here’s one with a bullet. * criminey. + +There should be a hard line break +here. + + +---- + +====== Block Quotes ====== + +E-mail style: + +> This is a block quote. It is pretty short. + +> Code in a block quote: +> +> ''' +> sub status { +> print "working"; +> } +> ''' +> +> A list: +> +> 1. item one +> 1. item two +> +> Nested block quotes: +> +> > nested +> +> > nested + +This should not be a block quote: 2 > 1. + +And a following paragraph. + + +---- + +====== Code Blocks ====== + +Code: + +''' +---- (should be four hyphens) + +sub status { + print "working"; +} + +this code block is indented by one tab +''' + +And: + +''' + this code block is indented by two tabs + +These should not be escaped: \$ \\ \> \[ \{ +''' + + +---- + +====== Lists ====== + +===== Unordered ===== + +Asterisks tight: + + * asterisk 1 + * asterisk 2 + * asterisk 3 + +Asterisks loose: + + * asterisk 1 + * asterisk 2 + * asterisk 3 + +Pluses tight: + + * Plus 1 + * Plus 2 + * Plus 3 + +Pluses loose: + + * Plus 1 + * Plus 2 + * Plus 3 + +Minuses tight: + + * Minus 1 + * Minus 2 + * Minus 3 + +Minuses loose: + + * Minus 1 + * Minus 2 + * Minus 3 + +===== Ordered ===== + +Tight: + + 1. First + 1. Second + 1. Third + +and: + + 1. One + 1. Two + 1. Three + +Loose using tabs: + + 1. First + 1. Second + 1. Third + +and using spaces: + + 1. One + 1. Two + 1. Three + +Multiple paragraphs: + + 1. Item 1, graf one. +Item 1. graf two. The quick brown fox jumped over the lazy dog’s back. + 1. Item 2. + 1. Item 3. + +===== Nested ===== + + * Tab + * Tab + * Tab + +Here’s another: + + 1. First + 1. Second: + * Fee + * Fie + * Foe + 1. Third + +Same thing but with paragraphs: + + 1. First + 1. Second: + * Fee + * Fie + * Foe + 1. Third + +===== Tabs and spaces ===== + + * this is a list item indented with tabs + * this is a list item indented with spaces + * this is an example list item indented with tabs + * this is an example list item indented with spaces + +===== Fancy list markers ===== + + 1. begins with 2 + 1. and now 3 +with a continuation + 1. sublist with roman numerals, starting with 4 + 1. more items + 1. a subsublist + 1. a subsublist + +Nesting: + + 1. Upper Alpha + 1. Upper Roman. + 1. Decimal start with 6 + 1. Lower alpha with paren + +Autonumbering: + + 1. Autonumber. + 1. More. + 1. Nested. + +Should not be a list item: + +M.A. 2007 + +B. Williams + + +---- + +====== Definition Lists ====== + +Tight using spaces: + +* **apple** red fruit +* **orange** orange fruit +* **banana** yellow fruit +Tight using tabs: + +* **apple** red fruit +* **orange** orange fruit +* **banana** yellow fruit +Loose: + +* **apple** red fruit + +* **orange** orange fruit + +* **banana** yellow fruit + +Multiple blocks with italics: + +* **//apple//** red fruit + +contains seeds, crisp, pleasant to taste + +* **//orange//** orange fruit + +''' +{ orange code block } +''' + +> orange block quote + +Multiple definitions, tight: + +* **apple** red fruitcomputer +* **orange** orange fruitbank +Multiple definitions, loose: + +* **apple** red fruit +computer + +* **orange** orange fruit +bank + +Blank line after term, indented marker, alternate markers: + +* **apple** red fruit +computer + +* **orange** orange fruit + + 1. sublist + 1. sublist + +====== HTML Blocks ====== + +Simple block on one line: + +foo + +And nested without indentation: + +foo + + + +bar + + +Interpreted markdown in a table: + + + + +This is //emphasized// + + +And this is **strong** + + + + +Here’s a simple block: + +foo + + +This should be a code block, though: + +''' +
    + foo +
    +''' + +As should this: + +''' +
    foo
    +''' + +Now, nested: + +foo + + + +This should just be an HTML comment: + + +Multiline: + + + +Code block: + +''' + +''' + +Just plain comment, with trailing spaces on the line: + + +Code: + +''' +
    +''' + +Hr’s: + + + + + + + + + + + +---- + +====== Inline Markup ====== + +This is //emphasized//, and so //is this//. + +This is **strong**, and so **is this**. + +An //[[url|emphasized link]]//. + +**//This is strong and em.//** + +So is **//this//** word. + +**//This is strong and em.//** + +So is **//this//** word. + +This is code: ''>'', ''$'', ''\'', ''\$'', ''''. + +~~This is //strikeout//.~~ + +Superscripts: a^{bc}d a^{//hello//} a^{hello there}. + +Subscripts: H_{2}O, H_{23}O, H_{many of them}O. + +These should not be superscripts or subscripts, because of the unescaped spaces: a^b c^d, a~b c~d. + + +---- + +====== Smart quotes, ellipses, dashes ====== + +“Hello,” said the spider. “‘Shelob’ is my name.” + +‘A’, ‘B’, and ‘C’ are letters. + +‘Oak,’ ‘elm,’ and ‘beech’ are names of trees. So is ‘pine.’ + +‘He said, “I want to go.”’ Were you alive in the 70’s? + +Here is some quoted ‘''code''’ and a “[[http://example.com/?foo=1&bar=2|quoted link]]”. + +Some dashes: one—two — three—four — five. + +Dashes between numbers: 5–7, 255–66, 1987–1999. + +Ellipses…and…and…. + + +---- + +====== LaTeX ====== + + * + * $2+2=4$ + * $x \in y$ + * $\alpha \wedge \omega$ + * $223$ + * $p$-Tree + * Here’s some display math: $$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$$ + * Here’s one that has a line break in it: $\alpha + \omega \times x^2$. + +These shouldn’t be math: + + * To get the famous equation, write ''$e = mc^2$''. + * $22,000 is a //lot// of money. So is $34,000. (It worked if “lot” is emphasized.) + * Shoes ($20) and socks ($5). + * Escaped ''$'': $73 //this should be emphasized// 23$. + +Here’s a LaTeX table: + + + +---- + +====== Special Characters ====== + +Here is some unicode: + + * I hat: Î + * o umlaut: ö + * section: § + * set membership: ∈ + * copyright: © + +AT&T has an ampersand in their name. + +AT&T is another way to write it. + +This & that. + +4 < 5. + +6 > 5. + +Backslash: \ + +Backtick: ` + +Asterisk: * + +Underscore: _ + +Left brace: { + +Right brace: } + +Left bracket: [ + +Right bracket: ] + +Left paren: ( + +Right paren: ) + +Greater-than: > + +Hash: # + +Period: . + +Bang: ! + +Plus: + + +Minus: - + + +---- + +====== Links ====== + +===== Explicit ===== + +Just a [[url/|URL]]. + +[[url/|URL and title]]. + +[[url/|URL and title]]. + +[[url/|URL and title]]. + +[[url/|URL and title]] + +[[url/|URL and title]] + +[[url/with_underscore|with_underscore]] + +[[mailto:nobody@nowhere.net|Email link]] + +[[|Empty]]. + +===== Reference ===== + +Foo [[url/|bar]]. + +With [[url/|embedded [brackets]]]. + +[[url/|b]] by itself should be a link. + +Indented [[url|once]]. + +Indented [[url|twice]]. + +Indented [[url|thrice]]. + +This should [not][] be a link. + +''' +[not]: /url +''' + +Foo [[url/|bar]]. + +Foo [[url/|biz]]. + +===== With ampersands ===== + +Here’s a [[http://example.com/?foo=1&bar=2|link with an ampersand in the URL]]. + +Here’s a link with an amersand in the link text: [[http://att.com/|AT&T]]. + +Here’s an [[script?foo=1&bar=2|inline link]]. + +Here’s an [[script?foo=1&bar=2|inline link in pointy braces]]. + +===== Autolinks ===== + +With an ampersand: http://example.com/?foo=1&bar=2 + + * In a list? + * http://example.com/ + * It should. + +An e-mail address: + +> Blockquoted: http://example.com/ + +Auto-links should not occur here: '''' + +''' +or here: +''' + + +---- + +====== Images ====== + +From “Voyage dans la Lune” by Georges Melies (1902): + +{{:lalune.jpg|Voyage dans la Lune lalune}} + +Here is a movie {{:movie.jpg|movie}} icon. + + +---- + +====== Footnotes ====== + +Here is a footnote reference, **{Note:** 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. **{Note:** Here’s the long note. This one contains multiple blocks. + +Subsequent blocks are indented to show that they belong to the footnote (as with list items). + +''' + { } +''' + +If you want, you can indent every line, but you can also be lazy and just indent the first line of each block.**}** This should //not// be a footnote reference, because it contains a space.[^my note] Here is an inline note. **{Note:** This is //easier// to type. Inline notes may contain [[http://google.com|links]] and '']'' verbatim characters, as well as [bracketed text].**}** + +> Notes can go in quotes. **{Note:** In quote.**}** + + 1. And in list items. **{Note:** In list.**}** + +This paragraph should not be part of the note, as it is not indented. diff --git a/test/writers-lang-and-dir.context b/test/writers-lang-and-dir.context new file mode 100644 index 0000000..250ee8c --- /dev/null +++ b/test/writers-lang-and-dir.context @@ -0,0 +1,118 @@ +% Enable hyperlinks +\setupinteraction + [state=start, + style=, + color=, + contrastcolor=] + +% make chapter, section bookmarks visible when opening document +\placebookmarks[chapter, section, subsection, subsubsection, subsubsubsection, subsubsubsubsection][chapter, section] +\setupinteractionscreen[option=bookmark] +\setuptagging[state=start] + + +% use microtypography +\definefontfeature[default][default][script=latn, protrusion=quality, expansion=quality, itlc=yes, textitalics=yes, onum=yes, pnum=yes] +\definefontfeature[smallcaps][script=latn, protrusion=quality, expansion=quality, smcp=yes, onum=yes, pnum=yes] +\setupalign[hz,hanging] +\setupitaliccorrection[global, always] + +\setupbodyfontenvironment[default][em=italic] % use italic as em, not slanted + +\definefallbackfamily[mainface][rm][DejaVu Serif][preset=range:greek, force=yes] +\definefontfamily[mainface][rm][Latin Modern Roman] +\definefontfamily[mainface][mm][Latin Modern Math] +\definefontfamily[mainface][ss][Latin Modern Sans] +\definefontfamily[mainface][tt][Latin Modern Typewriter][features=none] +\setupbodyfont[mainface] + +\setupwhitespace[medium] + +\setuphead[chapter] [style=\tfd,header=empty] +\setuphead[section] [style=\tfc] +\setuphead[subsection] [style=\tfb] +\setuphead[subsubsection] [style=\bf] +\setuphead[subsubsubsection] [style=\sc] +\setuphead[subsubsubsubsection][style=\it] + +\setuphead[chapter, section, subsection, subsubsection, subsubsubsection, subsubsubsubsection][number=no] + +\definedescription + [description] + [headstyle=bold, style=normal, location=hanging, width=broad, margin=1cm, alternative=hanging] + +\setupitemize[autointro] % prevent orphan list intro +\setupitemize[indentnext=no] + +\setupfloat[figure][default={here,nonumber}] +\setupfloat[table][default={here,nonumber}] + +\setupthinrules[width=15em] % width of horizontal rules + + +\starttext + +\section[empty-divs-and-spans]{Empty Divs and Spans} + +Some text and + +div contents + +and more text. + +Next paragraph with a span and a word-thatincludesaspanright? + +\section[directionality]{Directionality} + +Some text and + +\startalignment[righttoleft] +rtl div contents + +\stopalignment + +and more text. + +\startalignment[lefttoright] +and a ltr div. with a {\righttoleft rtl span}. + +\stopalignment + +Next paragraph with a {\righttoleft rtl span} and a +word-that-includesa{\lefttoright ltrspan}right? + +\section[languages]{Languages} + +Some text and + +\start\language[de] +German div contents + +\stop + +and more text. + +Next paragraph with a \start\language[en-gb]British span\stop and a +word-that-includesa\start\language[de-ch]Swiss German span\stop right? + +Some \start\language[es]Spanish text\stop . + +\section[combined]{Combined} + +Some text and + +\start\language[fr] +\startalignment[righttoleft] +French rtl div contents + +\stopalignment +\stop + +and more text. + +Next paragraph with a \start\language[en-gb]{\lefttoright British ltr +span}\stop and a +word-that-includesa\start\language[de-ch]{\lefttoright Swiss German ltr +span}\stop right? + +\stoptext diff --git a/test/writers-lang-and-dir.latex b/test/writers-lang-and-dir.latex new file mode 100644 index 0000000..97c3401 --- /dev/null +++ b/test/writers-lang-and-dir.latex @@ -0,0 +1,157 @@ +\PassOptionsToPackage{unicode=true}{hyperref} % options for packages loaded elsewhere +\PassOptionsToPackage{hyphens}{url} +% +\documentclass[english,]{article} +\usepackage{lmodern} +\usepackage{amssymb,amsmath} +\usepackage{ifxetex,ifluatex} +\usepackage{fixltx2e} % provides \textsubscript +\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex + \usepackage[T1]{fontenc} + \usepackage[utf8]{inputenc} + \usepackage{textcomp} % provides euro and other symbols +\else % if luatex or xelatex + \usepackage{unicode-math} + \defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase} +\fi +% use upquote if available, for straight quotes in verbatim environments +\IfFileExists{upquote.sty}{\usepackage{upquote}}{} +% use microtype if available +\IfFileExists{microtype.sty}{% +\usepackage[]{microtype} +\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts +}{} +\IfFileExists{parskip.sty}{% +\usepackage{parskip} +}{% else +\setlength{\parindent}{0pt} +\setlength{\parskip}{6pt plus 2pt minus 1pt} +} +\usepackage{hyperref} +\hypersetup{ + pdfborder={0 0 0}, + breaklinks=true} +\urlstyle{same} % don't use monospace font for urls +\setlength{\emergencystretch}{3em} % prevent overfull lines +\providecommand{\tightlist}{% + \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} +\setcounter{secnumdepth}{0} +% Redefines (sub)paragraphs to behave more like sections +\ifx\paragraph\undefined\else +\let\oldparagraph\paragraph +\renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}} +\fi +\ifx\subparagraph\undefined\else +\let\oldsubparagraph\subparagraph +\renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}} +\fi + +% set default figure placement to htbp +\makeatletter +\def\fps@figure{htbp} +\makeatother + +\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex + \usepackage[shorthands=off,ngerman,british,nswissgerman,spanish,french,main=english]{babel} + \newcommand{\textgerman}[2][]{\foreignlanguage{ngerman}{#2}} + \newenvironment{german}[2][]{\begin{otherlanguage}{ngerman}}{\end{otherlanguage}} + \newcommand{\textenglish}[2][]{\foreignlanguage{british}{#2}} + \newenvironment{english}[2][]{\begin{otherlanguage}{british}}{\end{otherlanguage}} + \let\oritextspanish\textspanish + \AddBabelHook{spanish}{beforeextras}{\renewcommand{\textspanish}{\oritextspanish}} + \AddBabelHook{spanish}{afterextras}{\renewcommand{\textspanish}[2][]{\foreignlanguage{spanish}{##2}}} + \newcommand{\textfrench}[2][]{\foreignlanguage{french}{#2}} + \newenvironment{french}[2][]{\begin{otherlanguage}{french}}{\end{otherlanguage}} +\else + % load polyglossia as late as possible as it *could* call bidi if RTL lang (e.g. Hebrew or Arabic) + \usepackage{polyglossia} + \setmainlanguage[]{english} + \setotherlanguage[]{german} + \setotherlanguage[variant=british]{english} + \setotherlanguage[variant=swiss]{german} + \setotherlanguage[]{spanish} + \setotherlanguage[]{french} +\fi +\ifxetex + % load bidi as late as possible as it modifies e.g. graphicx + \usepackage{bidi} + \fi +\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex + \TeXXeTstate=1 + \newcommand{\RL}[1]{\beginR #1\endR} + \newcommand{\LR}[1]{\beginL #1\endL} + \newenvironment{RTL}{\beginR}{\endR} + \newenvironment{LTR}{\beginL}{\endL} +\fi + +\date{} + +\begin{document} + +\hypertarget{empty-divs-and-spans}{% +\section{Empty Divs and Spans}\label{empty-divs-and-spans}} + +Some text and + +div contents + +and more text. + +Next paragraph with a {span} and a word-thatincludesa{span}right? + +\hypertarget{directionality}{% +\section{Directionality}\label{directionality}} + +Some text and + +\begin{RTL} +rtl div contents +\end{RTL} + +and more text. + +\begin{LTR} +and a ltr div. with a \RL{rtl span}. +\end{LTR} + +Next paragraph with a \RL{rtl span} and a +word-that-includesa\LR{ltrspan}right? + +\hypertarget{languages}{% +\section{Languages}\label{languages}} + +Some text and + +\begin{german} + +German div contents + +\end{german} + +and more text. + +Next paragraph with a \textenglish[variant=british]{British span} and a +word-that-includesa\textgerman[variant=swiss]{Swiss German span}right? + +Some \textspanish{Spanish text}. + +\hypertarget{combined}{% +\section{Combined}\label{combined}} + +Some text and + +\begin{RTL} +\begin{french} + +French rtl div contents + +\end{french} +\end{RTL} + +and more text. + +Next paragraph with a \LR{\textenglish[variant=british]{British ltr +span}} and a word-that-includesa\LR{\textgerman[variant=swiss]{Swiss +German ltr span}}right? + +\end{document} diff --git a/test/writers-lang-and-dir.native b/test/writers-lang-and-dir.native new file mode 100644 index 0000000..504bcf3 --- /dev/null +++ b/test/writers-lang-and-dir.native @@ -0,0 +1,23 @@ +Pandoc (Meta {unMeta = fromList []}) +[Header 1 ("empty-divs-and-spans",[],[]) [Str "Empty",Space,Str "Divs",Space,Str "and",Space,Str "Spans"] +,Plain [Str "Some",Space,Str "text",Space,Str "and"] +,Div ("",[],[]) [Para [Str "div",Space,Str "contents"]] +,Para [Str "and",Space,Str "more",Space,Str "text."] +,Para [Str "Next",Space,Str "paragraph",Space,Str "with",Space,Str "a",Space,Span ("",[],[]) [Str "span"],Space,Str "and",Space,Str "a",Space,Str "word-thatincludesa",Span ("",[],[]) [Str "span"],Str "right?"] +,Header 1 ("directionality",[],[]) [Str "Directionality"] +,Plain [Str "Some",Space,Str "text",Space,Str "and"] +,Div ("",[],[("dir","rtl")]) [Para [Str "rtl",Space,Str "div",Space,Str "contents"]] +,Para [Str "and",Space,Str "more",Space,Str "text."] +,Div ("",[],[("dir","ltr")]) [Para [Str "and",Space,Str "a",Space,Str "ltr",Space,Str "div.",Space,Str "with",Space,Str "a",Space,Span ("",[],[("dir","rtl")]) [Str "rtl",Space,Str "span"],Str "."]] +,Para [Str "Next",Space,Str "paragraph",Space,Str "with",Space,Str "a",Space,Span ("",[],[("dir","rtl")]) [Str "rtl",Space,Str "span"],Space,Str "and",Space,Str "a",Space,Str "word-that-includesa",Span ("",[],[("dir","ltr")]) [Str "ltrspan"],Str "right?"] +,Header 1 ("languages",[],[]) [Str "Languages"] +,Plain [Str "Some",Space,Str "text",Space,Str "and"] +,Div ("",[],[("lang","de")]) [Para [Str "German",Space,Str "div",Space,Str "contents"]] +,Para [Str "and",Space,Str "more",Space,Str "text."] +,Para [Str "Next",Space,Str "paragraph",Space,Str "with",Space,Str "a",Space,Span ("",[],[("lang","en-GB")]) [Str "British",Space,Str "span"],Space,Str "and",Space,Str "a",Space,Str "word-that-includesa",Span ("",[],[("lang","de-CH")]) [Str "Swiss",Space,Str "German",Space,Str "span"],Str "right?"] +,Para [Str "Some",Space,Span ("",[],[("lang","es")]) [Str "Spanish",Space,Str "text"],Str "."] +,Header 1 ("combined",[],[]) [Str "Combined"] +,Plain [Str "Some",Space,Str "text",Space,Str "and"] +,Div ("",[],[("lang","fr"),("dir","rtl")]) [Para [Str "French",Space,Str "rtl",Space,Str "div",Space,Str "contents"]] +,Para [Str "and",Space,Str "more",Space,Str "text."] +,Para [Str "Next",Space,Str "paragraph",Space,Str "with",Space,Str "a",Space,Span ("",[],[("lang","en-GB"),("dir","ltr")]) [Str "British",Space,Str "ltr",Space,Str "span"],Space,Str "and",Space,Str "a",Space,Str "word-that-includesa",Span ("",[],[("lang","de-CH"),("dir","ltr")]) [Str "Swiss",Space,Str "German",Space,Str "ltr",Space,Str "span"],Str "right?"]] diff --git a/trypandoc/Makefile b/trypandoc/Makefile new file mode 100644 index 0000000..f5f6046 --- /dev/null +++ b/trypandoc/Makefile @@ -0,0 +1,14 @@ +CGIBIN=/home/website/cgi-bin +TRYPANDOC=/home/website/pandoc.org/try/ +CGI=${CGIBIN}/trypandoc +BIN=/home/jgm/.local/bin/trypandoc + +install: ${CGI} ${TRYPANDOC}/index.html + +${TRYPANDOC}/%: % + cp $< $@ && chown website:www-data $@ && chmod a+r $@ + +${CGI}: ${BIN} + cp $< $@ && chown website:www-data $@ && chmod a+rx $@ + +.PHONY: install diff --git a/trypandoc/index.html b/trypandoc/index.html new file mode 100644 index 0000000..944683d --- /dev/null +++ b/trypandoc/index.html @@ -0,0 +1,161 @@ + + + + + Try pandoc! + + + + + + + +
    +
    +
    +

    Try pandoc!

    +
    +
    +
    
    +    
    +
    +
    +
    + +   + + +
    + +
    +
    + + +
    +
    
    +    
    +
    +
    + + + diff --git a/trypandoc/trypandoc.hs b/trypandoc/trypandoc.hs new file mode 100644 index 0000000..5a48288 --- /dev/null +++ b/trypandoc/trypandoc.hs @@ -0,0 +1,66 @@ +{-# LANGUAGE OverloadedStrings #-} +module Main where +import Network.Wai.Handler.CGI +import Network.Wai +import Control.Applicative ((<$>)) +import Data.Maybe (fromMaybe) +import Network.HTTP.Types.Status (status200) +import Network.HTTP.Types.Header (hContentType) +import Network.HTTP.Types.URI (queryToQueryText) +import Text.Pandoc +import Text.Pandoc.Writers.Math (defaultMathJaxURL) +import Text.Pandoc.Highlighting (pygments) +import Text.Pandoc.Readers (getReader, Reader(..)) +import Text.Pandoc.Writers (getWriter, Writer(..)) +import Text.Pandoc.Shared (tabFilter) +import Data.Aeson +import qualified Data.Text as T +import Data.Text (Text) + +main :: IO () +main = run app + +app :: Application +app req respond = do + let query = queryToQueryText $ queryString req + let getParam x = maybe (error $ T.unpack x ++ " paramater not set") + return $ lookup x query + text <- getParam "text" >>= checkLength . fromMaybe T.empty + fromFormat <- fromMaybe "" <$> getParam "from" + toFormat <- fromMaybe "" <$> getParam "to" + let reader = case getReader (T.unpack fromFormat) of + Right (TextReader r, es) -> r readerOpts{ + readerExtensions = es } + _ -> error $ "could not find reader for " + ++ T.unpack fromFormat + let writer = case getWriter (T.unpack toFormat) of + Right (TextWriter w, es) -> w writerOpts{ + writerExtensions = es } + _ -> error $ "could not find writer for " ++ + T.unpack toFormat + let result = case runPure $ reader (tabFilter 4 text) >>= writer of + Right s -> s + Left err -> error (show err) + let output = encode $ object [ T.pack "html" .= result + , T.pack "name" .= + if fromFormat == "markdown_strict" + then T.pack "pandoc (strict)" + else T.pack "pandoc" + , T.pack "version" .= pandocVersion] + respond $ responseLBS status200 [(hContentType,"text/json; charset=UTF-8")] output + +checkLength :: Text -> IO Text +checkLength t = + if T.length t > 10000 + then error "exceeds length limit of 10,000 characters" + else return t + +writerOpts :: WriterOptions +writerOpts = def { writerReferenceLinks = True, + writerEmailObfuscation = NoObfuscation, + writerHTMLMathMethod = MathJax (defaultMathJaxURL ++ + "MathJax.js?config=TeX-AMS_CHTML-full"), + writerHighlightStyle = Just pygments } + +readerOpts :: ReaderOptions +readerOpts = def