aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2020-12-14Merge pull request #6949 from wikey/patch-1John MacFarlane1-1/+1
typo
2020-12-14ImageSize: use exif width and height when available.John MacFarlane1-0/+13
After the move to JuicyPixels, we were getting incorrect width and heigh information for some images (see #6936, test-3.jpg). The correct information was encoded in Exif tags that JuicyPixels seemed to ignore. So we check these first before looking at the Width and Height identified by JuicyPixels. Closes #6936.
2020-12-14typoIan Sullivan1-1/+1
2020-12-13RST writer: better image handling.John MacFarlane3-20/+52
- An image alone in its paragraph (but not a figure) is now rendered as an independent image, with an `alt` attribute if a description is supplied. - An inline image that is not alone in its paragraph will be rendered, as before, using a substitution. Such an image cannot have a "center", "left", or "right" alignment, so the classes `align-center`, `align-left`, or `align-right` are ignored. However, `align-top`, `align-middle`, `align-bottom` will generate a corresponding `align` attribute. Closes #6948.
2020-12-13Merge pull request #6941 from tarleb/docx-rawJohn MacFarlane6-59/+97
Docx writer: keep raw openxml strings verbatim
2020-12-13ImageSize: use JuicyPixels to extract size...John MacFarlane1-305/+8
...for png, jpeg, gif, instead of doing our own binary parsing. See #6936.
2020-12-13Require binary >= 0.7.John MacFarlane1-1/+1
Needed for runGetOrFail.
2020-12-13ImageSize: use JuicyPixels to determine png size.John MacFarlane1-31/+19
2020-12-13Docx writer: keep raw openxml strings verbatim.Albert Krewinkel6-2/+24
Closes: #6933
2020-12-13Docx writer: use Content instead of Element.Albert Krewinkel1-59/+75
2020-12-12Merge pull request #6946 from mb21/icml-image-fitJohn MacFarlane4-1/+13
ICML writer: fix image bounding box for custom widths/heights
2020-12-12LaTeX writer: extract table handling into separate module.Albert Krewinkel6-237/+359
2020-12-12ICML writer: fix image bounding box for custom widths/heightsmb214-1/+13
fixes #6936
2020-12-10HTML reader: pay attention to lang attributes on body.John MacFarlane1-3/+6
These (as well as lang attributes on html) should update lang in metadata. See #6938.
2020-12-10HTML reader: retain attribute prefixes and avoid duplicates.John MacFarlane4-29/+29
Previously we stripped attribute prefixes, reading `xml:lang` as `lang` for example. This resulted in two duplicate `lang` attributes when `xml:lang` and `lang` were both used. This commit causes the prefixes to be retained, and also avoids invald duplicate attributes. Closes #6938.
2020-12-10cabal: remove -Werror=missing-home-modules.John MacFarlane1-6/+0
It causes problems using cabal repl.
2020-12-10RELEASE-CHECKLIST: add suggestion to use policeman.John MacFarlane1-1/+1
2020-12-10Move executable to app directory.John MacFarlane2-1/+1
Otherwise we have problems with cabal repl.
2020-12-10Add sourcepos extension for commonmarkeJohn MacFarlane5-6/+20
* Add `Ext_sourcepos` constructor for `Extension`. * Add `sourcepos` extension (only for commonmark). * Bump to 2.11.3 With the `sourcepos` extension set set, `data-pos` attributes are added to the AST by the commonmark reader. No other readers are affected. The `data-pos` attributes are put on elements that accept attributes; for other elements, an enlosing Div or Span is added to hold the attributes. Closes #4565.
2020-12-10Commonmark reader: refactor specFor, set input name to "".John MacFarlane1-2/+8
2020-12-10cabal.project: disable installation of citeproc from sourceAlbert Krewinkel1-4/+4
2020-12-09Use latest citeproc release.John MacFarlane2-5/+5
2020-12-08Document that --number-sections works in ms.John MacFarlane1-2/+2
Closes #6935.
2020-12-07Parsing: Small code improvements.John MacFarlane1-3/+4
2020-12-07LaTeX template: include csquotes package if csquotes variable set.John MacFarlane1-0/+3
2020-12-07Parsing: More minor performance improvements.John MacFarlane1-10/+13
2020-12-07Small efficiency improvement in uri parserJohn MacFarlane1-1/+14
2020-12-07Bibtex parser: avoid noneOf.John MacFarlane1-2/+2
2020-12-07Parsing: in nonspaceChar use satisfy instead of oneOf.John MacFarlane1-1/+7
For efficiency.
2020-12-07Dokuwiki reader: handle unknown interwiki links better.John MacFarlane1-1/+1
DokuWiki lets the user define his own Interwiki links. Previously pandoc reacted to these by emitting a google search link, which is not helpful. Instead, we now just emit the full URL including the wikilink prefix, e.g. `faquk>FAQ-mathml`. This at least gives users the ability to modify the links using filters. Closes #6932.
2020-12-07Merge pull request #6922 from jtojnar/db-writer-admonitionsJohn MacFarlane2-19/+111
Docbook writer: handle admonitions
2020-12-07Docbook writer: Handle admonition titles from Markdown readerJan Tojnar2-0/+16
Docbook reader produces a `Div` with `title` class for `<title>` element within an “admonition” element. Markdown writer then turns this into a fenced div with `title` class attribute. Since fenced divs are block elements, their content is recognized as a paragraph by the Markdown reader. This is an issue for Docbook writer because it would produce an invalid DocBook document from such AST – the `<title>` element can only contain “inline” elements. Let’s handle this invalid special case separately by unwrapping the paragraph before creating the `<title>` element.
2020-12-07Docbook writer: Use correct id attribute consistentlyJan Tojnar1-10/+16
DocBook5 should always use xml:id instead of id so let’s use it everywhere.
2020-12-07Docbook writer: handle admonitionsJan Tojnar2-12/+82
Similarly to https://github.com/jgm/pandoc/commit/d6fdfe6f2bba2a8ed25d6c9f11861774001f7a91, we should handle admonitions.
2020-12-05Org reader: preserve targets of spurious linksAlbert Krewinkel2-7/+8
Links with (internal) targets that the reader doesn't know about are converted into emphasized text. Information on the link target is now preserved by wrapping the text in a Span of class `spurious-link`, with an attribute `target` set to the link's original target. This allows to recover and fix broken or unknown links with filters. See: #6916
2020-12-05OpenDocument writer: Allow references for internal links (#6774)Nils Carlson4-18/+177
This commit adds two extensions to the OpenDocument writer, `xrefs_name` and `xrefs_number`. Links to headings, figures and tables inside the document are substituted with cross-references that will use the name or caption of the referenced item for `xrefs_name` or the number for `xrefs_number`. For the `xrefs_number` to be useful heading numbers must be enabled in the generated document and table and figure captions must be enabled using for example the `native_numbering` extension. In order for numbers and reference text to be updated the generated document must be refreshed. Co-authored-by: Nils Carlson <nils.carlson@ludd.ltu.se>
2020-12-05LaTeX reader: don't apply theorem default styling to a figure inside.John MacFarlane2-0/+35
If we put an image in italics, then when rendering to Markdown we no longer get an implicit figure. Closes #6925.
2020-12-04Docbook writer: add XML namespaces to top-level elements (#6923)Jan Tojnar1-8/+20
Previously, we only added xmlns attributes to chapter elements, even when running with --top-level-division=section. Let’s add the namespaces to part and section elements too, when they are the selected top-level divisions. We do not need to add namespaces to documents produced with --standalone flag, since those will already have xmlns attribute on the root element in the template.
2020-12-04Markdown writer: ensure that a new csl-block begins on a new line.John MacFarlane2-3/+10
This just looks better and doesn't affect the semantics. See #6921.
2020-12-04LaTeX writer: Fix bug with nested csl- display Spans.John MacFarlane1-36/+32
See #6921.
2020-12-04HTML writer: Fix handling of nested csl- display spans.John MacFarlane1-20/+12
Previously inner Spans used to represent CSL display attributes were not rendered as div tags. See #6921.
2020-12-03EPUB writer: include title page in landmarks.John MacFarlane2-3/+9
Closes #6919. Note that the toc is also included if `--toc` is specified.
2020-12-03EPUB writer: add frontmatter type on body element for nav.xhtml.John MacFarlane1-1/+3
Closes #6918.
2020-12-03Docx writer: Support bold and italic in "complex script."John MacFarlane4-2/+6
Previously bold and italics didn't work properly in LTR text. This commit causes the w:bCs and w:iCs attributes to be used, in addition to w:b and w:i, for bold and italics respectively. Closes #6911.
2020-12-02Add translations zh-Hans.yaml and zh-Hant.yaml Kolen Cheung2-0/+44
Closes #6904, closes #6909. Co-authored-by: taotieren <admin@taotieren.com>
2020-12-02filters.md: document a new Pandoc filtering framework (#6908)Randolf J1-6/+9
2020-12-02Citeproc: ensure that BCP47 lang codes can be used.John MacFarlane1-2/+17
We ignore the variants and just use the base lang code and country code when passing off to citeproc.
2020-11-30Use a more recent stack resolver.John MacFarlane1-5/+1
2020-11-30Use doctemplates 0.8.3.John MacFarlane1-1/+1
Fixes issues with nested for loops in templates.
2020-11-29LaTeX reader: don't parse `\rule` with width 0 as horizontal rule.John MacFarlane1-1/+11