tufte icon indicating copy to clipboard operation
tufte copied to clipboard

Broken citation formats in html

Open TomBener opened this issue 3 years ago • 3 comments

On 2022-06-15, I cloned the repo and knit skeleton.Rmd to html. However, It looks weird. In the following screenshot, texts following the citation [@R-base] were rendered as italic, and the reference in the sidenote was not correct. In the example page, It is “R Core Team. 2021. R: A Language and Environment for Statistical Computing. Vienna, Austria: R Foundation for Statistical Computing. https://www.r-project.org/.”

CleanShot 2022-06-15 at 16 05 35@2x

Some information on my test:

  • OS: macOS 12.4
  • Pandoc version: 2.18
  • R: 4.2.0
  • rmarkdown: 2.14

Furthermore, I create a new .Rmd file. And it encountered similar issues. Some references did not appear on the right side, and a few bibliographies were split arbitrarily. In addition, some texts were hyperlinked incorrectly.

CleanShot 2022-06-15 at 16 28 46@2x

I’m not sure if the package has any bug. Could you please help with this?

By the way, pandoc-citeproc seems to be deprecated, but the manual page mentioned that pandoc-citeproc should be at least 0.7.2. Please update it. Thanks.

TomBener avatar Jun 15 '22 08:06 TomBener

Thanks for the report. I believe this is linked to https://github.com/rstudio/rmarkdown/issues/2369 and I think I need to fix it in rmarkdown

To confirm this is the issue, you can do this

output:
  tufte::tufte_html: 
    pandoc_args: '--wrap=none'

This should make everything right.

By the way, pandoc-citeproc seems to be deprecated, but the manual page mentioned that pandoc-citeproc should be at least 0.7.2. Please update it. Thanks.

I added mention of Pandoc 2.11 and above. i'll update the doc once I fixed in rmarkdown

cderv avatar Jun 15 '22 14:06 cderv

output:
  tufte::tufte_html: 
    pandoc_args: '--wrap=none'

Thanks, it works well!

TomBener avatar Jun 16 '22 01:06 TomBener

Good. That means it is the issue. I need to add this internally so that a user doesn't have to set it.

For the context, this is due to a Pandoc change that modify the default for this behavior so we need to adjust. Getting back to an older Pandoc is also a workaround.

cderv avatar Jun 16 '22 08:06 cderv

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary.

github-actions[bot] avatar Apr 04 '23 03:04 github-actions[bot]