Correctly move references in margin with Pandoc 2.11 new citeproc #86
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This will close #85
First change is to take into account the new classes added by Pandoc. Ex:
Second change is that new citeproc will generate two links, e.g Allaire et al. (2020)
Previously with Pandoc 2.7, we had only one, e.g Allaire et al. (2020)
And tufte seems to support from a long time now, merging links (d6a5748) - it seems to be for 2016a, so year with suffix.
@yihui, I tried to follow the same logic with regex (and it is a use case for regexec maybe?).
However, I wonder if we should not have a condition on
rmarkdown::pandoc_available("2.11")
to have a new regex for new citeproc. Two processing for this, depending on the Pandoc version.In fact, I am not sure if there won't be more than 2 links sometimes. How do I generate a reference entry with a alphatetic suffix to try with Pandoc 2.11 ?
Also, with this PR, the linked will be merged and, with Pandoc 2.11+, we will have the toggle logic to apply on the all Name + year (
Allaire et al. (2020)
) and not just the year as before.With Pandoc 2.11:
With Pandoc 2.7.3:
I left this PR as a draft as I am not sure of the fix and this need to be tested with alphabetic suffix