当前位置:网站首页>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 ~
边栏推荐
- Openstack node address change
- Kotlin - 改良装饰者模式
- initial、inherit、unset、revert和all的区别
- Xctf mobile--app3 problem solving
- With pictures and texts, summarize the basic review of C language in detail, so that all kinds of knowledge points are clear at a glance?
- 公纵号发送提示信息(用户微服务--消息微服务)
- OpenStack节点地址改变
- Gan totem column bridgeless boost PFC (single phase) seven PFC duty cycle feedforward
- Sword finger offer05 Replace spaces
- Pytext training times error: typeerror:__ init__ () got an unexpected keyword argument 'serialized_ options'
猜你喜欢
阿里 & 蚂蚁自研 IDE
Xctf mobile--app2 problem solving
With pictures and texts, summarize the basic review of C language in detail, so that all kinds of knowledge points are clear at a glance?
Differences between initial, inherit, unset, revert and all
Glide question you cannot start a load for a destroyed activity
记录自己vulnhub闯关记录
Method overloading and rewriting
Sword finger offer09 Implementing queues with two stacks
Social community forum app ultra-high appearance UI interface
[ArcGIS user defined script tool] vector file generates expanded rectangular face elements
随机推荐
Define a list, store n integers, and calculate the length, maximum value, minimum value and average value of the list
Low code platform international multilingual (I18N) technical solution
社交社区论坛APP超高颜值UI界面
Approve iPad, which wants to use your icloud account
alright alright alright
CNN MNIST handwriting recognition
Export the entire Oracle Database
【数据库原理及应用教程(第4版|微课版)陈志泊】【第三章习题】
【习题七】【数据库原理】
Swift Error Handling
【習題七】【數據庫原理】
基于Linu开发的项目视频
【ArcGIS自定义脚本工具】矢量文件生成扩大矩形面要素
Sword finger offer06 Print linked list from end to end
Tensorflow binary installation & Failure
C graphical tutorial (Fourth Edition)_ Chapter 15 interface: interfacesamplep268
Swift return type is a function of function
Application of ncnn neural network computing framework in orange school orangepi 3 lts development board
Togaf certification self-study classic v2.0
Detailed explanation of the most complete constraintlayout in history