ulyngs / oxforddown

Template for writing an Oxford University thesis in R Markdown; uses the OxThesis LaTeX template and was inspired by thesisdown.
https://ulyngs.github.io/oxforddown/
MIT License
220 stars 81 forks source link

Failed to knit the master version #40

Closed bttomio closed 2 years ago

bttomio commented 2 years ago

Hi!

While trying to knit the master version, I am getting the following error message:

output file: _main.knit.md

! Paragraph ended before \MT@prot@l was complete.
<to be read again> 
                   \par 
l.318 

Error: LaTeX failed to compile _main.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See _main.log for more info.
In addition: Warning messages:
1: In get_engine(options$engine) :
  Unknown language engine 'yaml' (must be registered via knit_engines$set()).
2: In get_engine(options$engine) :
  Unknown language engine 'yaml' (must be registered via knit_engines$set()).
3: In get_engine(options$engine) :
  Unknown language engine 'yaml' (must be registered via knit_engines$set()).
Execution halted

Here is my session info:

R version 4.1.2 (2021-11-01)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.3 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8    LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
 [1] compiler_4.1.2  bookdown_0.24   fastmap_1.1.0   htmltools_0.5.2 tools_4.1.2     yaml_2.2.1      rmarkdown_2.11 
 [8] knitr_1.36      xfun_0.28       digest_0.6.28   rlang_0.4.12    evaluate_0.14

Thank you very much for your help!

camcmac commented 2 years ago

I'm getting this same error. I've looked in the _main.log file and found these error messages that are more descriptive.

Potential 1: `Package biblatex Warning: Using fall-back BibTeX(8) backend: (biblatex) functionality may be reduced/unavailable.

)`

Potential 2: Package biblatex Warning: Language 'latin' not supported. (biblatex) Using dummy definitions on input line 262.

Potential 3: `Package biblatex Info: Trying to load bibliographic data... Package biblatex Info: ... file '_main.bbl' not found. No file _main.bbl. Package biblatex Info: Reference section=0 on input line 262. Package biblatex Info: Reference segment=0 on input line 262. Runaway argument? {\scantokens { \LARGE {\bfseries {\@title }} ! Paragraph ended before \MT@prot@l was complete.

\par l.315 ` To me, this looks like an encoding problem. Something somewhere has not specified UTF-8. To fix this, I tried to set the backend argument in the index.rmd file to bibtex8 like so: `use-biblatex: true bib-latex-options: "style=authoryear, sorting=nyt, backend=bibtex8, maxcitenames=2, useprefix, doi=true, isbn=false, uniquename=false"` This didn't work. I'll try again later, or maybe someone else can take this and run with it.
bttomio commented 2 years ago

Thanks a lot, @camcmac!

Changing from biblatex to natbib did not fix the problem either. The error message is the same.

bttomio commented 2 years ago

Is this problem related to this one: https://github.com/yihui/tinytex/issues/347#issue-1073730171?

bttomio commented 2 years ago

Indeed, adding \microtypesetup{nopatch=item} and \microtypesetup{patch=item} to templates.tex fixes the problem.