.RMD编译由于LaTeX而失败 [英] .Rmd compilation failed due to LaTeX

查看:107
本文介绍了.RMD编译由于LaTeX而失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将.Rmd文档编织为pdf.我曾尝试安装 tinytex 和单独的 miktex 发行版,但都没有帮助.当我编译.Rmd文件时,仍然得到:

I am trying to knit my .Rmd document to pdf. I have tried both to install tinytex and separate miktex distribution, but neither helped. When I compile a .Rmd file I still get:

"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS file-R-20200512.utf8.md --to beamer --from markdown+autolink_bare_uris+tex_math_single_backslash --output file-R-20200512.tex --highlight-style tango --pdf-engine pdflatex --self-contained 
This is pdfTeX, Version 3.14159265-2.6-1.40.21 (MiKTeX 2.9.7400 64-bit)
entering extended mode

Sorry, but C:\Users\my_username~1\MIKTEX~1.9\miktex\bin\x64\pdflatex.exe did not succeed.

The log file hopefully contains the information to get MiKTeX going again:

  C:\Users\my_username\AppData\Local\MiKTeX\2.9\miktex\log\pdflatex.log
I was unable to find any missing LaTeX packages from the error log file-R-20200512.log.
This is pdfTeX, Version 3.14159265-2.6-1.40.21 (MiKTeX 2.9.7400 64-bit)
entering extended mode

Sorry, but C:\Users\my_username~1\MIKTEX~1.9\miktex\bin\x64\pdflatex.exe did not succeed.

The log file hopefully contains the information to get MiKTeX going again:

  C:\Users\my_username\AppData\Local\MiKTeX\2.9\miktex\log\pdflatex.log
I was unable to find any missing LaTeX packages from the error log file-R-20200512.log.
Error: LaTeX failed to compile file-R-20200512.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips.
  In addition: Warning messages:
  1: In readLines(log) :
  incomplete final line found on 'file-R-20200512.log'
2: In readLines(log) :
  incomplete final line found on 'file-R-20200512.log'
3: In readLines(log) :
  incomplete final line found on 'file-R-20200512.log'
Execution halted

.log文件包含以下输出.我曾尝试从miktex更新软件包,但自安装以来该检查未找到任何更新.

The .log file contains following output. I have tried to update packages from miktex, but the check doesn't find any updates since installation.

2020-05-06 16:01:18,180+0200 INFO  pdflatex - this process (38856) started by 'Rterm' with command line: C:\Users\my_username~1\MIKTEX~1.9\miktex\bin\x64\pdflatex.exe -halt-on-error -interaction=batchmode file-R-20200512.tex
2020-05-06 16:01:18,191+0200 INFO  pdflatex - allowing known shell commands
2020-05-06 16:01:18,192+0200 INFO  pdflatex - enabling input (output) from (to) processes
2020-05-06 16:01:18,325+0200 INFO  pdflatex - going to create file: pdflatex.fmt
2020-05-06 16:01:18,367+0200 INFO  pdflatex.core - start process: initexmf --dump-by-name=pdflatex --engine=pdftex
2020-05-06 16:01:30,553+0200 FATAL pdflatex.core - GUI framework cannot be initialized.
2020-05-06 16:01:30,553+0200 FATAL pdflatex.core - Data: 
  2020-05-06 16:01:30,558+0200 FATAL pdflatex.core - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp:77
2020-05-06 16:01:30,558+0200 FATAL pdflatex - GUI framework cannot be initialized.
2020-05-06 16:01:30,558+0200 FATAL pdflatex - Info: 
  2020-05-06 16:01:30,559+0200 FATAL pdflatex - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp
2020-05-06 16:01:30,559+0200 FATAL pdflatex - Line: 77
2020-05-06 16:01:30,559+0200 INFO  pdflatex - this process (38856) finishes with exit code 1
2020-05-06 16:01:30,559+0200 ERROR miktex.core - still open: file-R-20200512.tex
2020-05-06 16:01:30,559+0200 ERROR miktex.core - still open: file-R-20200512.log
2020-05-06 16:01:34,677+0200 INFO  pdflatex - this process (78772) started by 'Rterm' with command line: C:\Users\my_username~1\MIKTEX~1.9\miktex\bin\x64\pdflatex.exe -halt-on-error -interaction=batchmode file-R-20200512.tex
2020-05-06 16:01:34,690+0200 INFO  pdflatex - allowing known shell commands
2020-05-06 16:01:34,690+0200 INFO  pdflatex - enabling input (output) from (to) processes
2020-05-06 16:01:34,911+0200 FATAL pdflatex.core - GUI framework cannot be initialized.
2020-05-06 16:01:34,911+0200 FATAL pdflatex.core - Data: 
  2020-05-06 16:01:34,911+0200 FATAL pdflatex.core - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp:77
