Commit graph

57 commits

Author SHA1 Message Date
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
John MacFarlane
c990027832 Linux rc build: use ghc-musl container.
This simplifies our build process a bit (over using
a customized alpine container).

Use new `--enable-executable-static` flag in build.

make_artifacts.sh: Fix deprecated find -perm syntax.
2020-08-11 21:33:21 -07:00
Albert Krewinkel
91f2bcfe73
linux/Dockerfile: upgrade to alpine 3.11
Closes: #6180
2020-03-10 15:18:30 +01:00
John MacFarlane
8d64cb6954 Use alpine 3.10 in building linux binary.
For some reason the bulid fails with alpine 3.11,
with a linker error finding -lz.  See #6003.
It would be good to figure out how to make it work
with alpine 3.11.
2019-12-22 09:26:29 -08:00
John MacFarlane
dd503df20a linux tarball: add architecture -amd64 to filename.
Now it will be: pandoc-VERSION-linux-ARCH.tar.gz
2019-10-04 22:00:17 -07:00
John MacFarlane
fe39bb009f Use -split-sections to reduce linux executable size. 2019-07-12 09:51:24 -07:00
John MacFarlane
16bf907252 Remove clone of pandoc-citeproc.
It wasn't being used; cabal.project specifies the version to use.
Closes #5366.
2019-03-14 10:11:11 -07:00
John MacFarlane
d7a13b4a58 linux/Dockerfile : use default -O1 instead of -O2. 2019-01-30 22:54:08 -08:00
John MacFarlane
473b4ad62d Update linux Dockerfile to use cabal new-build. 2018-11-26 23:15:06 -08:00
John MacFarlane
3af988a671 linux/Dockerfile - use resolver lts-12.12. 2018-11-03 21:08:12 -07:00
John MacFarlane
bf17af65a7 Fix bug in linux/Dockerfile. 2018-11-03 20:56:39 -07:00
John MacFarlane
23cd1c77a6 Fix bug in linux/Dockerfile. 2018-11-03 20:55:17 -07:00
John MacFarlane
3fbbdd92fb linux Dockerfile - use released static build of stack. 2018-10-18 10:31:16 -07:00
John MacFarlane
1cd03e30df linux/Dockerfile: Use more recent (unofficial) stack. 2018-09-16 19:42:08 -07:00
John MacFarlane
f9665d0f4a Linux Dockerfile: try upgrading stack. 2018-09-16 13:55:13 -07:00
John MacFarlane
5776e62edf Remove upx stuff from Dockerfile. 2018-09-16 13:53:43 -07:00
Josh
bf56181204 Remove duplicate instruction (#4796) 2018-07-30 10:28:39 -07:00
John MacFarlane
cccaf33e2d linux/Dockerfile: simplify and use new ghc 8.4.3. 2018-07-15 20:25:54 -07:00
John MacFarlane
9b92993a0a Dockerfile fixes.
Note that stack no longer provides a static binary, so we
use an older one from their GitHub releases.
2018-05-11 11:46:39 -07:00
John MacFarlane
317840ab0d Use latest haddock-library even for stack.lts9 build. 2018-04-24 12:35:03 -07:00
John MacFarlane
58534cc74e Revised Dockerfile for static linux build. 2018-04-23 22:43:10 -07:00
John MacFarlane
26fee8bfee dockerfile: upgrade stack. 2018-04-20 23:37:12 -07:00
John MacFarlane
999dd2a239 linux package build: use stack lts-9.
Also break up the build into three chunks for better
cacheability.
2017-12-28 09:25:01 -08:00
John MacFarlane
40a55728bb Docker build: upgrade stack first. 2017-12-27 20:55:15 -08:00
John MacFarlane
ffa3d7160e Removed stack.pkg.yaml.
We only really need stack.yaml; we can put flag settings
for pandoc-citeproc there.

Also use ghc-8.0.2 in dockerized linux build.  This is
the only version available for alpine so far.
2017-12-27 20:21:37 -08:00
John MacFarlane
3eaa6ff329 Add -linux suffix to linux tarball. 2017-10-30 23:02:45 -07:00
John MacFarlane
bcf982c083 Linux package build: ensure that pandoc-citeproc is statically linked. 2017-10-30 14:28:21 -07:00
Kolen Cheung
3f0ceaf6ee Use CamelCase for JavaScript for uniformity
other instances when javascript is refered to in pandoc is also in CamelCase, the official casing of JavaScript.
2017-10-26 22:43:19 -07:00
John MacFarlane
cb63678517 Removed linux Dockerfile.alpine (main Dockerfile already alpine). 2017-10-23 09:24:46 -07:00
John MacFarlane
33eff69047 Fixed make_tarball.sh to get VERSION set. 2017-10-22 21:41:23 -07:00
John MacFarlane
046e7b408a make_deb, make_tarball - fix default assignment of ARTIFACTS. 2017-10-22 21:19:17 -07:00
John MacFarlane
ccc09293c4 Updated linux Makefile to use alpine. 2017-10-22 15:05:29 -07:00
John MacFarlane
0463a57a5c Back to using alpine-based Dockerfile for linux build. 2017-10-22 15:04:49 -07:00
John MacFarlane
901c68a65f make_linux.sh tarball creation fix directory structure. 2017-10-22 14:50:42 -07:00
John MacFarlane
e720a44f68 Fixed bug in make_linux.sh path. 2017-10-22 14:30:49 -07:00
John MacFarlane
5a7a3f15d2 Linux package: new debian-based non-static build. 2017-10-22 14:29:20 -07:00
John MacFarlane
432be748ce Added linux/make_linux.sh.
This does a linux build and creates deb and tgz distributions.
2017-10-22 14:23:28 -07:00
John MacFarlane
d7917836f1 linux/Makefile - added interact target. 2017-09-19 16:17:06 -07:00
John MacFarlane
4170a18479 Another try to get linux static linking working again. 2017-09-05 08:36:13 -07:00
John MacFarlane
d02518bf1b Make sure bash is available in linux package build environment. 2017-09-04 21:54:53 -07:00
John MacFarlane
2637df2bdf Revert use of llvm backend in static linux build.
It was failing for reasons I couldn't diagnose.
2017-09-04 18:11:55 -07:00
John MacFarlane
aa90919fe9 Add 'static' Cabal flag, use it for linux statically linked. 2017-09-04 17:07:20 -07:00
John MacFarlane
fbb79c1bcd Strip executables in linux package. 2017-08-18 14:37:44 -07:00
John MacFarlane
48bb7abb2a linux/control.in: add Replaces:...
so existing pandoc-citeproc and pandoc-data packages will be
uninstalled; this package provides both.

Closes #3822.
2017-08-02 07:12:14 -07:00
rlpowell
2ae75e23dd Added TikiWiki reader (#3800)
Added TikiWiki reader, including tests and documentation.

It's probably not *complete*, but it works pretty well, handles all
the basics (and some not-so-basics).
2017-07-21 10:09:54 +02:00
John MacFarlane
9ac0a99292 Added mention of vimwiki raeder more places. 2017-06-20 16:57:39 +02:00
John MacFarlane
aface549a0 Mention muse reader in README, MANUAL, debian control, cabal description. 2017-06-19 10:50:59 +02:00
John MacFarlane
0a9368ee35 Debian control: updated description. 2017-05-15 17:06:41 +02:00
John MacFarlane
3d6bedff35 Debian control: added latex packages as 'suggested'. 2017-05-15 17:06:28 +02:00
John MacFarlane
ff991d1e21 Revert "Revert "Use file-embed instead of hsb2hs to embed data files.""
This reverts commit 1fa15c225b.
2017-04-02 23:10:10 +02:00