-
-
Notifications
You must be signed in to change notification settings - Fork 872
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
Allow dots in file names in .rnw files #2213
Comments
Thanks for the detailed report! Would it meet your demand if I allow leading dots? Then
That sounds like a good idea. Yes, I think I can do it. |
Thanks! Leading dot is all I need (at least in the foreseeable future :-) ) If I were the designing the package--I'd probably leave the dots alone, and just tell the user that they have to figure out what file names are legal given the software/OS they use. But anyway, appreciate your work in what seems like a quite big project! |
Done. Dots are left untouched now. To prevent other special characters from being sanitized, you can set Thanks! |
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. |
I prefer to use automatically generated figures in
.figs
folder to make the folder invisible and stress it is autogenerated (I also use.cache
for the caches). However, knitr changes the leading dot to an underscire when working for .rnw (latex) files (see also #1471). This post here is both bug report and feature request:A minimal example (file "test.rnw"):
and this can be compiled with:
Knitr (correctly) gives a message about replacing dots with underscores.
Session info:
The bug part
This feature (changing dots to underscores) is not documented. Neither
?knitr::opts_chunk
nor the website it refers to currently mention sanitization, the website currently states that:As a note, dots are allowed in .rmd/markdown related paths, this creates confusion as why it sometimes works and sometimes does not work.
Hence my request to document the behavior.
The feature request part.
It seems that modern latex supports dots in file names. For instance, a file
compiles correctly using ubuntu 20.04
(
pdfTeX 3.14159265-2.6-1.40.20 (TeX Live 2019/Debian)
andXeTeX 3.14159265-2.6-0.999991 (TeX Live 2019/Debian)
)Alternatively, if allowing dots globally is considered not a good idea, then can you make it optional using some sort of
sanitize=TRUE/FALSE
option?Thank you for considering :-)
By filing an issue to this repo, I promise that
xfun::session_info('knitr')
. I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version:remotes::install_github('yihui/knitr')
.I understand that my issue may be closed if I don't fulfill my promises.
The text was updated successfully, but these errors were encountered: