Skip to content

Releases: jgm/pandoc

pandoc 2.0.6

29 Dec 00:40
@jgm jgm

Choose a tag to compare

  • Added jats as an input format.

    • Add Text.Pandoc.Readers.JATS, exporting readJATS (API change) (Hamish Mackenzie).
    • Improved citation handling in JATS reader. JATS citations are now converted to pandoc citations, and JATS ref-lists are converted into a references field in metadata, suitable for use with pandoc-citeproc. Thus a JATS article with embedded bibliographic information can be processed with pandoc and pandoc-citeproc to produce a formatted bibliography.
  • Allow --list-extensions to take an optional FORMAT argument. This lists the extensions set by default for the selected FORMAT. The extensions are now alphabetized, and the + or - indicating the default setting comes before, rather than after, the extension.

  • Markdown reader:

    • Preserve original whitespace between blocks.
    • Recognize \placeformula as context.
    • Be pickier about table captions. A caption starts with a : which can’t be followed by punctuation. Otherwise we can falsely interpret the start of a fenced div, or even a table header line like :--:|:--:, as a caption.
    • Always use four space rule for example lists. It would be awkward to indent example list contents to the first non-space character after the label, since example list labels are often long. Thanks to Bernhard Fisseni for the suggestion.
    • Improve raw tex parsing. Note that the Markdown reader is also affected by the latex_macros extension changes described below under the LaTeX reader.
  • LaTeX reader:

    • latex_macros extension changes (#4179). Don’t pass through macro definitions themselves when latex_macros is set. The macros have already been applied. If latex_macros is enabled, then rawLaTeXBlock in Text.Pandoc.Readers.LaTeX will succeed in parsing a macro definition, and will update pandoc’s internal macro map accordingly, but the empty string will be returned.
    • Export tokenize, untokenize (API change).
    • Use applyMacros in rawLaTeXBlock, rawLaTeXInline.
    • Refactored inlineCommand.
    • Fix bug in tokenizer. Material following ^^ was dropped if it wasn’t a character escape. This only affected invalid LaTeX, so we didn’t see it in the wild, but it appeared in a QuickCheck test failure.
    • Fix regression in LateX tokenization (#4159). This mainly affects the Markdown reader when parsing raw LaTeX with escaped spaces.
    • Add tests of LaTeX tokenizer.
    • Support \foreignlanguage from babel.
    • Be more tolerant of & character (#4208). This allows us to parse unknown tabular environments as raw LaTeX.
  • Muse reader (Alexander Krotov):

    • Parse anchors immediately after headings as IDs.
    • Require that note references does not start with 0.
    • Parse empty comments correctly.
  • Org reader (Albert Krewinkel):

    • Fix asterisks-related parsing error (#4180).
    • Support minlevel option for includes (#4154). The level of headers in included files can be shifted to a higher level by specifying a minimum header level via the :minlevel parameter. E.g. #+include: "tour.org" :minlevel 1 will shift the headers in tour.org such that the topmost headers become level 1 headers.
    • Break-up org reader test file into multiple modules.
  • OPML reader:

    • Enable raw HTML and other extensions by default for notes (#4164). This fixes a regression in 2.0. Note that extensions can now be individually disabled, e.g. -f opml-smart-raw_html.
  • RST reader:

    • Allow empty list items (#4193).
    • More accurate parsing of references (#4156). Previously we erroneously included the enclosing backticks in a reference ID (#4156). This change also disables interpretation of syntax inside references, as in docutils. So, there is no emphasis in `my *link*`_.
  • Docx reader:

    • Continue lists after interruption (#4025, Jesse Rosenthal). Docx expects that lists will continue where they left off after an interruption and introduces a new id if a list is starting again. So we keep track of the state of lists and use them to define a “start” attribute, if necessary.
    • Add tests for structured document tags unwrapping (Jesse Rosenthal).
    • Preprocess Document body to unwrap w:sdt elements (Jesse Rosenthal, #4190).
  • Plain writer:

    • Don’t linkify table of contents.
  • RST writer:

    • Fix anchors for headers (#4188). We were missing an _.
  • PowerPoint writer (Jesse Rosenthal):

    • Treat lists inside BlockQuotes as lists. We don’t yet produce incremental lists in PowerPoint, but we should at least treat lists inside BlockQuotes as lists, for compatibility with other slide formats.
    • Add ability to force size. This replaces the more specific blockQuote runProp, which only affected the size of blockquotes. We can use this for notes, etc.
    • Implement notes. This currently prints all notes on a final slide. Note that at the moment, there is a danger of text overflowing the note slide, since there is no logic for adding further slides.
    • Implement basic definition list functionality to PowerPoint writer.
    • Don’t look for default template file for Powerpoint (#4181).
    • Add pptx to isTextFormat list. This is used to check standalone and not writing to the terminal.
    • Obey slide level option (Jesse Rosenthal).
    • Introduce tests.
  • Docx writer:

    • Ensure that distArchive is the one that comes with pandoc (#4182). Previously a reference.docx in ~/.pandoc (or the user data dir) would be used instead, and this could cause problems because a user-modified docx sometimes lacks vital sections that we count on the distArchive to supply.
  • Org writer:

    • Do not wrap “-” to avoid accidental bullet lists (Alexander Krotov).
    • Don’t allow fn refs to wrap to beginning of line (#4171, with help from Alexander Krotov). Otherwise they can be interpreted as footnote definitions.
  • Muse writer (Alexander Krotov):

    • Don’t wrap note references to the next line (#4172).
  • HTML writer:

    • Use br elements in line blocks instead of relying on CSS (#4162). HTML-based templates have had the custom CSS for div.line-block removed. Those maintaining custom templates will want to remove this too. We still enclose line blocks in a div with class line-block.
  • LaTeX writer:

    • Use \renewcommand for \textlatin with babel (#4161). This avoids a clash with a deprecated \textlatin command defined in Babel.
    • Allow fragile=singleslide attribute in beamer slides (#4169).
    • Use \endhead after \toprule in headerless tables (#4207).
  • FB2 writer:

    • Add cover image specified by cover-image meta (Alexander Krotov, #4195).
  • JATS writer (Hamish Mackenzie):

    • Support writing <fig> and <table-wrap> elements with <title> and <caption> inside them by using Divs with class set to one of fig, table-wrap or caption (Hamish Mackenzie). The title is included as a Heading so the constraint on where Heading can occur is also relaxed.
    • Leave out empty alt attributes on links.
    • Deduplicate image mime type code.
    • Make <p> optional in <td> and <th> (#4178).
    • Self closing tags for empty xref (#4187).
    • Improve support for code language.
  • Custom writer:

    • Use init file to setup Lua interpreter (Albert Krewinkel). The same init file (data/init) that is used to setup the Lua interpreter for Lua filters is also used to setup the interpreter of custom writers.lua.
    • Define instances for newtype wrapper (Albert Krewinkel). The custom writer used its own ToLuaStack instance definitions, which made it difficult to share code with Lua filters, as this could result in conflicting instances. A Stringify wrapper is introduced to avoid this problem.
    • Added tests for custom writer.
    • Fixed definition lists and tables in data/sample.lua.
  • Fixed regression: when target is PDF, writer extensions were being ignored. So, for example, pandoc -t latex-smart -o file.pdf did not work properly.

  • Lua modules (Albert Krewinkel):

    • Add pandoc.utils module, to hold utility functions.
    • Create a Haskell module Text.Pandoc.Lua.Module.Pandoc to define the pandoc lua module.
    • Make a Haskell module for each Lua module. Move definitions for the pandoc.mediabag modules to a separate Haskell module.
    • Move sha1 from the main pandoc module to pandoc.utils.
    • Add function pandoc.utils.hierarchicalize (convert list of Pandoc blocks into (hierarchical) list of Elements).
    • Add function pandoc.utils.normalize_date (parses a date and converts it (if possible) to “YYYY-MM-DD” format).
    • Add function pandoc.utils.to_roman_numeral (allows conversion of numbers below 4000 into roman numerals).
    • Add function pandoc.utils.stringify (converts any AST element to a string with formatting removed).
    • data/init.lua: load pandoc.utils by default
    • Turn pipe, read into full Haskell functions. The pipe and read utility functions are converted from hybrid lua/haskell functions into full Haskell functions. This avoids the need for intermediate _pipe/_read helper functions, which have dropped.
    • pandoc.lua: re-add missing MetaMap function. This was a bug introduced in version 2.0.4.
  • Text.Pandoc.Class: Add insertInFileTree [API change]. This gives a pure way to insert an ersatz file into a FileTree. In addition, we normalize paths both on insertion and on lookup.

  • Text.Pandoc.Shared: export blocksToInlines' (API change, Maura Bieg).

  • Text.Pandoc.MIME: Add opus to MIME type table as audio/ogg (#4198)....

Read more

pandoc 2.0.5

13 Dec 05:54
@jgm jgm

Choose a tag to compare

  • Fix a bug in 2.0.4, whereby pandoc could not read the theme files
    generated with --print-highlight-style (#4133). Improve JSON
    serialization of styles.

  • Fix CSS issues involving line numbers (#4128).
    Highlighted code blocks are now enclosed in a div with class sourceCode.
    Highlighting CSS no longer sets a generic color for pre and code; we only
    set these for class sourceCode.

  • --pdf-engine-opt: fix bug where option order was reversed (#4137).

  • Add PowerPoint (pptx) writer (Jesse Rosenthal).
    It works following the standard Pandoc conventions for making other
    sorts of slides. Caveats:

    • Syntax highlighting is not yet implemented. (This is difficult
      because there are no character classes in Powerpoint.)
    • Footnotes and Definition lists are not yet implemented. (Notes will
      usually take the form of a final slide.
    • Image placement and auto-resizing has a few glitches.
    • Reference powerpoint files don’t work dependably from the command
      line. This will be implemented, but at the moment users are advised
      to change themes from within Powerpoint.
  • Create shared Text.Pandoc.Writers.OOXML module (Jesse Rosenthal).
    This is for functions used by both Powerpoint and Docx writers.

  • Add default pptx data for Powerpoint writer (Jesse Rosenthal).

  • Add empty_paragraphs extension.

    • Deprecate --strip-empty-paragraphs option. Instead we now
      use an empty_paragraphs extension that can be enabled on
      the reader or writer. By default, disabled.
    • Add Ext_empty_paragraphs constructor to Extension.
    • Revert “Docx reader: don’t strip out empty paragraphs.”
      This reverts commit d6c58eb.
    • Implement empty_paragraphs extension in docx reader and writer,
      opendocument writer, html reader and writer.
    • Add tests for empty_paragraphs extension.
  • Markdown reader:

    • Don’t parse native div as table caption (#4119).
    • Improved computation of column widths in pipe tables.
      Pipe tables with lines longer than the text width (as set
      by --columns) are now scaled to text width, with the relative
      widths of columns determined by the ratios between the
      header lines. Previously we computed column widths using
      the ratio of header line lengths to column width, so that
      tables with narrow header lines were extremely thin, which
      was very rarely the desired result.
  • LaTeX reader: fix \ before newline (#4134). This should be a space,
    as long as it’s not followed by a blank line. This has been fixed at the
    tokenizer level.

  • Muse reader (Alexander Krotov):

    • Add test for #disable-tables directive in Emacs mode.
    • Don’t allow emphasis to be preceded by letter.
    • Add underline support in Emacs Muse mode..
    • Support multiline directives in Amusewiki mode
  • Man writer: omit internal links (#4136). That is, just print the link
    text without the URL.

  • Markdown reader: accept processing instructions as raw HTML (#4125).

  • Lua filters (Albert Krewinkel):

    • Use script to initialize the interpreter. The file init.lua is
      used to initialize the Lua interpreter which is used in Lua filters.
      This gives users the option to require libraries which they want to
      use in all of their filters, and to extend default modules.
    • Fix package loading for Lua 5.1. The list of package searchers is
      named package.loaders in Lua 5.1 and LuaJIT, and package.searchers
      in Lua 5.2 and later.
    • Refactor lua module handling. The integration with Lua’s package/module
      system is improved: A pandoc-specific package searcher is prepended to
      the searchers in package.searchers. The modules pandoc and
      pandoc.mediabag can now be loaded via require.
    • Bump lower bound of hslua. The release hslua 0.9.3 contains a new
      function which makes using Haskell functions as package loaders much
      easier.
  • reveal.js template: add title-slide identifier to title slide (#4120).
    This allows it to be styled more easily.

  • LaTeX template: Added support for pagestyle variable (#4135,
    Thomas Hodgson)

  • Add -threaded to ghc-options for executable (#4130, fixes a build
    error on linux).

pandoc 2.0.4

04 Dec 06:27
@jgm jgm

Choose a tag to compare

  • Add --print-highlight-style option. This generates a JSON version
    of a highlighting style, which can be saved as a .theme file, modified,
    and used with --highlight-style (#4106, #4096).

  • Add --strip-empty-paragraphs option. This works for any input format.
    It is primarily intended for use with docx and odt documents where
    empty paragraphs have been used for inter-paragraph spaces.

  • Support --webtex for gfm output.

  • Recognize .muse file extension.

  • Support beamer \alert in LaTeX reader. Closes #4091.

  • Docx reader: don’t strip out empty paragraphs (#2252).
    Users who have a conversion pipeline from docx may want to consider adding
    --strip-empty-paragraphs to the command line.

  • Org reader (Albert Krewinkel): Allow empty list items (#4090).

  • Muse reader (Alexander Krotov):

    • Parse markup in definition list terms.
    • Allow definition to end with EOF.
    • Make code blocks round trip.
    • Drop common space prefix from list items.
    • Add partial round trip test.
    • Don’t interpret XML entities.
    • Remove nested.
    • Parse ~~ as non-breaking space in Emacs mode.
    • Correctly remove indentation from notes. Exactly one space is
      required and considered to be part of the marker.
    • Allow list items to be empty.
    • Add ordered list test.
    • Add more multiline definition tests.
    • Don’t allow blockquotes within lists.
    • Fix reading of multiline definitions.
    • Add inline <literal> support.
    • Concatenate inlines of the same type
  • Docx writer: allow empty paragraphs (#2252).

  • CommonMark/gfm writer:

    • Use raw html for native divs/spans (#4113). This allows a pandoc
      markdown native div or span to be rendered in gfm using raw html tags.
    • Implement raw_html and raw_tex extensions. Note that raw_html
      is enabled by default for gfm, while raw_tex is disabled by default.
  • Muse writer (Alexander Krotov):

    • Test that inline math conversion result is normalized.
      Without normalization this test produced
      <em>a</em><em>b</em><em>c</em>.
    • Improve inline list normalization and move to writer.
    • Escape hash symbol.
    • Escape ---- to avoid accidental horizontal rules.
    • Escape only </code> inside code tag.
    • Additional <verbatim> is not needed as <code> is verbatim already.
  • LaTeX writer:

    • Allow specifying just width or height for image size.
      Previously both needed to be specified (unless the image was
      being resized to be smaller than its original size).
      If height but not width is specified, we now set width to
      textwidth. If width but not height is specified, we now set
      height to textheight. Since we have keepaspectratio, this
      yields the desired result.
    • Escape ~ and _ in code with --listings (#4111).
  • HTML writer: export tagWithAttributes. This is a helper allowing
    other writers to create single HTML tags.

  • Let papersizes a0, a1, a2, … be case-insensitive by
    converting the case as needed in LaTeX and ConTeXt writers.

  • Change fixDisplayMath from Text.Pandoc.Writers.Shared
    so that it no longer produces empty Para’s as an artifact.

  • Text.Pandoc.Shared.blocksToInlines: rewrote using builder.
    This gives us automatic normalization, so we don’t get
    for example two consecutive Spaces.

  • Include default CSS for ‘underline’ class in HTML-based templates.

  • revealjs template: add tex2jax configuration for the
    math plugin. With the next release of reveal.js, this will
    fix the problem of $s outside of math contexts being
    interpreted as math delimiters (#4027).

  • pandoc.lua module for use in lua filters (Albert Krewinkel):

    • Add basic lua List module (#4099, #4081). The List module is
      automatically loaded, but not assigned to a global variable. It can be
      included in filters by calling List = require 'List'. Lists of blocks,
      lists of inlines, and lists of classes are now given List as a metatable,
      making working with them more convenient. E.g., it is now possible to
      concatenate lists of inlines using Lua’s concatenation operator ..
      (requires at least one of the operants to have List as a metatable):

      function Emph (emph)
        local s = {pandoc.Space(), pandoc.Str 'emphasized'}
        return pandoc.Span(emph.content .. s)
      end
      

      The List metatable is assigned to the tables which get passed to
      the constructors MetaBlocks, MetaInline, and MetaList. This
      enables the use of the resulting objects as lists.

    • Lua/StackInstances: push Pandoc and Meta via constructor.
      Pandoc and Meta elements are now pushed by calling the respective
      constructor functions of the pandoc Lua module. This makes serialization
      consistent with the way blocks and inlines are pushed to lua and allows
      to use List methods with the blocks value.

    • Add documentation for pandoc.List in lua-filters.md.

  • Use latest tagsoup. This fixes a bug in parsing HTML tags with
    & (but not a valid entity) following them (#4094, #4088).

  • Use skylighting 0.4.4.1, fixing the color of unmarked code text
    when numberLines is used (#4103).

  • Make normalizeDate more forgiving (Mauro Bieg, #4101), not
    requiring a leading 0 on single-digit days.

  • Fix --help output for --highlight-style to include FILE (Mauro
    Bieg, #4095).

  • Clearer deprecation warning for --latexmathml, --asciimathml, -m.
    Previously we only mentioned --latexmathml, even if -m was
    used.

  • Changelog: fix description of lua filters in 2.0 release
    (Albert Krewinkel). Lua filters were initially run after conventional
    (JSON) filters. However, this was changed later to make it easier to deal
    with files in the mediabag. The changelog is updated to describe that
    feature of the 2.0 release correctly.

  • Change Generic JSON instances to TemplateHaskell (Jasper Van der Jeugt,
    #4085). This reduces compile time and memory usage significantly.

  • lua-filters.md: Added tikz filter example.

  • Create alternative zip file for macOS binaries.

  • Create alternative zip file for Windows binaries.

  • Update INSTALL.md since we now provide zips for binaries.

  • Relax http-types dependency (Justus Sagemüller, #4084).

  • Add epub.md, getting-started.md to docs. These used to live in
    the website repo.

  • Add packages target to Makefile.

  • Bump bounds for binary, http-types, tasty-hunit

pandoc 2.0.3

21 Nov 05:25
@jgm jgm

Choose a tag to compare

  • Lua filters: preload text module (Albert Krewinkel, #4077).
    The text module is preloaded in lua. The module contains some UTF-8
    aware string functions, implemented in Haskell. The module is loaded on
    request only, e.g.:

    text = require 'text'
    function Str (s)
      s.text = text.upper(s.text)
      return s
    end
    
  • Allow table-like access to attributes in lua filters (Albert Krewinkel,
    #4071). Attribute lists are represented as associative lists in Lua. Pure
    associative lists are awkward to work with. A metatable is attached to
    attribute lists, allowing to access and use the associative list as if
    the attributes were stored in as normal key-value pair in table.
    Note that this changes the way pairs works on attribute lists. Instead
    of producing integer keys and two-element tables, the resulting iterator
    function now returns the key and value of those pairs. Use ipairs to
    get the old behavior. Warning: the new iteration mechanism only works if
    pandoc has been compiled with Lua 5.2 or later (current default: 5.3).

  • Text.Pandoc.Parsing.uri: allow & and = as word characters (#4068).
    This fixes a bug where pandoc would stop parsing a URI with an
    empty attribute: for example, &a=&b= wolud stop at a.
    (The uri parser tries to guess which punctuation characters
    are part of the URI and which might be punctuation after it.)

  • Introduce HasSyntaxExtensions typeclass (Alexander Krotov, #4074).

    • Added new HasSyntaxExtensions typeclass for ReaderOptions and
      WriterOptions.
    • Reimplemented isEnabled function from Options.hs to accept both
      ReaderOptions and WriterOptions.
    • Replaced enabled from CommonMark.hs with new isEnabled.
  • Add amuse extension (Alexander Krotov) to enable Amuse wiki
    behavior for muse. New Ext_amuse constructor for
    Extension. Note: this is switched on by default; for
    Emacs behavior, use muse-amuse.

  • Muse reader (Alexander Krotov):

    • Count only one space as part of list item marker.
    • Produce SoftBreaks on newlines. Now wrapping can be preserved
      with --wrap=preserve.
    • Add Text::Amuse footnote extensions. Footnote end is indicated by
      indentation, so footnotes can be placed anywhere in the text,
      not just at the end of it.
    • Accept Emacs Muse definition lists when -amuse.
      Emacs Muse does not require indentation.
  • HTML reader:

    • Ensure we don’t produce level 0 headers (#4076), even for chapter
      sections in epubs. This causes problems because writers aren’t set
      up to expect these.
    • Allow spaces after \( and before \) with tex_math_single_backslash.
      Previously \( \frac{1}{a} < \frac{1}{b} \) was not parsed as math in
      markdown or html +tex_math_single_backslash.
  • MANUAL: clarify that math extensions work with HTML.
    Clarify that tex_math_dollars and tex_math_single_backslash
    will work with HTML as well as Markdown.

  • Creole reader: Fix performance issue for longer lists (Sascha Wilde,
    #4067).

  • RST reader: better support for ‘container’ directive (#4066).
    Create a div, incorporate name attribute and classes.

  • LaTeX reader:

    • Support column specs like *{2}{r} (#4056). This is equivalent to
      rr. We now expand it like a macro.
    • Allow optional args for parbox (#4056).
    • Allow optional arguments on \footnote (#4062).
  • EPUB writer: Fixed path for cover image (#4069). It was previously
    media/media/imagename, and should have been media/imagename.

  • Markdown writer: fix bug with doubled footnotes in grid tables
    (#4061).

  • LaTeX template: include natbib/biblatex after polyglossia (#4073).
    Otherwise we seem to get an error; biblatex wants polyglossia
    language to be defined.

  • Added examples to lua filters documentation.

pandoc 2.0.2

12 Nov 18:14
@jgm jgm

Choose a tag to compare

  • Deprecated ancient HTML math methods: --latexmathml, --gladtex,
    --mimetex, --jsmath.

  • Fixed URIs in data/jats.csl. They were being rendered twice,
    leading to invalid XML in default JATS output with pandoc-citeproc.

  • lua-filters.md: use real-world man page filter as example.

  • Add lua filter functions walk_inline and walk_block
    in the pandoc module, to apply filters inside particular
    inline and block elements.

  • Refactored some code from Text.Pandoc.Lua.PandocModule
    into new internal module Text.Pandoc.Lua.Filter.

  • Markdown reader:

    • Allow fenced code blocks to be indented 1-3 spaces (#4011).
      This brings our handling of them into alignment with CommonMark’s.
    • Fix YAML metadata with “chomp” (|-). Previously if a
      YAML block under |- contained a blank line, pandoc would
      not parse it as metadata.
  • Removed etc. from abbreviations file. Often etc. ends a
    sentence, and we want the period to be treated as a
    sentence-ending period.

  • Fix regression with --metadata (#4054). Values specified with
    --metadata should replace a metadata value set in the document
    itself, rather than creating a list including a new value.

  • EPUB writer:

    • Fix EPUB OCF structure. #3720 had been improperly implemented.
    • Fix modified paths for raw HTML tags (src, poster, etc.)
      (#4050, #4055). This had not been updated for the new EPUB
      container layout, with a separate text/ subdirectory.
    • Fix image paths with empty --epub-subdirectory.
  • Miscellaneous code cleanup (Alexander Krotov).

  • Use pandoc-types 1.17.3, which adds Walkable instances
    for [Block] Block and [Inline] Inline.

  • Remove obsolete stack.full.yaml (#4052).

  • Change to using pandoc-citeproc 0.12.1 in binary packages.

  • Consolidate math output method documentation (#4049, Mauro Bieg).

  • MANUAL.txt: fix header level of “Extension: emoji” (Albert Krewinkel).

  • Use lua filter to generate man page from MANUAL.txt, replacing old
    Haskell filters. This is easier and faster.

  • Improved INSTALL.md.

  • Update commands to extract deb archive on Linux (#4043, Salim B).

pandoc 2.0.1.1

05 Nov 06:20
@jgm jgm

Choose a tag to compare

  • Improved fix to #3989 (parsing of HTML tags containing
    > in an attribute or comment). The previous fix (in 2.0.1) only
    worked in certain cases.

  • FB2 writer (Alexander Krotov):

    • Add unrecognised genre to <title-info>
      (Alexander Krotov). XML schema requires at least one genre.
    • Remove <annotation> from <body>.
  • CommonMark writer: fix strikethrough for gfm (#4038).

  • Use texmath 0.10, which adds support for a wider range of
    symbols and fixes default column alignments in MathML
    and OMML.

  • Highlighting fixes, using skylighting 0.4.3.2:

    • Fix invalid CSS.
    • Support lineAnchors (or line-anchors) in HTML code blocks.
    • Ensure that code lines don’t get duplicate identifiers (#4031).
      The line identifiers are built using the code block’s identifier
      as a prefix. If the code block has null identifier, we use
      cb1, cb2, etc.
  • Added a few abbreviations to data/abbreviations,
    and sorted the list (#3984, Wandmalfarbe).

  • Improved support for columns in HTML writer (#4028).

    • Remove width attribute from the div.
    • Remove space between <div class="column"> elements,
      since this prevents columns whose widths sum to 100%
      (the space takes up space).
    • Move as much as possible of the CSS to the template.
    • Ensure that all the HTML-based templates (including epub)
      contain the CSS for columns.
    • Columns default to 50% width unless they are given a width
      attribute. So if you want two equal-width columns, you
      can use a div with class column and no width attribute.
  • SelfContained: use base64 for css links with media attribute (#4026).
    This fixes --self-contained with S5.

  • Improve pandoc-template-mode.el (Vaclav Haisman).

  • Issue INFO, not WARNING, when a .sty file cannot be
    read in LaTeX reader. It is normally not an issue requiring
    a fix from the user if .sty files are not found.

  • INSTALL.md: MacOS instructions needed xar -f (adam234).

  • MANUAL.txt:

    • Clarify that –setext-headers doesn’t affect gfm output (#4035).
    • Clarify what is needed to open and close a div in fenced_divs
      (#4039, Tristano Ajmone).
    • Removed reference to default.beamer in docs (#4024).
      Also added mention of other templates affecting PDF output
      with different settings.

pandoc 2.0.1

01 Nov 05:35
@jgm jgm

Choose a tag to compare

  • Fixed regression in parsing of HTML comments in markdown and other
    non-HTML formats (Text.Pandoc.Readers.HTML.htmlTag) (#4019).
    The parser stopped at the first > character, even if it wasn't
    the end of the comment.

  • Creole reader (Sascha Wilde):

    • Fix some minor typos and formatting.
    • Add additional test on nowiki-block after para.
    • Fix lists with trailing white space.
  • LaTeX reader: handle % comment right after command.
    For example, \emph%.

  • Markdown reader: make sure fenced div closers work in lists.
    Previously the following failed:

    ::: {.class}
    1. one
    2. two
    :::
    

    and you needed a blank line before the closing :::.

  • Make fenced_divs affect the Markdown writer. If fenced_divs is
    enabled, Divs will be rendered as fenced divs.

  • LaTeX/Beamer writer: support "blocks" inside columns and other Divs
    (#4016).

  • HTML Writer: consistently use dashed class-names (Mauro Bieg, #3556).
    Note: this change may require some changes in CSS rules.
    footnoteRef has become footnote-ref, titleslide has
    become title-slide, and footnoteBack has become footnote-back.

  • JATS writer: Properly pass through author metadata (#4020).

  • FB2 writer (Alexander Krotov):

    • Write blocks outside of <p> in definitions.
    • Make bullet lists consistent with ordered lists, repeating
      the marker for the outer list rather than indenting sublists,
      since indentation does not work in readers.
    • Add new style FB2 tests.
  • Text.Pandoc.ImageSize: Add Millimeter constructor to Dimension
    (#4012) [API change]. Now sizes given in 'mm' are no longer converted
    to 'cm'.

  • Revise documentation of small caps syntax (Andrew Dunning, #4013).

  • Fix broken reference links in manual (Andrew Dunning, #4014)

  • Fixed example of slide columns structure in changelog (#4015).
    Also documented this feature in MANUAL.txt.

pandoc 2.0.0.1

31 Oct 06:00
@jgm jgm

Choose a tag to compare

  • EPUB writer:

    • Fixed filepaths for nonstandard epub-subdirectory values.
    • Ensure that epub2 is recognized as a non-text format, so that a template is used.
    • Don't include "prefix" attribute for ibooks for epub2. It doesn't validate.
    • Fix stylesheet paths; previously we had an incorrect stylesheet path for the cover page and nav page.
  • LaTeX reader:

    • Insert space when needed in macro expansion (#4007). Sometimes we need to insert a space after a control sequence to prevent it merging with a following letter.
    • Allow unbraced arguments for macros (#4007).
    • Allow body of macro definition to be unbraced (#4007).
  • Linux package build: ensure that pandoc-citeproc is statically linked.

  • trypandoc: add native, ms.

pandoc 2.0

30 Oct 00:13
@jgm jgm

Choose a tag to compare

[Scroll to the end for the binary packages, or better yet, go to the pandoc 2.0.1 packages]

New features

  • New output format ms (groff ms). Complete support, including tables, math, syntax highlighting, and PDF bookmarks. The writer uses texmath’s new eqn writer to convert math to eqn format, so a ms file produced with this writer should be processed with groff -ms -e if it contains math.

  • New output format jats (Journal Article Tag Suite). This is an XML format used in archiving and publishing articles. Note that a URI-encoded CSL stylesheet (data/jats.csl) is added automatically unless a stylesheet is specified using --css.

  • New output format gfm (GitHub-flavored CommonMark) (#3841). This uses bindings to GitHub’s fork of cmark, so it should parse gfm exactly as GitHub does (excepting certain postprocessing steps, involving notifications, emojis, etc.). markdown_github has been deprecated in favor of gfm.

  • New output format muse (Emacs Muse) (Alexander Krotov, #3489).

  • New input format gfm (GitHub-flavored CommonMark) (#3841). This uses bindings to GitHub’s fork of cmark. markdown_github has been deprecated in favor of gfm.

  • New input format muse (Emacs Muse) reader (Alexander Krotov, #3620).

  • New input format tikiwiki (TikiWiki markup) (rlpowell, #3800).

  • New input format vimwiki (Vimwiki markup) (Yuchen Pei, #3705). Note that there is a new data file, data/vimwiki.css, which can be used to display the HTML produced by this reader and pandoc’s HTML writer in the style of vimwiki’s own HTML export.

  • New input format creole (Creole 1.0) (#3994, Sascha Wilde).

  • New syntax for Divs, with fenced_divs extension enabled by default (#168). This gives an attractive, plain-text way to create containers for block-level content.

  • Added new syntax for including raw content in any output format, enabled by the raw_attribute extension (which is on by default for markdown and multimarkdown). The syntax is the same as for fenced code blocks or code inlines, only with {=FORMAT} for attributes, where FORMAT is the name of the output format (e.g., ms, html).

  • Implement multicolumn support for slide formats (#1710). The structure expected is:

    :::::::::::::: {.columns}
    ::: {.column width="40%"}
    contents...
    :::
    ::: {.column width="60%"}
    contents...
    :::
    ::::::::::::::
    

    Support has been added for beamer and all HTML slide formats.

  • Allows line comments in templates, beginning with $-- (#3806). (Requires doctemplates 0.2.1.)

  • Add --eol=crlf|lf|native flag and writer option to control line endings (Stefan Dresselhaus, #3663, #2097).

  • Add --log option to save log messages in JSON format to a file (#3392).

  • Add --request-header option, to set request headers when pandoc makes HTTP requests to fetch external resources. For example: --request-header User-Agent:blah.

  • Added lua filters (Albert Krewinkel, #3514). The new --lua-filter option works like --filter but takes pathnames of special lua filters and uses the lua interpreter baked into pandoc, so that no external interpreter is needed. Note that lua filters are all applied after regular filters, regardless of their position on the command line. For documentation of lua filters, see doc/lua-filters.md.

  • Set PANDOC_READER_OPTIONS in environment where filters are run. This contains a JSON representation of ReaderOptions, so filters can access it.

  • Support creation of pdf via groff ms and pdfroff. pandoc -t ms -o output.pdf input.txt.

  • Support for PDF generation via HTML and weasyprint or prince (Mauro Bieg, #3909). pandoc -t html5 -o output.pdf --pdf-engine=prince.

  • Added --epub-subdirectory option (#3720). This specifies the subdirectory in the OCF container that holds the EPUB specific content. We now put all EPUB related content in an EPUB/ subdirectory by default (later this will be configurable).

      mimetype
      META-INF/
        com.apple.ibooks.display-options.xml
        container.xml
      EPUB/ <<--configurable-->>
        fonts/ <<--static-->>
        font.otf
      media/ <<--static-->>
        cover.jpg
        fig1.jpg
      styles/ <<--static-->>
        stylesheet.css
      content.opf
      toc.ncx
      text/ <<--static-->>
        ch001.xhtml
    
  • Added --resource-path=SEARCHPATH command line option (#852). SEARCHPATH is separated by the usual character, depending on OS (: on unix, ; on windows). Default resource path is just working directory. However, the working directory must be explicitly specified if the --resource-path option is used.

  • Added –abbreviations=FILE option for custom abbreviations file (#256). Dfault abbreviations file (data/abbreviations) contains a list of strings that will be recognized by pandoc’s Markdown parser as abbreviations. (A nonbreaking space will be inserted after the period, preventing a sentence space in formats like LaTeX.) Users can override the default by putting a file abbreviations in their user data directory (~/.pandoc on *nix).

  • Allow a theme file as argument to --highlight-style. Also include a sample, default.theme, in data/.

  • Allow --syntax-definition option for dynamic loading of syntax highlighting definitions (#3334).

  • Lists in markdown by default now use the CommonMark variable nesting rules (#3511). The indentation required for a block-level item to be included in a list item is no longer fixed, but is determined by the first line of the list item. To be included in the list item, a block must be indented to the level of the first non-space content after the list marker. Exception: if are 5 or more spaces after the list marker, then the content is interpreted as an indented code block, and continuation paragraphs must be indented two spaces beyond the end of the list marker. See the CommonMark spec for more details and examples.

    Documents that adhere to the four-space rule should, in most cases, be parsed the same way by the new rules. Here are some examples of texts that will be parsed differently:

    - a
      - b
    

    will be parsed as a list item with a sublist; under the four-space rule, it would be a list with two items.

    - a
    
          code
    

    Here we have an indented code block under the list item, even though it is only indented six spaces from the margin, because it is four spaces past the point where a continuation paragraph could begin. With the four-space rule, this would be a regular paragraph rather than a code block.

    - a
    
            code
    

    Here the code block will start with two spaces, whereas under the four-space rule, it would start with code. With the four-space rule, indented code under a list item always must be indented eight spaces from the margin, while the new rules require only that it be indented four spaces from the beginning of the first non-space text after the list marker (here, a).

    This change was motivated by a slew of bug reports from people who expected lists to work differently (#3125, #2367, #2575, #2210, #1990, #1137, #744, #172, #137, #128) and by the growing prevalance of CommonMark (now used by GitHub, for example). Those who prefer the old behavior can use -f markdown+four_space_rule.

  • Added four_space_rule extension. This triggers the old pandoc parsing rule for content nested under list items (the “four space rule”).

  • Added spaced_reference_links extension (#2602). It allows whitespace between the two parts of a reference link: e.g.

    [a] [b]
    
    [b]: url
    

    This was previously enabled by default; now it is now forbidden by default.

  • Add space_in_atx_header extension (#3512). This is enabled by default in pandoc and GitHub markdown but not the other flavors. This requirse a space between the opening #’s and the header text in ATX headers (as CommonMark does but many other implementations do not). This is desirable to avoid falsely capturing things ilke

    #hashtag
    

    or

    #5
    
  • Add sourcefile and outputfile template variables (Roland Hieber, #3431).

  • Allow ibooks-specific metadata in epubs (#2693). You can now have the following fields in your YAML metadata, and it will be treated appropriately in the generated EPUB:

      ibooks:
        version: 1.3.4
        specified-fonts: false
        ipad-orientation-lock: portrait-only
        iphone-orientation-lock: landscape-only
        binding: true
        scroll-axis: vertical
    

Behavior changes

  • Reader functions no longer presuppose that CRs have been stripped from the input. (They strip CRs themselves, before parsing, to simplify the parsers.)

  • Added support for translations (localization) (#3559). Currently this only affects the LaTeX reader, for things like \figurename. Translation data files for 46 languages can be found in data/translations.

  • Make --ascii work with DocBook output too.

  • Rename --latex-engine to --pdf-engine, and --latex-engine-opt to --pdf-engine-opt.

  • Removed --parse-raw and readerParseRaw. These were confusing. Now we rely on the +raw_tex or +raw_html extension with latex or html input. Thus, instead of --parse-raw -f latex we use -f latex+raw_tex, and instead of --parse-raw -f html we use -f html+raw_html.

  • With --filter R filters are now recognized, even if they are not executable (#3940, #3941, Andrie de Vries).

  • Support SVG in PDF output, converting with rsvg2pdf (#179...

Read more

pandoc 1.19.2.1

03 Feb 10:00
@jgm jgm

Choose a tag to compare

  • Require skylighting >= 0.1.1.4.
  • Adjust test output for skylighting version.
  • Relax upper bounds on blaze-html and blaze-markup.