Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade pandoc to version 2.14 #425

Closed
wants to merge 5 commits into from
Closed

Conversation

dhimmel
Copy link
Member

@dhimmel dhimmel commented May 29, 2021

supersedes #386

new citeproc filter name

upgrade pandoc-xnos packages

refs tomduck/pandoc-fignos#85

upgrade panflute to 2.0.5

includes fix to manubot#386 (comment):
Element "MetaList" received "CSL_Item" but expected <class 'panflute.base.MetaValue'>

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
@dhimmel
Copy link
Member Author

dhimmel commented May 29, 2021

Could also make this pandoc 2.14 if conda-forge/pandoc-feedstock#90 is merged soon.

@AppVeyorBot
Copy link

AppVeyor build 1.0.234 for commit 57c9d4a is now complete.

Found 52 potential spelling error(s). Preview:content/02.delete-me.md:44:adipiscing
content/02.delete-me.md:44:aliqua
content/02.delete-me.md:44:amet
content/02.delete-me.md:44:consectetur
content/02.delete-me.md:44:dolore
content/02.delete-me.md:44:eiusmod
content/02.delete-me.md:44:elit
content/02.delete-me.md:44:incididunt
content/02.delete-me.md:44:ipsum
content/02.delete-me.md:44:labore
content/02.delete-me.md:44:Lorem
content/02.delete-me.md:44:magna
content/02...
The rendered manuscript from this build is temporarily available for download at:

@AppVeyorBot
Copy link

AppVeyor build 1.0.235 for commit 0881325 is now complete.

Found 52 potential spelling error(s). Preview:content/02.delete-me.md:44:adipiscing
content/02.delete-me.md:44:aliqua
content/02.delete-me.md:44:amet
content/02.delete-me.md:44:consectetur
content/02.delete-me.md:44:dolore
content/02.delete-me.md:44:eiusmod
content/02.delete-me.md:44:elit
content/02.delete-me.md:44:incididunt
content/02.delete-me.md:44:ipsum
content/02.delete-me.md:44:labore
content/02.delete-me.md:44:Lorem
content/02.delete-me.md:44:magna
content/02...
The rendered manuscript from this build is temporarily available for download at:

@AppVeyorBot
Copy link

AppVeyor build 1.0.236 for commit a6d315c is now complete.

Found 52 potential spelling error(s). Preview:content/02.delete-me.md:44:adipiscing
content/02.delete-me.md:44:aliqua
content/02.delete-me.md:44:amet
content/02.delete-me.md:44:consectetur
content/02.delete-me.md:44:dolore
content/02.delete-me.md:44:eiusmod
content/02.delete-me.md:44:elit
content/02.delete-me.md:44:incididunt
content/02.delete-me.md:44:ipsum
content/02.delete-me.md:44:labore
content/02.delete-me.md:44:Lorem
content/02.delete-me.md:44:magna
content/02...
The rendered manuscript from this build is temporarily available for download at:

@dhimmel
Copy link
Member Author

dhimmel commented May 29, 2021

This PR updates pandoc and it appears the tooltip plugin stops working. Take a look at https://ci.appveyor.com/api/buildjobs/v8df0g3o4vq6pagw/artifacts/manuscript-1.0.236-a6d315c.html.

The HTML for citations looks the same to me. With pandoc 2.13:

<p>Citation by DOI <span class="citation" data-cites="IhliSZDo">[<a href="#ref-IhliSZDo" role="doc-biblioref">1</a>]</span>.</p>

Before:

<p>Citation by DOI <span class="citation" data-cites="IhliSZDo">[<a href="#ref-IhliSZDo" role="doc-biblioref">1</a>]</span>.</p>

But the HTML for references has changed. Now:

<h2 class="page_break_before" id="references">References</h2>
<!-- Explicitly insert bibliography here -->
<div id="refs" class="references csl-bib-body" role="doc-bibliography">
<div id="ref-IhliSZDo" class="csl-entry" role="doc-biblioentry">
<div class="csl-left-margin">1. </div><div class="csl-right-inline"><strong>Sci-Hub provides access to nearly all scholarly literature</strong> <div class="csl-block">Daniel S Himmelstein, Ariel Rodriguez Romero, Jacob G Levernier, Thomas Anthony Munro, Stephen Reid McLaughlin, Bastian Greshake Tzovaras, Casey S Greene</div> <em>eLife</em> (2018-03-01) <a href="https://doi.org/ckcj">https://doi.org/ckcj</a> <div class="csl-block">DOI: <a href="https://doi.org/10.7554/elife.32822">10.7554/elife.32822</a> · PMID: <a href="https://www.ncbi.nlm.nih.gov/pubmed/29424689">29424689</a> · PMCID: <a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5832410">PMC5832410</a></div></div>
</div>

Before:

rootstock/manuscript.html

Lines 457 to 465 in 5be899e

