R不会将tex文件编译为PDF

时间:2017-12-07 13:51:47

标签: r miktex

我正在尝试从R studio中的tex文件生成pdf文件,但是我收到了这个错误:

tools::texi2pdf("myFirstAlignment.tex", clean=TRUE)
Warning message:
running command '"C:\PROGRA~1\MIKTEX~1.9\miktex\bin\x64\texify.exe" --quiet --pdf "myFirstAlignment.tex" --max-iterations=20 -I "C:/PROGRA~1/R/R-34~1.1/share/texmf/tex/latex" -I "C:/PROGRA~1/R/R-34~1.1/share/texmf/bibtex/bst"' had status 1 

它工作过一次,但我不知道为什么不再存在。 任何人都可以帮助我吗?

编辑:

> traceback()
3: stop(gettextf("unable to run '%s' on '%s'", latex, file), domain = NA)
2: texi2dvi(texfile, quiet = !verbose, pdf = identical(output, "pdf"), 
       texinputs = system.file("tex", package = "msa"), clean = TRUE, 
       index = FALSE)
1: msaPrettyPrint(myFirstAlignment, output = "pdf", showNames = "left", 
       showLogo = "none", askForOverwrite = FALSE, verbose = FALSE)

EDITED2:

Error: running 'texi2dvi' on 'my.tex' failed

LaTeX errors:
C:/Users/tiago/Documents/R Estatistica/go_tropismo/my.tex:37:  ==> Fatal error 
occurred, no output PDF file produced!
In addition: Warning message:
running command '"C:\PROGRA~1\MIKTEX~1.9\miktex\bin\x64\texify.exe" --quiet --pdf "my.tex" --max-iterations=20 -I "C:/PROGRA~1/R/R-34~1.1/share/texmf/tex/latex" -I "C:/PROGRA~1/R/R-34~1.1/share/texmf/bibtex/bst"' had status 1 

> traceback()
3: stop(msg, call. = FALSE, domain = NA)
2: texi2dvi(file = file, pdf = TRUE, clean = clean, quiet = quiet, 
       texi2dvi = texi2dvi, texinputs = texinputs, index = index)
1: tools::texi2pdf("my.tex", clean = TRUE)

EDITED3,这是错误发生后的日志。任何人都可以告诉我是否有任何有用的提示来修复它?我已经尝试过我能想到的一切。任何帮助,将不胜感激。

This is pdfTeX, Version 3.14159265-2.6-1.40.18 (MiKTeX 2.9.6500 64-bit) (preloaded format=pdflatex 2017.11.21)  7 DEC 2017 14:23
entering extended mode
**"C:/Users/tiago/Documents/R Estatistica/go_tropismo/myFirstAlignment.tex"
("C:/Users/tiago/Documents/R Estatistica/go_tropismo/myFirstAlignment.tex"
LaTeX2e <2017-04-15>
Babel <3.15> and hyphenation patterns for 75 language(s) loaded.
("C:\Program Files\MiKTeX 2.9\tex\latex\base\article.cls"
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
("C:\Program Files\MiKTeX 2.9\tex\latex\base\size10.clo"
File: size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
) ("C:\Program Files\MiKTeX 2.9\tex\latex\texshade\texshade.sty"
Package: texshade 2011/05/13 LaTeX TeXshade (v1.24)
Package `texshade', Version 1.24 of 2011/12/01. ("C:\Program Files\MiKTeX 2.9\t
ex\latex\graphics\color.sty"
Package: color 2016/07/10 v1.1e Standard LaTeX Color (DPC)
("C:\Program Files\MiKTeX 2.9\tex\latex\graphics-cfg\color.cfg"
File: color.cfg 2016/01/02 v1.6 sample color configuration
)
Package color Info: Driver file: dvips.def on input line 147.
("C:\Program Files\MiKTeX 2.9\tex\latex\graphics-def\dvips.def"
File: dvips.def 2017/06/20 v3.1d Graphics/color driver for dvips
) ("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\dvipsnam.def"
File: dvipsnam.def 2016/06/17 v3.0m Driver-dependent file (DPC,SPQR)
)) ("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\graphics.sty"
Package: graphics 2017/06/25 v1.2c Standard LaTeX Graphics (DPC,SPQR)
("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\trig.sty"
Package: trig 2016/01/03 v1.10 sin cos tan (DPC)
) ("C:\Program Files\MiKTeX 2.9\tex\latex\graphics-cfg\graphics.cfg"
File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration
)
Package graphics Info: Driver file: pdftex.def on input line 99.
("C:\Program Files\MiKTeX 2.9\tex\latex\graphics-def\pdftex.def"
File: pdftex.def 2017/06/24 v1.0g Graphics/color driver for pdftex
))
\structurefile=\read1
\featurefile=\write3
\alignfile=\read2
\sublogofile=\read3
\exp@rtfile=\write4
("C:\Program Files\MiKTeX 2.9\tex\latex\amsfonts\amssymb.sty"
Package: amssymb 2013/01/14 v3.01 AMS font symbols
("C:\Program Files\MiKTeX 2.9\tex\latex\amsfonts\amsfonts.sty"
Package: amsfonts 2013/01/14 v3.01 Basic AMSFonts support
\@emptytoks=\toks14
\symAMSa=\mathgroup4
\symAMSb=\mathgroup5
LaTeX Font Info:    Overwriting math alphabet `\mathfrak' in version `bold'
(Font)                  U/euf/m/n --> U/euf/b/n on input line 106.
))
\symalphahelix=\mathgroup6
\loopcount=\count87
\innerloopcount=\count88
\outerloopcount=\count89
\seq@count=\count90
\killseq@count=\count91
\seq@percent=\count92
\res@count=\count93
\seq@pointer=\count94
\pos@count=\count95
\res@perline=\count96
\end@count=\count97
\cons@count=\count98
\total@count=\count99
\temp@count=\count100
\triple@count=\count101
\temp@@count=\count102
\pos@sum=\count103
\box@width=\skip43
\name@width=\skip44
\box@depth=\skip45
\width@tmp=\skip46
\box@height=\skip47
\number@width=\skip48
\line@stretch=\skip49
\center@fill=\skip50
\arrow@width=\skip51
\arrow@height=\skip52
\rule@thick=\skip53
\arrow@thick=\skip54
\logo@height=\skip55
\equal@width=\skip56
\equal@tmp=\skip57
\equal@height=\skip58
\temp@@length=\skip59
\vspace@legend=\skip60
\hspace@legend=\skip61
Package color Info: Redefining color LightGray on input line 1704.
Package color Info: Redefining color LightLightGray on input line 1805.
Package color Info: Redefining color LightLightLightGray on input line 1907.
)
No file myFirstAlignment.aux.
\openout1 = `myFirstAlignment.aux'.

LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 24.
LaTeX Font Info:    ... okay on input line 24.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 24.
LaTeX Font Info:    ... okay on input line 24.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 24.
LaTeX Font Info:    ... okay on input line 24.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 24.
LaTeX Font Info:    ... okay on input line 24.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 24.
LaTeX Font Info:    ... okay on input line 24.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 24.
LaTeX Font Info:    ... okay on input line 24.
("C:\Program Files\MiKTeX 2.9\tex\context\base\supp-pdf.mkii"
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count104
\scratchdimen=\dimen103
\scratchbox=\box26
\nofMPsegments=\count105
\nofMParguments=\count106
\everyMPshowfont=\toks15
\MPscratchCnt=\count107
\MPscratchDim=\dimen104
\MPnumerator=\count108
\makeMPintoPDFobject=\count109
\everyMPtoPDFconversion=\toks16
) ("C:\Program Files\MiKTeX 2.9\tex\latex\oberdiek\epstopdf-base.sty"
Package: epstopdf-base 2016/05/15 v2.6 Base part for package epstopdf
("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\infwarerr.sty"
Package: infwarerr 2016/05/16 v1.4 Providing info/warning/error messages (HO)
) ("C:\Program Files\MiKTeX 2.9\tex\latex\oberdiek\grfext.sty"
Package: grfext 2016/05/16 v1.2 Manage graphics extensions (HO)
("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\kvdefinekeys.sty"
Package: kvdefinekeys 2016/05/16 v1.4 Define keys (HO)
("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\ltxcmds.sty"
Package: ltxcmds 2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
))) ("C:\Program Files\MiKTeX 2.9\tex\latex\oberdiek\kvoptions.sty"
Package: kvoptions 2016/05/16 v3.12 Key value format for package options (HO)
("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\keyval.sty"
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
\KV@toks@=\toks17
) ("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\kvsetkeys.sty"
Package: kvsetkeys 2016/05/16 v1.17 Key value parser (HO)
("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\etexcmds.sty"
Package: etexcmds 2016/05/16 v1.6 Avoid name clashes with e-TeX commands (HO)
("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\ifluatex.sty"
Package: ifluatex 2016/05/16 v1.4 Provides the ifluatex switch (HO)
Package ifluatex Info: LuaTeX not detected.
)
Package etexcmds Info: Could not find \expanded.
(etexcmds)             That can mean that you are not using pdfTeX 1.50 or
(etexcmds)             that some package has redefined \expanded.
(etexcmds)             In the latter case, load this package earlier.
))) ("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\pdftexcmds.sty"
Package: pdftexcmds 2017/03/19 v0.25 Utility functions of pdfTeX for LuaTeX (HO
)
("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\ifpdf.sty"
Package: ifpdf 2017/03/15 v3.2 Provides the ifpdf switch
)
Package pdftexcmds Info: LuaTeX not detected.
Package pdftexcmds Info: \pdf@primitive is available.
Package pdftexcmds Info: \pdf@ifprimitive is available.
Package pdftexcmds Info: \pdfdraftmode found.
)
Package epstopdf-base Info: Redefining graphics rule for `.eps' on input line 4
38.
Package grfext Info: Graphics extension search list:
(grfext)             [.pdf,.png,.jpg,.mps,.jpeg,.jbig2,.jb2,.PDF,.PNG,.JPG,.JPE
G,.JBIG2,.JB2,.eps]
(grfext)             \AppendGraphicsExtensions on input line 456.
) (C:/Users/tiago/AppData/Local/Temp/RtmpmKnM7O/seq60787a941199.fasta: . . . . 
. . . . . . . . . [1
Non-PDF special ignored!

{C:/Users/tiago/AppData/Local/MiKTeX/2.9/pdftex/config/pdftex.map}] . . . . . .
. . . . . [2] . . . . . . . . . . . [3] . . . . . . . . . . . [4] . . . . . . .
. . . . [5] . . . . . . . . . . . [6] . . . . . . . . . . . [7] . . . . . . . .
. . . [8] . . . . . . . . . . . [9] . . . . . . . . . . . [10] . . . . . . . . 
. . . [11] . . . . . . . . . . . [12] . . . . . . . . . . . [13] . . . . . . . 
. . . . [14] . . . . . . . . . . . [15] . . . . . . . . . . . [16] . . . . . . 
. . . . . [17] . . . . . . . . . . . [18] . . . . . . . . . . . [19] . . . . . 
. . . . . . [20] . . . . . . . . . . . [21] . . . . . . . . . . . [22] . . . . 
. . . . . . . [23] . . . . . . . . . . . [24

1 个答案:

答案 0 :(得分:0)

我找到了问题的根源。文字长度对于纸张尺寸来说太大了。就那么简单。在文本文件中使用换行符解决了这个问题。