From 57c9d4ad99cc4ca547eef41cea1ed826b5fb0649 Mon Sep 17 00:00:00 2001 From: Daniel Himmelstein Date: Mon, 9 Nov 2020 21:26:24 -0500 Subject: [PATCH 01/10] upgrade pandoc to version 2.13 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit new citeproc filter name upgrade pandoc-xnos packages refs https://github.com/tomduck/pandoc-fignos/issues/85 upgrade panflute to 2.0.5 includes fix to https://github.com/manubot/rootstock/pull/386#issuecomment-724926969: Element "MetaList" received "CSL_Item" but expected pandoc html: disable document-css in template From pandoc 2.11 (2020-10-11) changelog: > Add CSS to default HTML template (#6601, Mauro Bieg). This greatly improves the default typography in pandoc’s HTML output. The CSS is sensitive to a number of variables (e.g. mainfont, fontsize, linestretch): see the manual for details. To restore the earlier, more spartan output, you can disable this with -M document-css=false. pandoc 2.11.3 https://github.com/jgm/pandoc/releases/tag/2.11.3 --- build/environment.yml | 16 ++++++++-------- build/pandoc/defaults/common.yaml | 2 +- build/pandoc/defaults/html.yaml | 1 + 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/build/environment.yml b/build/environment.yml index abee7fb1..247d9201 100644 --- a/build/environment.yml +++ b/build/environment.yml @@ -5,11 +5,10 @@ dependencies: - cairo=1.14.12 - cairocffi=0.8.0 - cffi=1.12.3 - - ghp-import=0.5.5 + - ghp-import=1.0.0 - jinja2=2.11.2 - jsonschema=3.2.0 - - pandoc=2.9.2 - - panflute=1.12.5 + - pandoc=2.11.3 - pango=1.40.14 - pip=20.2 - psutil=5.7.3 @@ -21,14 +20,15 @@ dependencies: - yamllint=1.25.0 - pip: - errorhandler==2.0.1 - - git+https://github.com/manubot/manubot@553090a16ac24a9fdc3f8df241a91b790c140865 + - git+https://github.com/manubot/manubot@01d69f066eaf6554111e6bcf197f7ee1fcfb240b - isbnlib==3.10.3 - opentimestamps-client==0.7.0 - opentimestamps==0.4.1 - - pandoc-eqnos==2.3.0 - - pandoc-fignos==2.3.1 - - pandoc-tablenos==2.2.2 - - pandoc-xnos==2.4.3 + - pandoc-eqnos==2.4.0 + - pandoc-fignos==2.4.0 + - pandoc-tablenos==2.3.0 + - pandoc-xnos==2.5.0 + - panflute==2.0.5 - pybase62==0.4.3 - pysha3==1.0.2 - python-bitcoinlib==0.10.2 diff --git a/build/pandoc/defaults/common.yaml b/build/pandoc/defaults/common.yaml index 12c0c343..bfa5d971 100644 --- a/build/pandoc/defaults/common.yaml +++ b/build/pandoc/defaults/common.yaml @@ -6,7 +6,7 @@ filters: - pandoc-eqnos - pandoc-tablenos - pandoc-manubot-cite -- pandoc-citeproc +- citeproc wrap: preserve metadata: csl: build/assets/style.csl diff --git a/build/pandoc/defaults/html.yaml b/build/pandoc/defaults/html.yaml index 50d29812..8aff336a 100644 --- a/build/pandoc/defaults/html.yaml +++ b/build/pandoc/defaults/html.yaml @@ -25,6 +25,7 @@ include-after-body: - build/plugins/mathjax.html #- build/plugins/scite.html variables: + document-css: false math: "" html-math-method: method: mathjax From 088132507f78348b72c2f34f8119bced45f59ddd Mon Sep 17 00:00:00 2001 From: Daniel Himmelstein Date: Sat, 29 May 2021 11:48:08 -0400 Subject: [PATCH 02/10] upgrade environment --- build/environment.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build/environment.yml b/build/environment.yml index 247d9201..7b0da108 100644 --- a/build/environment.yml +++ b/build/environment.yml @@ -20,15 +20,15 @@ dependencies: - yamllint=1.25.0 - pip: - errorhandler==2.0.1 - - git+https://github.com/manubot/manubot@01d69f066eaf6554111e6bcf197f7ee1fcfb240b + - git+https://github.com/manubot/manubot@2c028a7a87be24a76e2dec3ac7db6e8754ae6d4a - isbnlib==3.10.3 - opentimestamps-client==0.7.0 - opentimestamps==0.4.1 - - pandoc-eqnos==2.4.0 + - pandoc-eqnos==2.5.0 - pandoc-fignos==2.4.0 - pandoc-tablenos==2.3.0 - pandoc-xnos==2.5.0 - - panflute==2.0.5 + - panflute==2.1.0 - pybase62==0.4.3 - pysha3==1.0.2 - python-bitcoinlib==0.10.2 From a6d315c0f42db90a823e54c086e55066c8fd59c8 Mon Sep 17 00:00:00 2001 From: Daniel Himmelstein Date: Sat, 29 May 2021 11:57:41 -0400 Subject: [PATCH 03/10] CSL style: remove handing indent --- build/assets/style.csl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/assets/style.csl b/build/assets/style.csl index 942a0434..b836f7b9 100644 --- a/build/assets/style.csl +++ b/build/assets/style.csl @@ -47,7 +47,7 @@ - + From fd7ff49eb2f8e5eb355dc79a5c9ef132dea0f8a1 Mon Sep 17 00:00:00 2001 From: Daniel Himmelstein Date: Mon, 31 May 2021 15:44:38 -0400 Subject: [PATCH 04/10] update pandoc to 2.14 --- build/environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/environment.yml b/build/environment.yml index 7b0da108..40abf49e 100644 --- a/build/environment.yml +++ b/build/environment.yml @@ -8,7 +8,7 @@ dependencies: - ghp-import=1.0.0 - jinja2=2.11.2 - jsonschema=3.2.0 - - pandoc=2.11.3 + - pandoc=2.14 - pango=1.40.14 - pip=20.2 - psutil=5.7.3 From fe18096c82f00996b4cfe22b6f2401e282bc635d Mon Sep 17 00:00:00 2001 From: Daniel Himmelstein Date: Mon, 31 May 2021 19:08:06 -0400 Subject: [PATCH 05/10] USAGE: document curly-brace citation keys --- USAGE.md | 25 +++++++++++++++++-------- content/02.delete-me.md | 2 +- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/USAGE.md b/USAGE.md index 5bd004a1..4d2f9508 100644 --- a/USAGE.md +++ b/USAGE.md @@ -133,14 +133,23 @@ Note that multiple citations must be semicolon separated. Be careful not to cite the same study using identifiers from multiple sources. For example, the following citations all refer to the same study, but will be treated as separate references: `[@doi:10.7717/peerj.705; @pmc:PMC4304851; @pubmed:25648772]`. -Citation keys must adhere to the syntax described in the [Pandoc manual](https://pandoc.org/MANUAL.html#citations): - -> The citation key must begin with a letter, digit, or `_`, and may contain alphanumerics, `_`, and internal punctuation characters (`:.#$%&-+?<>~/`). - -To evaluate whether a citation key fully matches this syntax, try [this online regex](https://regex101.com/r/mXZyY2/latest). -If the citation key is not valid, use the [citation aliases](#citation-aliases) workaround below. -This is required for citation keys that contain forbidden characters such as `;` or `=` or end with a non-alphanumeric character such as `/`. - +The citation key syntax is described in the [Pandoc manual](https://pandoc.org/MANUAL.html#citations): + +> Unless a citation key start with a letter, digit, or `_`, +> and contains only alphanumerics and internal punctuation characters (`:.#$%&-+?<>~/`), +> it must be surrounded by curly braces, +> which are not considered part of the key. +> In `@Foo_bar.baz.`, the key is `Foo_bar.baz`. +> The final period is not *internal* punctuation, +> so it is not included in the key. +> In `@{Foo_bar.baz.}`, the key is `Foo_bar.baz.`, including the final period. +> The curly braces are recommended if you use URLs as keys: +> `[@{https://example.com/bib?name=foobar&date=2000}, p. 33]`. + +If a citation key does not fully match [this online regex](https://regex101.com/r/mXZyY2/latest) +(for example, contains characters such as `;` or `=` or end with a non-alphanumeric character such as `/`), +make sure to surround it with curly braces or use the [citation aliases](#citation-aliases) workaround below. + Prior to Rootstock commit [`6636b91`](https://github.com/manubot/rootstock/commit/6636b912c6b41593acd2041d34cd4158c1b317fb) on 2020-01-14, Manubot processed citations separately from Pandoc. Switching to a Pandoc filter improved reliability on complex documents, but restricted the syntax of citation keys slightly. diff --git a/content/02.delete-me.md b/content/02.delete-me.md index c2b1fd0c..387c467f 100644 --- a/content/02.delete-me.md +++ b/content/02.delete-me.md @@ -107,7 +107,7 @@ Citation by Wikidata ID [@wikidata:Q56458321]. Citation by ISBN [@isbn:9780262517638]. -Citation by URL [@https://greenelab.github.io/meta-review/]. +Citation by URL [@{https://greenelab.github.io/meta-review/}]. Citation by alias [@deep-review]. From b5233d9c9525d8c5579930bc89c141ecc989934c Mon Sep 17 00:00:00 2001 From: Vincent Rubinetti Date: Wed, 2 Jun 2021 18:27:59 -0400 Subject: [PATCH 06/10] upgrade pandoc to 2.13 and fix plugin breaks --- build/plugins/anchors.html | 3 ++- build/plugins/jump-to-first.html | 10 ++++++---- build/plugins/tooltips.html | 8 ++++---- build/themes/default.html | 13 ++++++++++--- 4 files changed, 22 insertions(+), 12 deletions(-) diff --git a/build/plugins/anchors.html b/build/plugins/anchors.html index 68f1225b..7149501b 100644 --- a/build/plugins/anchors.html +++ b/build/plugins/anchors.html @@ -10,7 +10,8 @@