<h2 class="page_break_before" id="references">References</h2>
<!-- Explicitly insert bibliography here -->
<div id="refs" class="references hanging-indent" role="doc-bibliography">
<div id="ref-IhliSZDo">
<p>1. <strong>Sci-Hub provides access to nearly all scholarly literature</strong> <br />
Daniel S Himmelstein, Ariel Rodriguez Romero, Jacob G Levernier, Thomas Anthony Munro, Stephen Reid McLaughlin, Bastian Greshake Tzovaras, Casey S Greene<br />
<em>eLife</em> (2018-03-01) <a href="https://doi.org/ckcj">https://doi.org/ckcj</a> <br />
DOI: <a href="https://doi.org/10.7554/elife.32822">10.7554/elife.32822</a> · PMID: <a href="https://www.ncbi.nlm.nih.gov/pubmed/29424689">29424689</a> · PMCID: <a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5832410">PMC5832410</a></p>
</div>

@vincerubinetti would you be able to take a look and see if the tooltip plugin needs any changes for the new HTML? If so, you can make a PR into this PR

@dhimmel dhimmel changed the title upgrade pandoc to version 2.13 upgrade pandoc to version 2.14 May 31, 2021
@manubot manubot deleted a comment from AppVeyorBot May 31, 2021
@AppVeyorBot
Copy link

AppVeyor build 1.0.242 for commit fd7ff49 is now complete.

Found 52 potential spelling error(s). Preview:content/02.delete-me.md:44:adipiscing
content/02.delete-me.md:44:aliqua
content/02.delete-me.md:44:amet
content/02.delete-me.md:44:consectetur
content/02.delete-me.md:44:dolore
content/02.delete-me.md:44:eiusmod
content/02.delete-me.md:44:elit
content/02.delete-me.md:44:incididunt
content/02.delete-me.md:44:ipsum
content/02.delete-me.md:44:labore
content/02.delete-me.md:44:Lorem
content/02.delete-me.md:44:magna
content/02...
The rendered manuscript from this build is temporarily available for download at:

@dhimmel
Copy link
Member Author

dhimmel commented May 31, 2021

I upgraded pandoc in this PR to 2.14 (release notes) which includes jgm/pandoc@3f09f53. We can use more recent HTML to prototype the tooltip updates.

Adding this note: the tooltip plugin doesn't have to work with both the new and old HTML. Working with the new alone is sufficient if that simplifies things.

@vincerubinetti
Copy link
Collaborator

@dhimmel will do this tomorrow 🤖

@AppVeyorBot
Copy link

AppVeyor build 1.0.243 for commit fe18096 is now complete.

Found 52 potential spelling error(s). Preview:content/02.delete-me.md:44:adipiscing
content/02.delete-me.md:44:aliqua
content/02.delete-me.md:44:amet
content/02.delete-me.md:44:consectetur
content/02.delete-me.md:44:dolore
content/02.delete-me.md:44:eiusmod
content/02.delete-me.md:44:elit
content/02.delete-me.md:44:incididunt
content/02.delete-me.md:44:ipsum
content/02.delete-me.md:44:labore
content/02.delete-me.md:44:Lorem
content/02.delete-me.md:44:magna
content/02...
The rendered manuscript from this build is temporarily available for download at:

@vincerubinetti
Copy link
Collaborator

vincerubinetti commented Jun 1, 2021

Some notes as I work through this:

needs to add "class".

if (id.indexOf("ref-") === 0) target = target.querySelector("p");
change querySelector("p") to querySelector(":nth-child(2)")

Table references are also broken:

image

"jump to" plugin broken for references:

image

And references CSS needs some tweaking. Indent is too large, and no spacing between entries.

@vincerubinetti
Copy link
Collaborator

vincerubinetti commented Jun 1, 2021

@dhimmel can you give me access to push commits to dhimmel:pandoc-2.13. There are more changes required here than I thought. Or perhaps you can do this PR as a branch instead of a fork.

@dhimmel
Copy link
Member Author

dhimmel commented Jun 2, 2021

@vincerubinetti perhaps you can create a branch based off of this PR's branch and then make as many commits as you'd like to that branch. I can then make the PR from your branch to dhimmel:pandoc-2.13.

Do you have your own fork of rootstock currently? If you have your own fork that you've cloned locally, then you can do:

git checkout -b dhimmel-pandoc-2.13 main
git pull https://github.com/dhimmel/manubot-rootstock.git pandoc-2.13
# make commits
# push

I want to avoid adding extra branches to this repo, since that can hamper the demonstrative nature of it. Let me know if you hit any snags. Happy to jump on a quick call to debug any git issues.

@vincerubinetti
Copy link
Collaborator

vincerubinetti commented Jun 2, 2021

Sorry for the delay, I needed to get Manubot actually running on my Windows machine before I could tackle this (was able to do that with WSL).

One thing I noticed is this (with all plugins and themes disabled):
image

id's are supposed to be unique to the document. This is an error in the table-nos plugin and I believe is what is causing the double anchors and buttons.

Edit: posting this here because not 100% sure it's table-nos and not something else in the manubot pandoc config

@vincerubinetti
Copy link
Collaborator

#427

@dhimmel
Copy link
Member Author

dhimmel commented Jun 3, 2021

Closing this, since we can merge #427 instead

@dhimmel dhimmel closed this Jun 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants