No description
Find a file
John MacFarlane e0984a43a9 Add built-in citation support using new citeproc library.
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-21 10:15:50 -07:00
.circleci Comment out ghc 8.8.1 build for now. 2019-08-26 18:12:59 -07:00
.github Add built-in citation support using new citeproc library. 2020-09-21 10:15:50 -07:00
benchmark Fix hlint suggestions, update hlint.yaml (#6680) 2020-09-13 07:48:14 -07:00
citeproc/biblatex-localization Add built-in citation support using new citeproc library. 2020-09-21 10:15:50 -07:00
data Add built-in citation support using new citeproc library. 2020-09-21 10:15:50 -07:00
doc doc/org.md: add section on handling of unknown directives 2020-09-21 11:35:28 +02:00
linux Add built-in citation support using new citeproc library. 2020-09-21 10:15:50 -07:00
macos Add built-in citation support using new citeproc library. 2020-09-21 10:15:50 -07:00
man update date, man page, README. 2020-07-23 17:56:12 -07:00
prelude Use implicit Prelude (#6187) 2020-03-15 09:45:44 -07:00
src/Text Add built-in citation support using new citeproc library. 2020-09-21 10:15:50 -07:00
test Add built-in citation support using new citeproc library. 2020-09-21 10:15:50 -07:00
tools make changes_github: use details tag to make changelog collapsible. 2020-03-15 11:23:55 -07:00
trypandoc Fix trypandoc in response to d8ad766d17 2020-08-07 09:39:23 -07:00
windows Add built-in citation support using new citeproc library. 2020-09-21 10:15:50 -07:00
.editorconfig .editorconfig: change tests/ to test/ as in 18ab864 2017-10-26 22:34:36 -07:00
.gitattributes Added .gitattributes. 2019-09-15 10:40:59 -07:00
.gitignore .gitignore: ignore stack.yaml.lock 2020-08-15 13:54:12 +02:00
.hlint.yaml Lua filters: add SimpleTable for backwards compatibility (#6575) 2020-09-20 15:48:31 -07:00
.mailmap Add .mailmap 2019-01-07 08:44:40 +03:00
.stylish-haskell.yaml More spellcheck 2018-07-02 19:07:28 +03:00
.travis.yml Add built-in citation support using new citeproc library. 2020-09-21 10:15:50 -07:00
AUTHORS.md Update changelog and bump to 2.10.1. 2020-07-23 17:30:57 -07:00
BUGS
cabal.project Add built-in citation support using new citeproc library. 2020-09-21 10:15:50 -07:00
changelog.md Update changelog. 2020-07-23 18:27:56 -07:00
CONTRIBUTING.md Remove Circle CI badge, references 2020-09-01 12:00:38 +02:00
COPYING.md
COPYRIGHT Update copyright year (#6186) 2020-03-13 09:52:47 -07:00
INSTALL.md doc: fix FreeBSD port link (#6422) 2020-06-07 17:34:14 -07:00
Makefile Fix pandoc-templates target to include all partials. 2020-09-15 10:35:32 -07:00
MANUAL.txt Add built-in citation support using new citeproc library. 2020-09-21 10:15:50 -07:00
pandoc.cabal Add built-in citation support using new citeproc library. 2020-09-21 10:15:50 -07:00
pandoc.hs Update copyright year (#6186) 2020-03-13 09:52:47 -07:00
README.md Remove Circle CI badge, references 2020-09-01 12:00:38 +02:00
README.template Remove Circle CI badge, references 2020-09-01 12:00:38 +02:00
RELEASE-CHECKLIST Slight tweak to RELEASE_CHECKLIST 2019-12-05 12:40:17 -08:00
Setup.hs Removed custom Setup.hs, use build-type: simple. 2019-01-02 17:02:02 -08:00
stack.yaml Add built-in citation support using new citeproc library. 2020-09-21 10:15:50 -07:00

Pandoc

github
release hackage
release homebrew stackage LTS
package CI
tests license pandoc-discuss on google
groups

The universal markup converter

Pandoc is a Haskell library for converting from one markup format to another, and a command-line tool that uses this library. It can convert from

It can convert to

Pandoc can also produce PDF output via LaTeX, Groff ms, or HTML.

Pandocs enhanced version of Markdown includes syntax for tables, definition lists, metadata blocks, footnotes, citations, math, and much more. See the Users Manual below under Pandocs Markdown.

Pandoc has a modular design: it consists of a set of readers, which parse text in a given format and produce a native representation of the document (an abstract syntax tree or AST), and a set of writers, which convert this native representation into a target format. Thus, adding an input or output format requires only adding a reader or writer. Users can also run custom pandoc filters to modify the intermediate AST (see the documentation for filters and Lua filters).

Because pandocs intermediate representation of a document is less expressive than many of the formats it converts between, one should not expect perfect conversions between every format and every other. Pandoc attempts to preserve the structural elements of a document, but not formatting details such as margin size. And some document elements, such as complex tables, may not fit into pandocs simple document model. While conversions from pandocs Markdown to all formats aspire to be perfect, conversions from formats more expressive than pandocs Markdown can be expected to be lossy.

Installing

Heres how to install pandoc.

Documentation

Pandocs website contains a full Users Guide. It is also available here as pandoc-flavored Markdown. The website also contains some examples of the use of pandoc and a limited online demo.

Contributing

Pull requests, bug reports, and feature requests are welcome. Please make sure to read the contributor guidelines before opening a new issue.

License

© 2006-2020 John MacFarlane (jgm@berkeley.edu). Released under the GPL, version 2 or greater. This software carries no warranty of any kind. (See COPYRIGHT for full copyright and warranty notices.)