Ошибка компиляции .Rmd из-за LaTeX - PullRequest
12 голосов
/ 06 мая 2020

Я пытаюсь связать свой документ .Rmd с pdf. Я пробовал установить как tinytex, так и отдельный miktex дистрибутив, но ни один из них не помог. Когда я компилирую файл .Rmd, я все равно получаю:

"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, но проверка не обнаружила обновлений с момента установки.

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

В чем может быть проблема и как ее исправить?

1 Ответ

5 голосов
/ 12 мая 2020

Итак, сначала я удалил tinytex (кажется, до tinytex::uninstall_tinytex()).

Затем в консоли miktex введите go в настройки> разрешить установку отсутствующих пакетов на лету.

Посмотрите, работает ли это!

...