当前位置:网站首页>When the R language output rmarkdown is in other formats (such as PDF), an error is reported, latex failed to compile stocks Tex. solution
When the R language output rmarkdown is in other formats (such as PDF), an error is reported, latex failed to compile stocks Tex. solution
2022-07-03 12:53:00 【ElsaWu1998】
Rmd Output to other formats
( One ) Not installed Tinytex The packet causes an error
In the use of R Language output R Markdown For other formats , Sometimes the following error reports appear
LaTeX failed to compile stocks.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See Untitled.log for more info.
In addition: Warning message:
In system2(..., stdout = if (use_file_stdout()) f1 else FALSE, stderr = f2) :
error in running command
Execution halted
meanwhile , Sometimes the following error will be reported that a package is not found , Such as '"tlmgr"' not found、‘"pdflatex"' not found etc. .
Now open https://yihui.org/tinytex/r/#debugging for debugging, According to the guidelines , You can do that :
- First installation tinytex package ( In the picture above Console Inside , Any of the following three sentences can )
install.packages('tinytex') tinytex::install_tinytex() remotes::install_github('yihui/tinytex') - Try to output again , If you still cannot output , Can follow https://yihui.org/tinytex/r/#debugging for debugging The following steps are given ( After each step, you can try whether it can be output smoothly ):
Reinstall all packagesupdate.packages(ask = FALSE, checkBuilt = TRUE) tinytex::tlmgr_update() - If you make a mistake :
tlmgr: Remote repository is newer than local, reinstall tinytex
Be sure to run first 1. The code inside ! If you run this line of code at the beginning , The following error will be reported :tinytex::reinstall_tinytex()# The first category tlmgr update --all --self Error in system2("tlmgr", args, ...) : '"tlmgr"' not found # The second category package ‘TLMGR’ is not available for this version of R # wait - stay R Markdown Add the following words to the document :
{ r, include=FALSE} options(tinytex.verbose = TRUE)
( Two )Rmd It can be output in other formats , Cannot output as PDF:
At this time, the following error will be reported :
! Package inputenc Error: Unicode character ?(U+6CF0)
(inputenc) not set up for use with LaTeX.
Try other LaTeX engines instead (e.g., xelatex) if you are using pdflatex. For R Markdown users, see https://bookdown.org/yihui/rmarkdown/pdf-document.html
error : Failed to compile a.tex. See https://yihui.name/tinytex/r/#debugging for debugging tips. See a.log for more info.
Besides : Warning message:
In grepl("==> Fatal error occurred", x[i], fixed = TRUE) :
String entered 1 Not applicable to this locale
Stop executing
- Click Settings button, choice output options.

- Output Choose as PDF Then click Advanced

- change LaTeX engine by xelatex Then click OK

You can also directly add the following code to the file header and output .
output:
pdf_document:
latex_engine: xelatex

source :https://stackoverflow.com/questions/32794157/package-inputenc-error-unicode-char-u8-in-rstudio
If you have any other questions, please comment and discuss ~
边栏推荐
- Integer case study of packaging
- Glide question you cannot start a load for a destroyed activity
- Kotlin - 改良装饰者模式
- Swift5.7 扩展 some 到泛型参数
- 低代码平台国际化多语言(i18n)技术方案
- Oh my Zsh + TMUX installation
- Ten workplace rules
- It feels great to know you learned something, isn‘t it?
- [data mining review questions]
- [exercise 5] [Database Principle]
猜你喜欢

ncnn神经网络计算框架在香橙派OrangePi 3 LTS开发板中的使用介绍

低代码平台国际化多语言(i18n)技术方案

How to convert a decimal number to binary in swift

Record your vulnhub breakthrough record
![[combinatorics] permutation and combination (the combination number of multiple sets | the repetition of all elements is greater than the combination number | the derivation of the combination number](/img/9d/6118b699c0d90810638f9b08d4f80a.jpg)
[combinatorics] permutation and combination (the combination number of multiple sets | the repetition of all elements is greater than the combination number | the derivation of the combination number

【数据库原理复习题】

The upward and downward transformation of polymorphism

【R】【密度聚类、层次聚类、期望最大化聚类】

如何在微信小程序中获取用户位置?

Xctf mobile--app3 problem solving
随机推荐
OpenStack节点地址改变
十条职场规则
启用MemCached的SASL认证
Apache Mina开发手册
Differences and connections between final and static
C graphical tutorial (Fourth Edition)_ Chapter 15 interface: interfacesamplep271
[exercise 7] [Database Principle]
It feels great to know you learned something, isn‘t it?
【计网】第三章 数据链路层(2)流量控制与可靠传输、停止等待协议、后退N帧协议(GBN)、选择重传协议(SR)
如何在微信小程序中获取用户位置?
Sword finger offer14 the easiest way to cut rope
Method overloading and rewriting
Xctf mobile--rememberother problem solving
【習題五】【數據庫原理】
[exercise 5] [Database Principle]
基于Linu开发的项目视频
Exploration of sqoop1.4.4 native incremental import feature
阿里 & 蚂蚁自研 IDE
ncnn神經網絡計算框架在香柳丁派OrangePi 3 LTS開發板中的使用介紹
C graphical tutorial (Fourth Edition)_ Chapter 18 enumerator and iterator: enumerator samplep340