Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/77.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
R 记账错误';CTeX fontset`mac';在当前模式下不可用;使用输出格式pdf_book&;pdf_文件2_R_Bookdown_Tinytex - Fatal编程技术网

R 记账错误';CTeX fontset`mac';在当前模式下不可用;使用输出格式pdf_book&;pdf_文件2

R 记账错误';CTeX fontset`mac';在当前模式下不可用;使用输出格式pdf_book&;pdf_文件2,r,bookdown,tinytex,R,Bookdown,Tinytex,我正在使用bookdown和Rstudio+tinyTex+pandoc一起用中文写报告。因为我需要使用交叉引用,我必须将输出格式设置为pdf_document2,但是我遇到了一个关于CTeX fontest的问题 首先,这里是YAML部分: --- title: "title" author: - author documentclass: ctexart site: bookdown::bookdown_site output: bookdown::pdf_document2 bib

我正在使用bookdown和Rstudio+tinyTex+pandoc一起用中文写报告。因为我需要使用交叉引用,我必须将输出格式设置为pdf_document2,但是我遇到了一个关于CTeX fontest的问题

首先,这里是YAML部分:

---
title: "title"
author:
  - author
documentclass: ctexart
site: bookdown::bookdown_site
output:
  bookdown::pdf_document2
bibliography: bib_v1.bib
csl: chinese-author-date.csl
link-citations: yes
colorlinks: yes
classoption: "hyperref,"
---
在编写本书时出现了一些错误,上面说“CTeX fontset'mac'在当前模式下不可用”,下面是全部错误信息:

tlmgr search --file --global '/mac'
TeX Live 2017 is frozen forever and will no
longer be updated.  This happens in preparation for a new release.

If you are interested in helping to pretest the new release (when
pretests are available), please read     http://tug.org/texlive/pretest.html.
Otherwise, just wait, and the new release will be ready in due time.
! Critical ctex error: "fontset-unavailable"
! 
! CTeX fontset 'mac' is unavailable in current mode.
! 
! See the ctex documentation for further information.
! 
! For immediate help type H <return>.
!...............................................  

! 
! CTeX fontset 'mac' is unavailable in current mode.
! 
! See the ctex documentation for further information.
! 
! For immediate help type H <return>.
!...............................................  

! CTeX fontset 'mac' is unavailable in current mode.
! 
! See the ctex documentation for further information.
! 
! For immediate help type H <return>.
!...............................................  

! 
! See the ctex documentation for further information.
! 
! For immediate help type H <return>.
!...............................................  

! See the ctex documentation for further information.
! 
! For immediate help type H <return>.
!...............................................  

! 
! For immediate help type H <return>.
!...............................................  

! For immediate help type H <return>.
!...............................................  

Error: Failed to compile _main.tex. See _main.log for more info.
In addition: Warning message:
In parse_packages(logfile, quiet = c(TRUE, FALSE, FALSE)) :
  Failed to find a package that contains mac
Please delete _main.Rmd after you finish debugging the error.
Execution halted

Exited with status 1.
tlmgr搜索--文件--全局'/mac'
TeX Live 2017将永远冻结,不会
不再需要更新。这是在为新版本做准备时发生的。
如果您有兴趣帮助预测试新版本(当
预测试可用),请阅读http://tug.org/texlive/pretest.html.
否则,请等待,新版本将在适当的时候准备好。
! 关键ctex错误:“字体集不可用”
! 
! CTeX字体集“mac”在当前模式下不可用。
! 
! 有关更多信息,请参阅ctex文档。
! 
! 如需立即帮助,请键入H。
!...............................................  
! 
! CTeX字体集“mac”在当前模式下不可用。
! 
! 有关更多信息,请参阅ctex文档。
! 
! 如需立即帮助,请键入H。
!...............................................  
! CTeX字体集“mac”在当前模式下不可用。
! 
! 有关更多信息,请参阅ctex文档。
! 
! 如需立即帮助,请键入H。
!...............................................  
! 
! 有关更多信息,请参阅ctex文档。
! 
! 如需立即帮助,请键入H。
!...............................................  
! 有关更多信息,请参阅ctex文档。
! 
! 如需立即帮助,请键入H。
!...............................................  
! 
! 如需立即帮助,请键入H。
!...............................................  
! 如需立即帮助,请键入H。
!...............................................  
错误:未能编译_main.tex。有关详细信息,请参阅_main.log。
此外:警告信息:
在parse_包(logfile,quiet=c(TRUE,FALSE,FALSE))中:
找不到包含mac的包
请在完成错误调试后删除_main.Rmd。
停止执行
已退出,状态为1。
我不熟悉乳胶,也不知道如何解决这个问题。我试着在这里建造了一个,它成功了。我也尝试在我自己的文件中使用这个演示的模板,或者使用输出格式的pdf_书,但是我仍然遇到同样的问题

我能做些什么来修复它吗


非常感谢你的帮助

bookdown中文演示使用Xeletex:您也可以这样做:

output: 
  bookdown::pdf_document2:
    latex_engine: xelatex