pandoc (1.7) [new features] * New `textile` reader and writer. Thanks to Paul Rivier for contributing the `textile` reader, an almost complete implementation of the textile syntax used by the ruby [RedCloth library](http://redcloth.org/textile). Resolves Issue #51. * New `org` writer, for Emacs Org-mode, contributed by Puneeth Chaganti. * New `json` reader and writer, for reading and writing a JSON representation of the native Pandoc AST. These are much faster than the `native` reader and writer, and should be used for serializing Pandoc to text. To convert between the JSON representation and native Pandoc, use `encodeJSON` and `decodeJSON` from `Text.JSON.Generic`. * Support for citations using Andrea Rossato's `citeproc-hs` 0.3. You can now write, for example, Water is wet [see @doe99, pp. 33-35; also @smith04, ch. 1]. and, when you process your document using `pandoc`, specifying a citation style using `--csl` and a bibliography using `--bibliography`, the citation will be replaced by an appropriately formatted citation, and a list of works cited will be added to the end of the document. This means that you can switch effortlessly between different citation and bibliography styles, including footnote, numerical, and author-date formats. The bibliography can be in any of the following formats: MODS, BibTeX, BibLaTeX, RIS, EndNote, EndNote XML, ISI, MEDLINE, Copac, or JSON. See the README for further details. Citations are supported in the markdown reader, using a special syntax, and in the LaTeX reader, using natbib or biblatex syntax. (Thanks to Nathan Gass for the natbib and biblatex support.) * A new `--mathjax` option has been added for displaying math in HTML using MathJax. Resolves issue #259. * You can now define LaTeX macros in markdown documents, and pandoc will apply them to TeX math. For example, \newcommand{\plus}[2]{#1 + #2} $\plus{3}{4}$ yields `3+4`. Since the macros are applied in the reader, they will work in every output format, not just LaTeX. * Footnotes are now supported in the RST reader. (Note, however, that pandoc ignores the numeral or symbol used in the note; footnotes are put in an auto-numbered ordered list.) Resolves issue #258. * `markdown2pdf` now supports `--data-dir`. * Improved prettyprinting in most formats. Lines will be wrapped more evenly and duplicate blank lines avoided. * New `--columns` command-line option sets the column width for line wrapping and relative width calculations for tables. * Made `--smart` work in HTML, RST, and Textile readers, as well as markdown. * Added support for listings package in LaTeX reader (Puneeth Chaganti). * Significant performance improvements in many readers and writers. [API and program changes] * Moved `Text.Pandoc.Definition` from the `pandoc` package to a new auxiliary package, `pandoc-types`. This will make it possible for other programs to supply output in Pandoc format, without depending on the whole pandoc package. * Moved generic functions to `Text.Pandoc.Generic`. Deprecated `processWith`, replacing it with two functions, `bottomUp` and `topDown`. Removed previously deprecated functions `processPandoc` and `queryPandoc`. * Added `Text.Pandoc.Builder`, for building `Pandoc` structures. * `Text.Pandoc` now exports association lists `readers` and `writers`. * Removed deprecated `-C/--custom-header` option. Use `--template` instead. * `--biblio-file` has been replaced by `--bibliography`. `--biblio-format` has been removed; pandoc now guesses the format from the file extension (see README). * pandoc will treat an argument as a URI only if it has an `http(s)` scheme. Previously pandoc would treat some Windows pathnames beginning with `C:/` as URIs. * The `--sanitize-html` option and the `stateSanitize` field in `ParserState` have been removed. Sanitization is better done in the resulting HTML using `xss-sanitize`, which is based on pandoc's sanitization, but improved. * Added `Text.Pandoc.Pretty`. This is better suited for pandoc than the `pretty` package. Changed all writers that used `Text.PrettyPrint.HughesPJ` to use `Text.Pandoc.Pretty` instead. * Removed `Text.Pandoc.Blocks`. `Text.Pandoc.Pretty` allows you to define blocks and concatenate them, so a separate module is no longer needed. * `Text.Pandoc.Shared`: + Added `writerColumns` to `WriterOptions`. + Added `normalize`. + Removed unneeded prettyprinting functions: `wrapped`, `wrapIfNeeded`, `wrappedTeX`, `wrapTeXIfNeeded`, `hang'`, `BlockWrapper`, `wrappedBlocksToDoc`. + Made `splitBy` take a test instead of an element. + Added `findDataFile`, refactored `readDataFile`. + Added `stringify`. Rewrote `inlineListToIdentifier` using `stringify`. + Fixed `inlineListToIdentifier` to treat '\160' as ' '. * `Text.Pandoc.Readers.HTML`: + Removed `rawHtmlBlock`, `anyHtmlBlockTag`, `anyHtmlInlineTag`, `anyHtmlTag`, `anyHtmlEndTag`, `htmlEndTag`, `extractTagType`, `htmlBlockElement`, `htmlComment` + Added `htmlTag`, `htmlInBalanced`, `isInlineTag`, `isBlockTag`, `isTextTag` * Moved `smartPunctuation` from `Text.Pandoc.Readers.Markdown` to `Text.Pandoc.Readers.Parsing`, and parameterized it with an inline parser. * Ellipses are no longer allowed to contain spaces. Previously we allowed '. . .', ' . . . ', etc. This caused too many complications, and removed author's flexibility in combining ellipses with spaces and periods. * Allow linebreaks in URLs (treat as spaces). Also, a string of consecutive spaces or tabs is now parsed as a single space. If you have multiple spaces in your URL, use `%20%20`. * `Text.Pandoc.Parsing`: + Removed `refsMatch`. + Hid `Key` constructor. + Removed custom `Ord` and `Eq` instances for `Key`. + Added `toKey` and `fromKey` to convert between `Key` and `[Inline]`. + Generalized type on `readWith`. * Small change in calculation of relative widths of table columns. If the size of the header > the specified column width, use the header size as 100% for purposes of calculating relative widths of columns. * Markdown writer now uses some pandoc-specific features when `--strict` is not specified: \ newline is used for a hard linebreak instead of two spaces then a newline. And delimited code blocks are used when there are attributes. * HTML writer: improved gladTeX output by setting ENV appropriately for display or inline math (Jonathan Daugherty). * LaTeX writer: Use `\paragraph`, `\subparagraph` for level 4,5 headers. * Added `fontsize` variable to default LaTeX template. This makes it easy to set the font size using `markdown2pdf`: `markdown2pdf -V fontsize=12pt input.txt`. * The `COLUMNS` environment variable no longer has any effect. [Under-the-hood improvements] * Completely rewrote HTML reader using tagsoup as a lexer. The new reader is faster and more accurate. * Replaced `escapeStringAsXML` with a faster version. * Remove duplications in documentation by generating the pandoc man page from README, using `MakeManPage.hs`. * Improvements to testing framework: Removed old `tests/RunTests.hs`. `cabal test` now runs `test-pandoc`, which is built from `src/test-pandoc.hs` when the `tests` Cabal flag is set. This allows the testing framework to have its own dependencies. * Added `Interact.hs` to make it easier to use ghci while developing. `Interact.hs` loads `ghci` from the `src` directory, specifying all the options needed to load pandoc modules (including specific package dependencies, which it gets by parsing dist/setup-config). * Added `Benchmark.hs`, testing all readers + writers using criterion. * Added `stats.sh`, to make it easier to collect and archive benchmark and lines-of-code stats. [Bug fixes] * Filenames are encoded as UTF8. Resolves Issue #252. * Handle curly quotes better in `--smart` mode. Previously, curly quotes were just parsed literally, leading to problems in some output formats. Now they are parsed as `Quoted` inlines, if `--smart` is specified. Resolves Issue #270. * Markdown reader: + Allow HTML comments as inline elements in markdown. So, `aaa bbb` can be a single paragraph. + Fixed superscripts with links: `^[link](/foo)^` gets recognized as a superscripted link, not an inline note followed by garbage. + Fixed regression, making markdown reference keys case-insensitive again. Resolves Issue #272. + Properly handle abbreviations (like `Mr.`) at the end of a line. + Better handling of intraword underscores, avoiding exponential slowdowns in some cases. Resolves Issue #182. * LaTeX reader: Improved parsing of preamble. Previously you'd get unexpected behavior on a document that contained `\begin{document}` in, say, a verbatim block. * OpenDocument writer: don't print raw TeX. * Markdown writer: Fixed bug in `Image`. URI was getting unescaped twice! * LaTeX and ConTeXt: Escape `[` and `]` as `{[}` and `{]}`. This avoids unwanted interpretation as an optional argument. * `:` now allowed in HTML tags. Resolves Issue #274. pandoc (1.6) [ John MacFarlane ] * New EPUB and HTML Slidy writers. (Issue #122) - EPUB is a standard ebook format, used in Apple's iBooks for the iPad and iPhone, Barnes and Noble's nook reader, the Sony reader, and many other devices. - Slidy, like S5, is a system for producing HTML+javascript slide shows. * All input is assumed to be UTF-8, no matter what the locale and ghc version, and all output is UTF-8. This reverts to pre-1.5 behavior. Also, a BOM, if present, is stripped from the input. * Markdown now supports grid tables, whose cells can contain arbitrary block elements. (Issue #43) * Sequentially numbered example lists in markdown with `@` marker. * Markdown table captions can begin with a bare colon and no longer need to include the English word "table." Also, a caption can now occur either before or after the table. (Issue #227) * New command-line options: - `--epub-stylesheet` allows you to specify a CSS file that will be used to style your ebook. - `--epub-metadata` allows you to specify metadata for the ebook. - `--offline` causes the generated HTML slideshow to include all needed scripts and stylesheets. - `--webtex` causes TeX math to be converted to images using the Google Charts API (unless a different URL is specified). - `--section-divs` causes div tags to be added around each section in an HTML document. (Issue #230, 239) * Default behavior of S5 writer in standalone mode has changed: previously, it would include all needed scripts and stylesheets in the generated HTML; now, only links are included unless the `--offline` option is used. * Default behavior of HTML writer has changed. Between 1.2 and 1.5, pandoc would enclose sections in div tags with identifiers on the div tags, so that the sections can be manipulated in javascript. This caused undesirable interactions with raw HTML div tags. So, starting with 1.6, the default is to put the identifiers directly on the header tags, and not to include the divs. The `--section-divs` option selects the 1.2-1.5 behavior. * API changes: - `HTMLMathMethod`: Added `WebTeX`, removed `MimeTeX`. - `WriterOptions`: Added `writerUserDataDir`, `writerSourceDirectory`, `writerEPUBMetadata` fields. Removed `writerIncludeBefore`, `writerIncludeAfter`. - Added `headerShift` to `Text.Pandoc.Shared`. - Moved parsing code and `ParserState` from `Text.Pandoc.Shared` to a new module, `Text.Pandoc.Parsing`. - Added `stateHasChapters` to `ParserState`. - Added `HTMLSlideVariant`. - Made `KeyTable` a map instead of an association list. - Added accessors for `Meta` fields (`docTitle`, `docAuthors`, `docDate`). - `Pandoc`, `Meta`, `Inline`, and `Block` have been given `Ord` instances. - Reference keys now have a type of their own (`Key`), with its own `Ord` instance for case-insensitive comparison. - Added `Text.Pandoc.Writers.EPUB`. - Added `Text.Pandoc.UUID`. - Removed `Text.Pandoc.ODT`, added `Text.Pandoc.Writers.ODT`. Removed `saveOpenDocumentAsODT`, added `writeODT`. - Added `Text.Pandoc.Writers.Native` and `writeNative`. Removed `prettyPandoc`. - Added `Text.Pandoc.UTF8` for portable UTF8 string IO. - Removed `Text.Pandoc.Writers.S5` and the `writeS5` function. Moved `s5Includes` to a new module, `Text.Pandoc.S5`. To write S5, you now use `writeHtml` with `writerSlideVariant` set to `S5Slides` or `SlidySlides`. * Template changes. If you use custom templates, please update them, particularly if you use syntax highlighting with pandoc. The old HTML templates hardcoded highlighting CSS that will no longer work with the most recent version of highlighting-kate. - HTML template: avoid empty meta tag if no date. - HTML template: Use default highlighting CSS from highlighting-kate instead of hard-coding the CSS into the template. - HTML template: insert-before text goes before the title, and immediately after the
tag, as documented. (Issue #241) - Added slidy and s5 templates. - Added amssymb to preamble of latex template. (github Issue 1) * Removed excess newlines at the end of output. Note: because output will not contain an extra newline, you may need to make adjustments if you are inserting pandoc's output into a template. * In S5 and slidy, horizontal rules now cause a new slide, so you are no longer limited to one slide per section. * Improved handling of code in man writer. Inline code is now monospace, not bold, and code blocks now use .nf (no fill) and .IP (indented para). * HTML reader parses `` as Code. (Issue #247) * html+lhs output now contains bird tracks, even when compiled without highlighting support. (Issue #242) * Colons are now no longer allowed in autogenerated XML/HTML identifiers, since they have a special meaning in XML. * Code improvements in ODT writer. Remote images are now replaced with their alt text rather than a broken link. * LaTeX reader improvements: - Made latex `\section`, `\chapter` parsers more forgiving of whitespace. - Parse `\chapter{}` in latex. - Changed `rawLaTeXInline` to accept `\section`, `\begin`, etc. - Use new `rawLaTeXInline'` in LaTeX reader, and export `rawLaTeXInline` for use in markdown reader. - Fixes bug wherein `\section{foo}` was not recognized as raw TeX in markdown document. * LaTeX writer: images are automatically shrunk if they would extend beyond the page margin. * Plain, markdown, RST writers now use unicode for smart punctuation. * Man writer converts math to unicode when possible, as in other writers. * `markdown2pdf` can now recognize citeproc options. * Command-line arguments are converted to UTF-8. (Issue #234) * `Text.Pandoc.TeXMath` has been rewritten to use texmath's parser. This allows it to handle a wider range of formulas. Also, if a formula cannot be converted, it is left in raw TeX; formulas are no longer partially converted. * Unicode curly quotes are left alone when parsing smart quotes. (Issue #143) * Cabal file changes: - Removed parsec < 3 restriction. - Added 'threaded' flag for architectures where GHC lacks a threaded runtime. - Use 'threaded' only for markdown2pdf; it is not needed for pandoc. - Require highlighting-kate 0.2.7. * Use explicit imports from `Data.Generics`. Otherwise we have a conflict with the 'empty' symbol, introduced in syb >= 0.2. (Issue #237) * New data files: slidy/slidy.min.js, slidy/slidy.min.css, epub.css. pandoc (1.5.1.1) [ John MacFarlane ] * Fixed uniqueIdent in Shared so that header identifiers work as advertized in the README and are are valid XHTML names. pandoc (1.5.1) [ John MacFarlane ] * Fixed treatment of unicode characters in URIs. + Shared now exports escapeURI and unescapeURI. These handle UTF8 encoding and decoding as well as URI escaping/unescaping. + Shared: uri and emailAddress now return a pair of the original parsed text and the escaped URI (in the latter case, with the mailto: prefix). + HTML reader: unsanitaryURI has been modified to allow unicode high characters in a URI. + Readers: All link and image URIs are now escaped using escapeURI. + Markdown and RST writers: unescapeURI is used so that URIs in these formats are human-readable. * Setup.hs: Don't assume that the build directory is "dist". Instead, get it from localBuildInfo. * OpenDocument writer: Use a Map for stTextStyleAttr. This avoids duplicates (and invalid xml). Resolves Issue #222. pandoc (1.5.0.1) [ John MacFarlane ] * HTML writer: Fixed error in math writer (with MathML option) that caused an infinite loop for unparsable MathML. pandoc (1.5) [ John MacFarlane ] * Added --mathml option. When this is selected, pandoc will convert TeX math into MathML. + Added data/MathMLinHTML.js, which is included when no URL is provided for --mathml. This allows MathML to be displayed (in better browsers) as text/html. + Removed Text.Pandoc.LaTeXMathML. The module was no longer necessary; it was replaced by two lines in pandoc.hs. + Replaced LaTeXMathML.js.commend and LaTeXMathML.js.packed with a single combined file, LaTeXMathML.js. * Added --data-dir option. This specifies a user data directory. If not specified, will default to ~/.pandoc on unix or Application Data\pandoc on Windows. Files placed in the user data directory will override system default data files. * Added Maybe datadir parameter to readDataFile, saveOpenDocumentAsODT, latexMathMLScript, s5HeaderIncludes, and getDefaultTemplate. If Nothing, no user directory is searched for an override. * Added 'plain' output format. This is similar to markdown, but removes links, pictures, inline formatting, and most anything that looks even vaguely markupish. The function writePlain is exported by Text.Pandoc.Writers.Markdown, with which it shares most of its code. * Allow multi-line titles and authors in meta block. Titles may span multiple lines, provided continuation lines begin with a space character. Separate authors may be put on multiple lines, provided each line after the first begins with a space character. Each author must fit on one line. Multiple authors on a single line may still be separated by a semicolon. Based on a patch by Justin Bogner. * When given an absolute URI as parameter, pandoc will try to fetch the content via HTTP. So you can do: 'pandoc -r html -w markdown http://www.fsf.org' Adds dependency on HTTP. * Made HTML reader much more forgiving. + Incorporated idea (from HXT) that an element can be closed by an open tag for another element. + Javascript is partially parsed to make sure that a 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: 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