2020-05-06 16:01:34,911+0200 FATAL pdflatex - GUI framework cannot be initialized.
2020-05-06 16:01:34,911+0200 FATAL pdflatex - Info: 
  2020-05-06 16:01:34,911+0200 FATAL pdflatex - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp
2020-05-06 16:01:34,911+0200 FATAL pdflatex - Line: 77
2020-05-06 16:01:34,911+0200 INFO  pdflatex - this process (78772) finishes with exit code 1
2020-05-06 16:01:34,913+0200 ERROR miktex.core - still open: file-R-20200512.tex
2020-05-06 16:01:34,913+0200 ERROR miktex.core - still open: file-R-20200512.log
2020-05-06 16:01:43,760+0200 INFO  pdflatex - this process (39904) started by 'Rterm' with command line: C:\Users\my_username~1\MIKTEX~1.9\miktex\bin\x64\pdflatex.exe -halt-on-error -interaction=batchmode file-R-20200512.tex
2020-05-06 16:01:43,773+0200 INFO  pdflatex - allowing known shell commands
2020-05-06 16:01:43,773+0200 INFO  pdflatex - enabling input (output) from (to) processes
2020-05-06 16:01:43,997+0200 FATAL pdflatex.core - GUI framework cannot be initialized.
2020-05-06 16:01:43,997+0200 FATAL pdflatex.core - Data: 
  2020-05-06 16:01:43,997+0200 FATAL pdflatex.core - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp:77
2020-05-06 16:01:43,998+0200 FATAL pdflatex - GUI framework cannot be initialized.
2020-05-06 16:01:43,998+0200 FATAL pdflatex - Info: 
  2020-05-06 16:01:43,998+0200 FATAL pdflatex - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp
2020-05-06 16:01:43,998+0200 FATAL pdflatex - Line: 77
2020-05-06 16:01:43,998+0200 INFO  pdflatex - this process (39904) finishes with exit code 1
2020-05-06 16:01:44,000+0200 ERROR miktex.core - still open: file-R-20200512.tex
2020-05-06 16:01:44,000+0200 ERROR miktex.core - still open: file-R-20200512.log
2020-05-06 16:01:47,971+0200 INFO  pdflatex - this process (74460) started by 'Rterm' with command line: C:\Users\my_username~1\MIKTEX~1.9\miktex\bin\x64\pdflatex.exe -halt-on-error -interaction=batchmode file-R-20200512.tex
2020-05-06 16:01:47,992+0200 INFO  pdflatex - allowing known shell commands
2020-05-06 16:01:47,992+0200 INFO  pdflatex - enabling input (output) from (to) processes
2020-05-06 16:01:48,163+0200 FATAL pdflatex.core - GUI framework cannot be initialized.
2020-05-06 16:01:48,164+0200 FATAL pdflatex.core - Data: 
  2020-05-06 16:01:48,164+0200 FATAL pdflatex.core - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp:77
2020-05-06 16:01:48,164+0200 FATAL pdflatex - GUI framework cannot be initialized.
2020-05-06 16:01:48,164+0200 FATAL pdflatex - Info: 
  2020-05-06 16:01:48,165+0200 FATAL pdflatex - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp
2020-05-06 16:01:48,165+0200 FATAL pdflatex - Line: 77
2020-05-06 16:01:48,165+0200 INFO  pdflatex - this process (74460) finishes with exit code 1
2020-05-06 16:01:48,166+0200 ERROR miktex.core - still open: file-R-20200512.tex
2020-05-06 16:01:48,166+0200 ERROR miktex.core - still open: file-R-20200512.log
2020-05-06 16:09:36,414+0200 INFO  pdflatex - this process (36484) started by 'Rterm' with command line: C:\Users\my_username~1\MIKTEX~1.9\miktex\bin\x64\pdflatex.exe -halt-on-error -interaction=batchmode file-R-20200512.tex
2020-05-06 16:09:36,423+0200 INFO  pdflatex - allowing known shell commands
2020-05-06 16:09:36,423+0200 INFO  pdflatex - enabling input (output) from (to) processes
2020-05-06 16:09:36,735+0200 FATAL pdflatex.core - GUI framework cannot be initialized.
2020-05-06 16:09:36,735+0200 FATAL pdflatex.core - Data: 
  2020-05-06 16:09:36,735+0200 FATAL pdflatex.core - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp:77
2020-05-06 16:09:36,735+0200 FATAL pdflatex - GUI framework cannot be initialized.
2020-05-06 16:09:36,735+0200 FATAL pdflatex - Info: 
  2020-05-06 16:09:36,735+0200 FATAL pdflatex - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp
