aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2019-09-05Add dependency on skylighting-core in cabal file.John MacFarlane1-0/+1
Closes #5729.
2019-09-05Small cleanups in Makefile.John MacFarlane3-8/+7
2019-09-05Makefile - remove references to obsolete flag.John MacFarlane1-3/+3
See #5694.
2019-09-05Add CSS for hanging-indent div to epub.css.John MacFarlane1-0/+1
This is for hanging indents with pandoc-citeproc, to be supported in a later release.
2019-09-05Add div.hanging-indent CSS to HTML templates.John MacFarlane8-0/+8
2019-09-05Add partial styles.html in HTML5 template.John MacFarlane18-241/+179
Avoid duplication in HTML templates by using styles.html partial. Change indentation of styles in template.
2019-09-05Roff reader: improve handling of groups.John MacFarlane1-4/+2
2019-09-04asciidoc writer: don't include `+` in code blocks for regular asciidoc.John MacFarlane2-8/+13
This is asciidoctor-specific. Amends 98ee6ca289ad7117b7336a57bcfc6f4b54463f4e.
2019-09-04Roff reader: Fix problem parsing comments before macro.John MacFarlane1-2/+0
2019-09-04Roff reader: more improvements in parsing conditionals.John MacFarlane1-3/+4
2019-09-04Roff readers: better parsing of groups.John MacFarlane3-10/+13
We now allow groups where the closing `\\}` isn't at the beginning of a line. Closes #5410.
2019-09-03SelfContained: omit content-type on type attribute for `<style>`.John MacFarlane1-5/+8
It doesn't seem to be valid for HTML5, and as a result Chrome ignores the style element. Closes #5725.
2019-09-03Further mod to hanging indent code in latex template.John MacFarlane1-2/+0
Make sure the length is always defined.
2019-09-03Slight improvements to hanging indent code in latex template.John MacFarlane1-4/+7
See jgm/pandoc-citeproc#410.
2019-09-03XML: change toEntities to emit numerical hex character references.John MacFarlane2-4/+5
Previously decimal references were used. But Polyglot Markup prefers hex. See #5718. This affects the output of pandoc with `--ascii`.
2019-09-02LaTeX writer: use `cslreferences` environment for csl bibliographies.John MacFarlane2-3/+25
this allows bibliographies to receive special formatting. The template now contains definition of this environment (enabled only when CSL is used). It also defines a `\cslhangindent` length. This is set to 2em by default when the bibliography style specifies a hanging indent. To override the length, you can use e.g. \setlength{\cslhangindent}{7em} in header-includes. Closes jgm/pandoc-citeproc#410.
2019-09-02Use latest pandoc-citeproc.John MacFarlane2-2/+2
2019-09-02LaTeX reader: don't try to parse includes if raw_tex is set.John MacFarlane2-10/+15
When the `raw_tex` extension is set, we just carry through `\usepackage`, `\input`, etc. verbatim as raw LaTeX. Closes #5673.
2019-09-02HTML writer: use numeric character references with `--ascii`.John MacFarlane2-7/+3
Previously we used named character references with html5 output. But these aren't valid XML, and we aim to produce html5 that is also valid XHTML (polyglot markup). (This is also needed for epub3.) Closes #5718.
2019-09-02LaTeX reader: properly handle optional arguments for macros.John MacFarlane3-2/+10
Closes #5682.
2019-09-02LaTeX writer: strip off `{}` around locator for biblatex/natbib output.John MacFarlane1-1/+7
Closes #5722.
2019-09-02Use doctemplates 0.6.John MacFarlane3-9/+2
2019-08-31html2pdf: ensure temp file is deleted...John MacFarlane1-34/+35
even if the pdf program is not found. Closes #5720.
2019-08-27LaTeX reader: fix `\\` in `\parbox` inside a table cell.John MacFarlane2-3/+31
Closes #5711.
2019-08-27Markdown reader: Headers: don't parse content over newline boundary.John MacFarlane2-4/+28
Closes #5714.
2019-08-27Add stateAllowLineBreaks to ParserState. [API change]John MacFarlane1-0/+2
2019-08-27PowerPoint writer: Start numbering at appopriate numbers.Jesse Rosenthal5-4/+21
Starting numbers for ordered lists were previously ignored. Now we specify the number if it is something other than 1. Closes: #5709
2019-08-26Comment out ghc 8.8.1 build for now.John MacFarlane1-1/+2
2019-08-26Simplify stack.yaml after cabal file changes.John MacFarlane1-1/+1
We don't need so many local ghc options now that they're specified in pandoc.cabal. I've kept `-fhide-source-paths` (in case we move this out of pandoc.cabal) and `-Wno-missing-home-modules` (which seems to be needed for `stack ghci` to work).
2019-08-26Cabal cleanup (#5693)Albert Krewinkel2-24/+11
* pandoc.cabal: remove conditionals for ghc < 8.0. Support for GHC 7.10 has been dropped. * pandoc.cabal: compile with `-Wcpp-undef` when possible * pandoc.cabal: compile with `-fhide-source-paths` if possible
2019-08-26parseFromString': reset stateLastStrPos to Nothing before parse.John MacFarlane1-0/+1
2019-08-26Use parseFromString' in Muse reader.John MacFarlane1-1/+1
Now that it is polymorphic, this is possible, and it's a better choice because it resets last string pos.
2019-08-26Fix inline parsing in grid table cells.John MacFarlane3-16/+18
* T.P.Parsing: Change type of `setLastStrPos` so it takes a `Maybe SourcePos` rather than a `SourcePos`. [API change] * T.P.Parsing: Make `parseFromString'` and `gridTableWith` and `gridTableWith'` polymorphic in the parser state, constraining it with `HasLastStrPosition`. [API change] Closes #5708.
2019-08-26Add test for issue #5708.John MacFarlane1-0/+12
2019-08-26Add ghc 8.8.1 to CI.John MacFarlane1-0/+7
2019-08-25Use dev version of doctemplates.John MacFarlane2-1/+7
2019-08-25Better message for PandocTemplateError.John MacFarlane1-1/+1
2019-08-25Makefile: add ghcid target.John MacFarlane1-1/+4
2019-08-25Update cabal.project to use released doctemplates.John MacFarlane1-5/+0
2019-08-25Use new doctemplates, doclayout.John MacFarlane61-3737/+3212
+ Remove Text.Pandoc.Pretty; use doclayout instead. [API change] + Text.Pandoc.Writers.Shared: remove metaToJSON, metaToJSON' [API change]. + Text.Pandoc.Writers.Shared: modify `addVariablesToContext`, `defField`, `setField`, `getField`, `resetField` to work with Context rather than JSON values. [API change] + Text.Pandoc.Writers.Shared: export new function `endsWithPlain` [API change]. + Use new templates and doclayout in writers. + Use Doc-based templates in all writers. + Adjust three tests for minor template rendering differences. + Added indentation to body in docbook4, docbook5 templates. The main impact of this change is better reflowing of content interpolated into templates. Previously, interpolated variables were rendered independently and intepolated as strings, which could lead to overly long lines. Now the templates interpolated as Doc values which may include breaking spaces, and reflowing occurs after template interpolation rather than before.
2019-08-25Got benchmarks working with ipynb.John MacFarlane1-2/+17
2019-08-25Don't add a newline if there's already one.John MacFarlane1-4/+5
2019-08-24Change optMetadataFile type from Maybe to List (#5702)Owen McGrath8-12/+25
Changed optMetadataFile from `Maybe FilePath` to `[FilePath]`. This allows for multiple YAML metadata files to be added. The new default value has been changed from `Nothing` to `[]`. To account for this change in `Text.Pandoc.App`, `metaDataFromFile` now operates on two `mapM` calls (for `readFileLazy` and `yamlToMeta`) and a fold. Added a test (command/5700.md) which tests this functionality and updated MANUAL.txt, as per the contributing guidelines. With the current behavior, using `foldr1 (<>)`, values within files specified first will be used over those in later files. (If the reverse of this behavior would be preferred, it should be fixed by changing foldr1 to foldl1.)
2019-08-23Use released pandoc-types.John MacFarlane2-6/+1
2019-08-23Require pandoc-types 1.17.6.John MacFarlane1-2/+2
2019-08-23Add test for #5690.John MacFarlane1-0/+16
2019-08-23Asciidoc writer: handle admonitions.John MacFarlane1-3/+22
Closes #5690.
2019-08-23RST reader: use title, not admonition-title, for admonition title.John MacFarlane1-1/+1
This puts RST reader into alignment with docbook reader.
2019-08-23Ensure proper nesting when we have long ordered list markers.John MacFarlane2-2/+16
Closes #5705.
2019-08-23docbook: richer parse for admonitions (#5593)Michael Peyton Jones1-16/+27
Fixes #1234. This parses admonitions not as a blockquote, but rather as a div with an appropriate class. We also handle titles for admonitions as a nested div with the "title" class. (I followed the behaviour of other docbook-to-html converters in this - there are clearly other ways you could encode it.) In general, the handling of elements with nested title elements is very inconsistent. I think we should make it consistent, but I'm leaivng that for later to make this a small change. Example: ```docbook <warning xml:id="someId"> <title>My title</title> <simpara>An admonition block</simpara> </warning> ``` goes to ```html <div id="someId" class="warning"> <div class="title">My title</div> <p>An admonition block</p> </div> ```