quarto-dev / quarto-dev/quarto-cli
Quarto books on subst drives (windows) give problem with figures from R code when rendering to html
@cderv is already working on this.
Since Jan 8, 2024.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
Bug description
When placing a book project in a subst drive on windows, and rendering to html, a weird problem arises: figures resulting from R code will be generated, but figures are not shown in the browser subsequently, because the output is placed into a subdirectory directly under the main directory, instead under _book. This results in error messages like
ERROR: The filename, directory name, or volume label syntax is incorrect. (os error 123), stat 'Q:\qbook\_book\C:\quartosubst\qbook\index_files'
Steps to reproduce
Here is a batch file that reproduces the error (on my windows 11 computer):
c:
mkdir quartosubst
subst q: c:\quartosubst
q:
quarto create project book qbook --no-open
echo. >> qbook\index.qmd
echo ```{r} >> qbook\index.qmd
echo plot(1:4) >> qbook\index.qmd
echo ``` >> qbook\index.qmd
quarto render /qbook/ --to html
If the book is created in the real folder c:\quartosubst instead of q:, there are no problems.
Expected behavior
The rendered html book should show a fancy plot on the index page
Actual behavior
The link to the plot is broken, as directory index_files is placed in the parent directory of _book.
Your environment
Windows 11,
Same behaviour in all IDEs: RStudio, VS-code, terminal
Quarto check output
[>] Checking versions of quarto binary dependencies...
Pandoc version 3.1.1: OK
Dart Sass version 1.55.0: OK
[>] Checking versions of quarto dependencies......OK
[>] Checking Quarto installation......OK
Version: 1.3.450
The same behaviour is observed with Quarto version 1.4.534
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.