2020-05-06 16:09:36,735+0200 FATAL pdflatex - Line: 77
2020-05-06 16:09:36,737+0200 INFO  pdflatex - this process (36484) finishes with exit code 1
2020-05-06 16:09:36,739+0200 ERROR miktex.core - still open: file-R-20200512.tex
2020-05-06 16:09:36,739+0200 ERROR miktex.core - still open: file-R-20200512.log
2020-05-06 16:09:40,541+0200 INFO  pdflatex - this process (45876) started by 'Rterm' with command line: C:\Users\my_username~1\MIKTEX~1.9\miktex\bin\x64\pdflatex.exe -halt-on-error -interaction=batchmode file-R-20200512.tex
2020-05-06 16:09:40,553+0200 INFO  pdflatex - allowing known shell commands
2020-05-06 16:09:40,553+0200 INFO  pdflatex - enabling input (output) from (to) processes
2020-05-06 16:09:40,774+0200 FATAL pdflatex.core - GUI framework cannot be initialized.
2020-05-06 16:09:40,774+0200 FATAL pdflatex.core - Data: 
  2020-05-06 16:09:40,774+0200 FATAL pdflatex.core - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp:77
2020-05-06 16:09:40,774+0200 FATAL pdflatex - GUI framework cannot be initialized.
2020-05-06 16:09:40,774+0200 FATAL pdflatex - Info: 
  2020-05-06 16:09:40,774+0200 FATAL pdflatex - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp
2020-05-06 16:09:40,774+0200 FATAL pdflatex - Line: 77
2020-05-06 16:09:40,774+0200 INFO  pdflatex - this process (45876) finishes with exit code 1
2020-05-06 16:09:40,774+0200 ERROR miktex.core - still open: file-R-20200512.tex
2020-05-06 16:09:40,774+0200 ERROR miktex.core - still open: file-R-20200512.log
2020-05-06 16:09:49,202+0200 INFO  pdflatex - this process (72048) started by 'Rterm' with command line: C:\Users\my_username~1\MIKTEX~1.9\miktex\bin\x64\pdflatex.exe -halt-on-error -interaction=batchmode file-R-20200512.tex
2020-05-06 16:09:49,215+0200 INFO  pdflatex - allowing known shell commands
2020-05-06 16:09:49,215+0200 INFO  pdflatex - enabling input (output) from (to) processes
2020-05-06 16:09:49,425+0200 FATAL pdflatex.core - GUI framework cannot be initialized.
2020-05-06 16:09:49,425+0200 FATAL pdflatex.core - Data: 
  2020-05-06 16:09:49,425+0200 FATAL pdflatex.core - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp:77
2020-05-06 16:09:49,427+0200 FATAL pdflatex - GUI framework cannot be initialized.
2020-05-06 16:09:49,427+0200 FATAL pdflatex - Info: 
  2020-05-06 16:09:49,427+0200 FATAL pdflatex - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp
2020-05-06 16:09:49,427+0200 FATAL pdflatex - Line: 77
2020-05-06 16:09:49,427+0200 INFO  pdflatex - this process (72048) finishes with exit code 1
2020-05-06 16:09:49,429+0200 ERROR miktex.core - still open: file-R-20200512.tex
2020-05-06 16:09:49,429+0200 ERROR miktex.core - still open: file-R-20200512.log
2020-05-06 16:09:53,141+0200 INFO  pdflatex - this process (64132) started by 'Rterm' with command line: C:\Users\my_username~1\MIKTEX~1.9\miktex\bin\x64\pdflatex.exe -halt-on-error -interaction=batchmode file-R-20200512.tex
2020-05-06 16:09:53,151+0200 INFO  pdflatex - allowing known shell commands
2020-05-06 16:09:53,151+0200 INFO  pdflatex - enabling input (output) from (to) processes
2020-05-06 16:09:53,304+0200 FATAL pdflatex.core - GUI framework cannot be initialized.
2020-05-06 16:09:53,304+0200 FATAL pdflatex.core - Data: 
  2020-05-06 16:09:53,304+0200 FATAL pdflatex.core - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp:77
2020-05-06 16:09:53,304+0200 FATAL pdflatex - GUI framework cannot be initialized.
2020-05-06 16:09:53,304+0200 FATAL pdflatex - Info: 
  2020-05-06 16:09:53,304+0200 FATAL pdflatex - Source: Libraries\MiKTeX\UI\Qt\mikuiqt.cpp
2020-05-06 16:09:53,304+0200 FATAL pdflatex - Line: 77
2020-05-06 16:09:53,304+0200 INFO  pdflatex - this process (64132) finishes with exit code 1
2020-05-06 16:09:53,304+0200 ERROR miktex.core - still open: file-R-20200512.tex
2020-05-06 16:09:53,304+0200 ERROR miktex.core - still open: file-R-20200512.log

可能是问题所在,我该如何解决?

What may be the issue and how can I fix it?

推荐答案

因此,我首先卸载了tinytex(我认为是 tinytex :: uninstall_tinytex()).

So first, I uninstalled tinytex (I think by tinytex::uninstall_tinytex()).

然后,在miktex控制台中,转到设置">允许即时安装缺少的软件包".

Then, in miktex console, go to settings > allow install missing packages on the fly.

看看是否可行!

这篇关于.RMD编译由于LaTeX而失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