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

转换文件名时出了问题 #29

Closed
kongdd opened this issue Dec 1, 2019 · 4 comments
Closed

转换文件名时出了问题 #29

kongdd opened this issue Dec 1, 2019 · 4 comments

Comments

@kongdd
Copy link

kongdd commented Dec 1, 2019

代码未进行任何修改,输出gitbook格式报错。

bookdown::render_book("index.Rmd", "bookdown::gitbook")
"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS bookdown.utf8.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash+smart --output bookdown.html --email-obfuscation none --wrap preserve --standalone --section-divs --table-of-contents --toc-depth 3 --template "D:\Documents\R\win-library\3.6\bookdown\templates\gitbook.html" --highlight-style pygments --number-sections --css "css\style.css" --include-in-header "C:\Users\kongdd\AppData\Local\Temp\Rtmp4SiaCn\rmarkdown-str44a01c37660b.html" --mathjax --lua-filter "D:/Documents/R/win-library/3.6/rmarkdown/rmd/lua/pagebreak.lua" --lua-filter "D:/Documents/R/win-library/3.6/rmarkdown/rmd/lua/latex-div.lua" --filter "C:/Program Files/RStudio/bin/pandoc/pandoc-citeproc.exe" 
Error in file.exists(f) : 转换文件名时出了问题--名字太长了?
R version 3.6.1 (2019-07-05)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18362)

Matrix products: default

locale:
[1] LC_COLLATE=Chinese (Simplified)_China.936 
[2] LC_CTYPE=Chinese (Simplified)_China.936   
[3] LC_MONETARY=Chinese (Simplified)_China.936
[4] LC_NUMERIC=C                              
[5] LC_TIME=Chinese (Simplified)_China.936
@JiaxiangBU
Copy link

JiaxiangBU commented Dec 1, 2019

I will give a quick answer for you.
This problem happens in Windows system instead of Linux and macOS.
I found a quick solution on the stack overflow.
Change the file names of your image and data files into English, also RMD documents.

I will come back to work tomorrow, I will give you a reproduclible minimal example.

And also I find a similar issue you post here.
JiaxiangBU/learn_rmd#9 (comment)
@kongdd

@kongdd
Copy link
Author

kongdd commented Dec 1, 2019

Thanks for your reply. Problem has been solved. It turns out that the secondary title also should be renamed.

# 白苹风末 {#wind}

瞎扯几句。

## 张老爷子

Just change the last line to:
## 张老爷子 {#ch2}

@kongdd kongdd closed this as completed Dec 1, 2019
@yihui yihui reopened this Dec 5, 2019
@yihui
Copy link
Owner

yihui commented Dec 5, 2019

我会尽快修正,谢谢报告!

@yihui
Copy link
Owner

yihui commented Dec 5, 2019

应该搞定了,请测试开发版本:

remotes::install_github(c('rstudio/rmarkdown', 'rstudio/bookdown'))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants