On 9/26/12 6:25 PM, Yihui Xie wrote:
The first place to look at is View-->View Messages, as described in
the troubleshooting section in Sweave manual (which applies to knitr
as well): https://github.com/downloads/yihui/lyx/sweave.pdf


Very good to know, thanks. I enabled that and tried again. It seems that there is an invalid input found by R(?). Please see also the complete log at the end of this post.

I investigated the .tex file and found it was cut off in the middle of the abstract environment. I then opened an R session in the temp directory and ran knit("skryptum.Rnw") which produces a skryptum.tex file that can be tex'ed correctly and contains the \Sepr{} parts. Also, the .Rnw file is complete, i.e. not cut off like the .tex file.

So I guess the Rscript call messes things up? I tried the hint by Scott on setting an error hook, but to no avail. How to debug further?

----------------------------------------------------------------------
12:13:14.051: Previewing ...
12:13:14.085: (buffer-view: ⌘R)
12:13:14.353: Rscript --verbose --no-save --no-restore "/Applications/LyX.app/Contents/Resources/scripts/lyxknitr.R" "/var/folders/yx/tvnzczfx7c31c68jrddvlqgr0000gn/T/lyx_tmpdir.xJL523/lyx_tmpbuf3/""skryptum.Rnw" "/var/folders/yx/tvnzczfx7c31c68jrddvlqgr0000gn/T/lyx_tmpdir.xJL523/lyx_tmpbuf3/""skryptum.tex" UTF-8 "/Users/XYZ/Documents/Vorlesung/Theorie der Simulationstechnik/src/"
12:13:14.373: running
12:13:14.381: '/Library/Frameworks/R.framework/Versions/2.15/Resources/bin/R --slave --no-restore --no-save --no-restore --file=/Applications/LyX.app/Contents/Resources/scripts/lyxknitr.R --args /var/folders/yx/ 12:13:14.383: tvnzczfx7c31c68jrddvlqgr0000gn/T/lyx_tmpdir.xJL523/lyx_tmpbuf3/skryptum.Rnw /var/folders/yx/tvnzczfx7c31c68jrddvlqgr0000gn/T/lyx_tmpdir.xJL523/lyx_tmpbuf3/skryptum.tex UTF-8'
12:13:14.384:

Running: Rscript --verbose --no-save --no-restore "/Applications/LyX.app/Contents/Resources/scripts/lyxknitr.R" "/var/folders/yx/tvnzczfx7c31c68jrddvlqgr0000gn/T/lyx_tmpdir.xJL523/lyx_tmpbuf3/""skryptum.Rnw" "/var/folders/yx/tvnzczfx7c31c68jrddvlqgr0000gn/T/lyx_tmpdir.xJL523/lyx_tmpbuf3/""skryptum.tex" UTF-8 "/Users/XYZ/Documents/Vorlesung/Theorie der Simulationstechnik/src/"
12:13:14.663: [1] TRUE
12:13:14.670: Warning in readLines(input, warn = FALSE) :
12:13:14.673:   invalid input found on input connection 'skryptum.Rnw'
12:13:14.925:
12:13:14.925:
12:13:14.927: processing file: skryptum.Rnw
12:13:14.942:
  |
  |                                                                 |   0%
  |
12:13:14.943:
  |>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>| 100%
12:13:14.944:   ordinary text without R code
12:13:14.944:
12:13:14.947:
12:13:14.948: output file: /Users/.../Documents/Vorlesung/Theorie der Simulationstechnik/src/skryptum.tex
12:13:14.949:
12:13:14.949: [1] "skryptum.tex"
12:13:14.951: [1] TRUE
12:13:14.965: pdflatex  "skryptum.tex"
Running: pdflatex  "skryptum.tex" > /dev/null
12:13:15.211: This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012)
12:13:15.212:  restricted \write18 enabled.
12:13:15.227: entering extended mode
12:13:15.229: (./skryptum.tex
12:13:15.230: LaTeX2e <2011/06/27>
12:13:15.230: Babel <v3.8m> and hyphenation patterns for english, dumylang, nohyphenation, ge 12:13:15.231: rman-x-2012-05-30, ngerman-x-2012-05-30, afrikaans, ancientgreek, ibycus, arabi 12:13:15.232: c, armenian, basque, bulgarian, catalan, pinyin, coptic, croatian, czech, danis 12:13:15.232: h, dutch, ukenglish, usenglishmax, esperanto, estonian, ethiopic, farsi, finnis 12:13:15.233: h, french, friulan, galician, german, ngerman, swissgerman, monogreek, greek, h 12:13:15.233: ungarian, icelandic, assamese, bengali, gujarati, hindi, kannada, malayalam, ma 12:13:15.234: rathi, oriya, panjabi, tamil, telugu, indonesian, interlingua, irish, italian, 12:13:15.234: kurmanji, latin, latvian, lithuanian, mongolian, mongolianlmc, bokmal, nynorsk, 12:13:15.235: polish, portuguese, romanian, romansh, russian, sanskrit, serbian, serbianc, s 12:13:15.236: lovak, slovenian, spanish, swedish, turkish, turkmen, ukrainian, uppersorbian,
12:13:15.236: welsh, loaded.
12:13:15.237:
12:13:16.309: pdflatex  "skryptum.tex"
12:13:16.503: This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012)
12:13:16.504:  restricted \write18 enabled.
/Users/Shared/LyX/lyx-2.0.4/src/support/Systemcall.cpp(273): Systemcall: 'pdflatex "skryptum.tex"' finished with exit code 1

Running: pdflatex  "skryptum.tex" > /dev/null
12:13:16.520: entering extended mode
12:13:16.521: (./skryptum.tex
12:13:16.521: LaTeX2e <2011/06/27>
12:13:16.522: Babel <v3.8m> and hyphenation patterns for english, dumylang, nohyphenation, ge 12:13:16.523: rman-x-2012-05-30, ngerman-x-2012-05-30, afrikaans, ancientgreek, ibycus, arabi 12:13:16.523: c, armenian, basque, bulgarian, catalan, pinyin, coptic, croatian, czech, danis 12:13:16.523: h, dutch, ukenglish, usenglishmax, esperanto, estonian, ethiopic, farsi, finnis 12:13:16.524: h, french, friulan, galician, german, ngerman, swissgerman, monogreek, greek, h 12:13:16.524: ungarian, icelandic, assamese, bengali, gujarati, hindi, kannada, malayalam, ma 12:13:16.525: rathi, oriya, panjabi, tamil, telugu, indonesian, interlingua, irish, italian, 12:13:16.525: kurmanji, latin, latvian, lithuanian, mongolian, mongolianlmc, bokmal, nynorsk, 12:13:16.526: polish, portuguese, romanian, romansh, russian, sanskrit, serbian, serbianc, s 12:13:16.526: lovak, slovenian, spanish, swedish, turkish, turkmen, ukrainian, uppersorbian,
12:13:16.527: welsh, loaded.
12:13:16.527:
/Users/Shared/LyX/lyx-2.0.4/src/support/Systemcall.cpp(273): Systemcall: 'pdflatex "skryptum.tex"' finished with exit code 1
Error: Cannot view file
----------------------------------------
File does not exist: /var/folders/yx/tvnzczfx7c31c68jrddvlqgr0000gn/T/lyx_tmpdir.xJL523/lyx_tmpbuf3/skryptum.pdf
----------------------------------------------------------------------





Reply via email to