aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2020-10-05Removed the idpred from metaValueToReference.John MacFarlane3-22/+13
This isn't really necessary; we do filtering at other points now.
2020-10-05Add yamlToRefs, yamlBsToRefs.John MacFarlane3-10/+74
T.P.Readers.Markdown now exports yamlToRefs. [API change] T.P.Readers.Metadata exports yamlBsToRefs. [API change] These allow specifying an id filter so we parse only references that are used in the document. Improves timing with a 3M yaml references file from 36s to 17s.
2020-10-05Improve searching for CSL files...John MacFarlane1-6/+15
...and CSL abbreviation files. Use resource path to search in both USERDATADIR/csl and USERDATADIR/csl/dependent. Also, add .csl or .json extension as needed, so you can just do --csl zoology.
2020-10-05Use yamlToMeta for yaml bibliographyJohn MacFarlane1-5/+4
This speeds up parsing of external yaml bibliographies considerably (in one test 36s -> 17s).
2020-10-05Add filtering to metaValueToReference, and check other-ids field too.John MacFarlane3-15/+26
2020-10-04doc/lua-filters.md: document Underline type and constructorAlbert Krewinkel1-0/+27
2020-10-04Try to fix Windows CI by installing happy first.John MacFarlane1-0/+1
We're having the build fail with ``` windows\ghc-8.6.5\mingw\bin\strip.exe: unable to rename 'C:\sr\snapshots\c886f694\bin\happy.exe'; reason: File exists ```
2020-10-04Sort languages in `--list-highlight-languages` output (#6718)Albert Krewinkel1-1/+1
Languages appear to be sorted by their long name, which leads to unexpected results: e.g., the long name of *m4* is *GNU m4*, so it is listed between *gnuassembler* and *go*.
2020-10-04Use HLint argument `--color=auto`Albert Krewinkel1-1/+1
Using `--color`, which is equivalent to `--color=always`, causes problems when used in situations where colors are not supported, e.g., in combination with Emacs. Detection of color-supporting environments seems reliable, so no adverse effects are expected from this change.
2020-10-03Use latest citeproc.John MacFarlane3-7/+9
Update chicago-fullnute-bibliography test, which is now correct.
2020-10-02Docx writer: better handle list items whose contents are lists (#6522)Michael Hoffmann4-3/+26
If the first element of a bulleted or ordered list is another list, then that first item will disappear if the target format is docx. This changes the docx writer so that it prepends an empty string for those cases. With this, no items will disappear. Closes #5948.
2020-10-01Update to lastest citeprocJohn MacFarlane5-6/+7
2020-10-01Syntax highlight for inline code of OpenDocument (#6711)niszet1-3/+18
To implement Syntax highlighting for OpenDocument, inlineToOpenDocument in OpenDocument Writer is updated based on Docx Writer. This commit is only for inline Code because update of CodeBlock needs structual change of output document. Currently, styles are not generated automatically in styles.xml. To implement it, additional commit for ODT Writer is needed. Although styles are not included in styles.xml, output file can be shown in LibreOffice(7.0.0.3) like normal characters.
2020-09-27Use latest citeproc.John MacFarlane2-2/+2
2020-09-27Fix redundant import warning.John MacFarlane1-1/+1
2020-09-27Use latest citeproc.John MacFarlane4-6/+5
2020-09-27OpenDocument Writer: Implement table cell alignment (#6700)Nils Carlson3-25/+98
Co-authored-by: Mauro Bieg <mb21@users.noreply.github.com>
2020-09-26Use latest citeproc.John MacFarlane2-2/+2
2020-09-26Use latest citeproc.John MacFarlane2-2/+2
2020-09-26Fix short-title.John MacFarlane2-24/+27
We were getting null short-titles generated, and that was creating wrong citations in some cases. Close #6702.
2020-09-25Allow `gfm_auto_identifiers`, `ascii_identifiers` extensions for docx.John MacFarlane1-1/+1
2020-09-25RST reader: apply `.. class::` directly to following Header.John MacFarlane2-1/+19
rather than creating a surrounding Div. Closes #6699.
2020-09-25Org reader: fix HLint warningsAlbert Krewinkel1-2/+2
2020-09-25doc/org.md: add section on tablesAlbert Krewinkel1-0/+28
2020-09-24Use latest citeproc commit.John MacFarlane2-3/+2
2020-09-24DocBook reader: Implement table cell alignment (#6698)Nils Carlson3-46/+88
2020-09-24Slight improvement to last commit.John MacFarlane1-1/+4
We now add a space only if there isn't already one. (Some styles add a space at the end of the left-margin div.)
2020-09-24Citeproc: Insert space after csl-left-margin span contents...John MacFarlane4-7/+21
if they come before csl-right-inline. This ensures that the citation number or label will be separated from the rest by a space, even in formats (like plain) that don't yet have special handling for the display spans.
2020-09-24OpenDocument writer: New table cell support with row and column spans (#6682)Nils Carlson2-26/+213
Unit tests only verify column spans at this point. Co-authored-by: Nils Carlson <nils.carlson@ludd.ltu.se>
2020-09-24Support toc-depth option for ODT writer (#6697)niszet2-1/+2
To support `--toc-depth` option for ODT, writer and template are updated. Closes #6696.
2020-09-23ALlow bytestring 0.11.x.John MacFarlane1-2/+2
2020-09-23Revert stack->cabal change in nightly.yml.John MacFarlane1-20/+21
2020-09-22release-candidate build: use latest stack on the runner.John MacFarlane1-57/+0
instead of installing from choco. Remove obsolete macos and win i386 sections.
2020-09-22Nightly process improvements.John MacFarlane1-33/+20
- Use cabal for windows. - Use most recent cabal/ghc. - Udd sha1 to executable name.
2020-09-22CI: use checkout@v2, and use haskell-setup to install stack.John MacFarlane2-10/+11
2020-09-21Add built-in citation support using new citeproc library.John MacFarlane312-303/+31826
This deprecates the use of the external pandoc-citeproc filter; citation processing is now built in to pandoc. * Add dependency on citeproc library. * Add Text.Pandoc.Citeproc module (and some associated unexported modules under Text.Pandoc.Citeproc). Exports `processCitations`. [API change] * Add data files needed for Text.Pandoc.Citeproc: default.csl in the data directory, and a citeproc directory that is just used at compile-time. Note that we've added file-embed as a mandatory rather than a conditional depedency, because of the biblatex localization files. We might eventually want to use readDataFile for this, but it would take some code reorganization. * Text.Pandoc.Loging: Add `CiteprocWarning` to `LogMessage` and use it in `processCitations`. [API change] * Add tests from the pandoc-citeproc package as command tests (including some tests pandoc-citeproc did not pass). * Remove instructions for building pandoc-citeproc from CI and release binary build instructions. We will no longer distribute pandoc-citeproc. * Markdown reader: tweak abbreviation support. Don't insert a nonbreaking space after a potential abbreviation if it comes right before a note or citation. This messes up several things, including citeproc's moving of note citations. * Add `csljson` as and input and output format. This allows pandoc to convert between `csljson` and other bibliography formats, and to generate formatted versions of CSL JSON bibliographies. * Add module Text.Pandoc.Writers.CslJson, exporting `writeCslJson`. [API change] * Add module Text.Pandoc.Readers.CslJson, exporting `readCslJson`. [API change] * Added `bibtex`, `biblatex` as input formats. This allows pandoc to convert between BibLaTeX and BibTeX and other bibliography formats, and to generated formatted versions of BibTeX/BibLaTeX bibliographies. * Add module Text.Pandoc.Readers.BibTeX, exporting `readBibTeX` and `readBibLaTeX`. [API change] * Make "standalone" implicit if output format is a bibliography format. This is needed because pandoc readers for bibliography formats put the bibliographic information in the `references` field of metadata; and unless standalone is specified, metadata gets ignored. (TODO: This needs improvement. We should trigger standalone for the reader when the input format is bibliographic, and for the writer when the output format is markdown.) * Carry over `citationNoteNum` to `citationNoteNumber`. This was just ignored in pandoc-citeproc. * Text.Pandoc.Filter: Add `CiteprocFilter` constructor to Filter. [API change] This runs the processCitations transformation. We need to treat it like a filter so it can be placed in the sequence of filter runs (after some, before others). In FromYAML, this is parsed from `citeproc` or `{type: citeproc}`, so this special filter may be specified either way in a defaults file (or by `citeproc: true`, though this gives no control of positioning relative to other filters). TODO: we need to add something to the manual section on defaults files for this. * Add deprecation warning if `upandoc-citeproc` filter is used. * Add `--citeproc/-C` option to trigger citation processing. This behaves like a filter and will be positioned relative to filters as they appear on the command line. * Rewrote the manual on citatations, adding a dedicated Citations section which also includes some information formerly found in the pandoc-citeproc man page. * Look for CSL styles in the `csl` subdirectory of the pandoc user data directory. This changes the old pandoc-citeproc behavior, which looked in `~/.csl`. Users can simply symlink `~/.csl` to the `csl` subdirectory of their pandoc user data directory if they want the old behavior. * Add support for CSL bibliography entry formatting to LaTeX, HTML, Ms writers. Added CSL-related CSS to styles.html.
2020-09-21Bump to 2.11.John MacFarlane1-1/+1
2020-09-21Markdown reader: Set citationNoteNum accurately in citations.John MacFarlane7-28/+49
This also changes stateLastNoteNumber -> stateNoteNumber.
2020-09-21Parsing: add stateInNote and stateLastNoteNumber to ParserState.John MacFarlane1-0/+4
These will be used to populate note numbers for citations.
2020-09-21Sort YAML metadata keys in Markdown output case-insensitive.John MacFarlane1-2/+2
Use caseFold.
2020-09-21Remove duplicate tshow definition.John MacFarlane1-3/+1
2020-09-21pandoc.cabal: sort build depends alphabetically (#6691)Albert Krewinkel1-96/+98
2020-09-21doc/org.md: add section on handling of unknown directivesAlbert Krewinkel1-0/+47
2020-09-20Lua filters: add SimpleTable for backwards compatibility (#6575)Albert Krewinkel10-7/+313
A new type `SimpleTable` is made available to Lua filters. It is similar to the `Table` type in pandoc versions before 2.10; conversion functions from and to the new Table type are provided. Old filters using tables now require minimal changes and can use, e.g., if PANDOC_VERSION > {2,10,1} then pandoc.Table = pandoc.SimpleTable end and function Table (tbl) tbl = pandoc.utils.to_simple_table(tbl) … return pandoc.utils.from_simple_table(tbl) end to work with the current pandoc version.
2020-09-20CI: bump tested GHC versions to 8.8.4 and 8.10.2Albert Krewinkel2-5/+4
Besides being newer, GHC version 8.10.2 comes preinstalled on GitHub Actions environments; using it slightly speeds up CI tests.
2020-09-20CI: remove duplicate build step on macOSAlbert Krewinkel1-6/+0
2020-09-20cabal.project: disallow base16-bytestring-1.*Albert Krewinkel1-0/+2
This is a temporary fix to work around a missing constraint in package text-conversions. It should be removed once a new revision or new version fixes the underlying issue.
2020-09-20cabal.project - use dev version of pandoc-citeproc.John MacFarlane1-1/+1
2020-09-20Use dev version of pandoc-citeproc.John MacFarlane1-1/+2
2020-09-20pandoc.cabal: allow hslua 1.2 againAlbert Krewinkel1-2/+2
Sporadic test failures also happen with hslua-1.1.*, so there is no need to exclude the newer version. This reverts commit 315b5a4836b477f2c176c7800e6c995ecb831194.