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

Support for note style in CSL - currently double citation is created on hover #423

Closed
sj-io opened this issue Nov 8, 2021 · 6 comments · Fixed by #440
Closed

Support for note style in CSL - currently double citation is created on hover #423

sj-io opened this issue Nov 8, 2021 · 6 comments · Fixed by #440
Labels
bug 🐛 Something isn't working

Comments

@sj-io
Copy link

sj-io commented Nov 8, 2021

Hey y'all! I'm trying to use a custom CSL for some blog posts so citations render as footnote-style instead of author-date format. I downloaded the Chicago Manual of Style 17th edition (note, with Ibid.) CSL file and added it to the folder for my post. When I began citing, distill automatically created a references.bib file to the folder. My YAML looks like:

---
title: "Post Title"
description: |
  Post description.
date: 2021-11-02
output:
  distill::distill_article:
    self_contained: false
csl: chicago-note-bibliography-with-ibid.csl
bibliography: references.bib
---

The citations format correctly in text, but on hover there are two pop-ups:

Screen Shot 2021-11-02 at 10 11 35 PM

In other posts I used an earlier version of this CSL, the Chicago Manual of Style 16th edition (full note), and had the same issue.

Thanks!

@cderv cderv added the bug 🐛 Something isn't working label Nov 9, 2021
@cderv cderv moved this to Backlog in R Markdown Team Projects Nov 9, 2021
@cderv
Copy link
Collaborator

cderv commented Feb 2, 2022

Thanks for the report and sorry for the delay. I believe this happens because Pandoc's handles directly CSL of note style citation
https://pandoc.org/MANUAL.html#citations-in-note-styles
It will put them as footnote.

As distill will use inline hoverable style for all citation and put any footnotes as hoverable inline too, it is processed twice currently. One of the processing should not be done. I'll see if we can deactivate the one in Pandoc, otherwise distill will have to adjust to this.

So basically, currently, distill does not support note style CSL.

@cderv cderv changed the title Doubled citation on hover when using custom CSL Support for note style in CSL - currently double citation is created on hover Feb 2, 2022
@cderv
Copy link
Collaborator

cderv commented Feb 3, 2022

@sj-io can you try

remotes::install_github("rstudio/distill#440")

I have added a small JS tweak to only show on hover the distill usual reference tooltip.

The reference in footnote should still be kept.

Thanks for testing before I merge.

@cderv cderv moved this from Backlog to In Progress in R Markdown Team Projects Feb 3, 2022
@sj-io
Copy link
Author

sj-io commented Feb 4, 2022 via email

@cderv
Copy link
Collaborator

cderv commented Feb 7, 2022

Great !

Regarding color, it does not seem like distill is using hyperlink blue for footnotes when I look at demo doc:
https://rstudio.github.io/distill/basics.html#footnotes-and-asides

Is it in your site ?

@sj-io
Copy link
Author

sj-io commented Feb 20, 2022

Sorry for the delay in response. So the color isn't hyperlink blue, but it is some bluish color that's definitely different from color of the main text. Still, I don't think it's a major issue and I'd consider my problem resolved. Thanks for all the help!

@sj-io sj-io closed this as completed Feb 20, 2022
Repository owner moved this from In Progress to Done in R Markdown Team Projects Feb 20, 2022
@cderv
Copy link
Collaborator

cderv commented Feb 28, 2022

Great. Thanks for the confirmation, I have merged the PR now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants