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

Encoding issue in vignette title check for html_vignette #1978

Closed
cderv opened this issue Dec 14, 2020 · 1 comment · Fixed by #1979
Closed

Encoding issue in vignette title check for html_vignette #1978

cderv opened this issue Dec 14, 2020 · 1 comment · Fixed by #1979
Labels
bug an unexpected problem or unintended behavior

Comments

@cderv
Copy link
Collaborator

cderv commented Dec 14, 2020

It seems there is an issue with encoding when comparing the vignette title field with the VignetteIndexEntry (Thanks @py-b for the report!)

Try this in test.Rmd

---
title: "Données disponibles"
output: rmarkdown::html_vignette
vignette: >
  %\VignetteIndexEntry{Données disponibles}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
---

# Something

Will give this warning at rendering.

Warning message:
The vignette title specified in \VignetteIndexEntry{} is different from the title in the YAML metadata. The former is "Données disponibles", and the latter is "Données disponibles". If that is intentional, you may set options(rmarkdown.html_vignette.check_title = FALSE) to suppress this check. 

The issue is with tools::vignetteInfo()

> tools::vignetteInfo("test.Rmd")
$file
[1] "test.Rmd"

$title
[1] "Données disponibles"

$depends
character(0)

$keywords
character(0)

$engine
[1] "knitr::rmarkdown"

We must work around this.

Session info

`xfun::session_info`
> xfun::session_info("rmarkdown")
R version 4.0.3 (2020-10-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19041), RStudio 1.4.1087

Locale:
  LC_COLLATE=French_France.1252 
  LC_CTYPE=French_France.1252   
  LC_MONETARY=French_France.1252
  LC_NUMERIC=C                  
  LC_TIME=French_France.1252    

Package version:
  base64enc_0.1.3      digest_0.6.27       
  evaluate_0.14        glue_1.4.2          
  graphics_4.0.3       grDevices_4.0.3     
  highr_0.8            htmltools_0.5.0.9003
  jsonlite_1.7.1       knitr_1.30          
  magrittr_2.0.1       markdown_1.1        
  methods_4.0.3        mime_0.9            
  rlang_0.4.9          rmarkdown_2.5       
  stats_4.0.3          stringi_1.5.3       
  stringr_1.4.0        tinytex_0.27.1      
  tools_4.0.3          utils_4.0.3         
  xfun_0.19            yaml_2.2.1          

Pandoc version: 2.11.2
@cderv cderv added the bug an unexpected problem or unintended behavior label Dec 14, 2020
@cderv cderv changed the title Encoding issue is vignette title check for html_vignette Encoding issue in vignette title check for html_vignette Dec 14, 2020
py-b added a commit to InseeFrLab/DoReMIFaSol that referenced this issue Dec 16, 2020
@github-actions
Copy link

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 github-actions bot locked as resolved and limited conversation to collaborators Jun 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant