ellessenne / uol-thesis

Thesis Templates for a PhD at the University of Leicester
MIT License
5 stars 3 forks source link

Knit fails #1

Open mauriziopassariello opened 2 years ago

mauriziopassariello commented 2 years ago

Hi Alessandro,

I am a student at UoL, forked your repo, opened the project with RStudio but the document fails to knit. I get the following error:

Error in files2[[format]] : attempt to select less than one element in get1index Calls: ... -> -> render_book -> source_files Execution halted

Do you know what might be going on and what I can do to fix it? Forgive me I am a beginner with RMarkdown.

Thanks!

ellessenne commented 2 years ago

Hi, I could reproduce the issue. It is due to selecting which .Rmd files to add to the book, e.g., in the _bookdown.yml file; I pushed an update to the repository, which should now compile just fine (please let me know if this fixes your issue). I will also file a bug report to the {bookdown} package, as this compiled without issues when I first developed this template! ๐Ÿ˜„ Thanks for reporting this,

Alessandro

mauriziopassariello commented 2 years ago

Hi Alessandro,

I believe there is still an issue with the mycrotypesetup in the latex preamble. The error I get is:

output file: YEAR-SURNAME-N-PhD.knit.md

! Undefined control sequence. l.99 \microtypesetup {activate = {true, nocompatibility}, final, tracking = t...

Error: LaTeX failed to compile YEAR-SURNAME-N-PhD.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See YEAR-SURNAME-N-PhD.log for more info. Execution halted

I had to update tinytex initially, which I have done, but still get this error. Can you figure out what latex doesn't like in that line of code re microtypesetup?

Thanks,

Maurizio

ellessenne commented 2 years ago

Hi again, That is definitely a latex issue โ€“ I would try re-installing the microtype package, or making sure that everything is up to date (from a terminal, run tlmgr update --self --all).

Alessandro

mauriziopassariello commented 2 years ago

Hi Alessandro,

Thank you for your reply. Unfortunately the pdf still doesnโ€™t knit. This time I get a tinytex error:

output file: YEAR-SURNAME-N-PhD.knit.md

A new version of TeX Live has been released. If you need to install or update any LaTeX packages, you have to upgrade TinyTeX with tinytex::reinstall_tinytex(). If it fails to upgrade, you might be using a default random CTAN mirror that has not been fully synced to the main CTAN repository, and you need to wait for a few more days or use a CTAN mirror that is known to be up-to-date (see the "repository" argument on the help page ?tinytex::install_tinytex). ! Undefined control sequence. l.99 \microtypesetup {activate = {true, nocompatibility}, final, tracking = t...

Error: LaTeX failed to compile YEAR-SURNAME-N-PhD.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See YEAR-SURNAME-N-PhD.log for more info. Execution halted

I have reinstalled tinytex with the tinytex::reinstall_tinytex() command and the package seems uptodate.

Can you figure out what the issue may be?

Thanks,

Maurizio

On 4 Apr 2022, at 08:03, Alessandro Gasparini @.***> wrote:

Hi, I could reproduce the issue. It is due to selecting which .Rmd files to add to the book, e.g., in the _bookdown.yml file; I pushed an update to the repository, which should now compile just fine. I will also file a bug report to the {bookdown} package, as this compiled without issues when I first developed this template! ๐Ÿ˜„ Thanks for reporting this,

Alessandro

โ€” Reply to this email directly, view it on GitHub https://github.com/ellessenne/uol-thesis/issues/1#issuecomment-1087187816, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATJVX4TRPYCJOMSHHVJNWQDVDKH3NANCNFSM5SLFLAFQ. You are receiving this because you authored the thread.

ellessenne commented 2 years ago

Hi, It looks like some LaTeX packages might be missing (such as microtype). Could you try running the following code in your R console and try knitting again?

library(tinytex)

tlmgr_update()
tlmgr_install("microtype")