HertieDataScience / SyllabusAndLectures

Hertie School of Governance Introduction to Collaborative Social Science Data Analysis
MIT License
37 stars 60 forks source link

"Fatal Error" attempting to produce pdf #46

Closed jasmincantzler closed 8 years ago

jasmincantzler commented 8 years ago

Dear all,

I have troubles creating a pdf-version; it gives me the following error message:

_output file: Assignment2.knit.md

! Incomplete \iffalse; all text was ignored after line 87. \fi <> ...3n4y4g_lfq440000gn/T/tex2pdf.9339/input.tex*

! ==> Fatal error occurred, no output PDF file produced! _Transcript written on /var/folders/gp/hpsqdkw16xs93n4y4glfq440000gn/T/tex2pdf. 9339/input.log.

pandoc: Error producing PDF from TeX source Fehler: pandoc document conversion failed with error 43 Ausführung angehalten

Someone may have any idea what this could mean and how I can eradicate this "fatal error"? Cheers and enjoy your Sunday!

christophergandrud commented 8 years ago

HI @jasmincantzler could you provide a link to the code, this will make the problem easier to diagnose.

jasmincantzler commented 8 years ago

Yes, of course (should have thought about that, my apologies) Here the link:

https://github.com/jasmincantzler/TaxMorale/blob/master/Assignment%202/Assignment_2.Rmd

Have a good start into the new week!

christophergandrud commented 8 years ago

I think I found your issue. To do this I first knitted the document and kept the intermediate Tex file:

library(rmarkdown)
render('Assignment_2.Rmd', pdf_document(keep_tex = T))

Then I opened the resulting .tex file to find line 87 (referred to in the error message). From this I realised that it had to do with something in your header. Through a process of deleting individual non-letter characters (this is usually the where this type of problem lies in LaTeX) and attempting to compile the docuement I found that the problem was an illegal . after 11 in the date. Not exactly sure why this threw off the compiler (maybe an encoding issue), but it should compile to PDF just fine after you delete the .

jasmincantzler commented 8 years ago

@christophergandrud Hero of the day - THANK YOU!

christophergandrud commented 8 years ago

:smile: