Giter Club home page Giter Club logo

Comments (15)

gozervandechat avatar gozervandechat commented on August 27, 2024

Try if the following works:

  • go to Index.Rmd

  • comment out pandoc_args: ["--lua-filter=scripts_and_filters/correction_filter.lua"] #remove filter to stop applying blue background to inline corrections

  • set
    params: corrections: true # set false to stop applying blue background to blocks of corrections

to false

Always delete the _main.Rmd after a failed build attempt and press build all again.

Best

from oxforddown.

rPromptt avatar rPromptt commented on August 27, 2024

It worked perfectly thanks:), except for a few lines of trivial warnings. Whilst you're still here, any idea on advanced customisation since this is what controls the overall outlook of the book. For instance, I added the krantz.cls (from Yihui's repo) to the file directories and also updated the index.Rmd with the "krantz" documentclass, however, there was no discernible difference with these customisations upon rendering the pdf. Thanks

from oxforddown.

gozervandechat avatar gozervandechat commented on August 27, 2024

Hey I am not an expert, that's why I use the template. But when I tried to replicate the building of my pdf on someone else's pc I stumbled upon the same problem as you. Funnily, I also yesterday found out this works.

Anyway open the tex template in the template folder, replace ociamthesis in \documentclass[a4paper, $if(page-layout)$$page-layout$$endif$]{templates/ociamthesis} (and everywhere else where ociamthesis appears) with krantz. Paste krantz into the template folder. See if it works?

from oxforddown.

rPromptt avatar rPromptt commented on August 27, 2024

Hi Ulyngs, no it did not work but thanks for the helps so far - at least I am now able to compile pdf. I'll adapt your template as much as I am technically able to in order to suit my need. Unfortunately, Yihui did not treat this topic properly [advance customisation for PDF compilation] in his bookdown documentation as I've noticed a lot of submissions in the community about rendering pdf_book.

from oxforddown.

giuliagrisot avatar giuliagrisot commented on August 27, 2024

hi, I have a slightly different problem with the same effect (i am unable to build): following the very first steps of the video tutorial, if i click on build all, i get the following error:

! Package fontenc Error: Encoding file `lgrenc.def' not found.
(fontenc)                You might have misspelt the name of the encoding.

Error: Failed to compile _main.tex. See https://yihui.name/tinytex/r/#debugging for debugging tips. See _main.log for more info.
Execution halted
make: *** [Makefile:2: pdf] Error 1

Exited with status 2.

and when typing make gitbook, the following"

Output created: docs/index.html
[1] "C:/Users/Giulia/OneDrive - The University of Nottingham/Latex/Thesis_Grisot_OD/docs/index.html"
Rscript -e 'browseURL("docs/index.html")'
Error in shell.exec(url) : 'docs/index.html' not found
Calls: browseURL -> shell.exec
Execution halted
make: *** [Makefile:8: gitbook] Error 1

any idea what should i do?

from oxforddown.

ulyngs avatar ulyngs commented on August 27, 2024

@giuliagrisot:

  • your first issue seems to be related to your latex installation - try getting a full latex installation (https://www.latex-project.org/get/) and see if that fixes it (you might be using tinytex?)
  • the second issue might be related to file paths - are you on a windows machine? Can you check if the files for the gitbook output are built correctly in the first place?

@rPromptt: Are you on a Windows machine?

from oxforddown.

ss4ws avatar ss4ws commented on August 27, 2024

Hi @ulyngs,
Thanks for all your work putting together the oxforddown! Although, I can render individual chapter in pdf and word files, I am unable to compile the whole thesis in a pdf book and here is the error I am getting:

Error in rmarkdown::render_site(output_format = "bookdown::pdf_book",  : 
  No site generator found.
Execution halted

Would you have any tips on how to solve this issue? Time is pressing... I have to send my thesis this week.
Many thanks for your help.

from oxforddown.

ulyngs avatar ulyngs commented on August 27, 2024

@ss4ws You need to provide more information for me to understand the issue, but:

  • I assume this relates to when you click 'Build All' on the 'Build' tab?
  • is the full PDF compiling when you download the repository with the demo content?
  • what does your file organisation look like?

from oxforddown.

ss4ws avatar ss4ws commented on August 27, 2024

Hi @ulyngs,
thanks for writing back. Below I am answering to your bullet points.

  • I have tried both build options: "Build All" from the drop down menu and the Build Book option in the Rstudio interface. The error is the same.

  • I just tested to build the demo repository and this is error I run into:

Quitting from lines 427-429 (_main.Rmd) 
Error in loadNamespace(name) : there is no package called 'reticulate'
Calls: <Anonymous> ... loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
In addition: Warning message:
The 'python' engine in knitr requires the reticulate package. If you do not want to use the reticulate package, set the chunk option python.reticulate = FALSE. 
Execution halted
make: *** [pdf] Error 1

Exited with status 2.
  • I didn't change the file organization. Only some file names but I kept the the preceding numbers. I haven't changed the underscore files at all.

from oxforddown.

ss4ws avatar ss4ws commented on August 27, 2024

@ulyngs update:

  • I downloaded the package reticulate and I was able to build the thesis from the demo repository.

  • Here is a screenshot of my file structure
    Screen Shot 2020-03-29 at 5 22 27 PM

  • I tried a new build and instead of the previous error I got this one:

Rscript -e 'bookdown::render_book("index.Rmd", output_format = "bookdown::pdf_book")'
Error in match.arg(citation_package) : 
  'arg' should be one of “none”, “natbib”, “biblatex”
Calls: <Anonymous> ... get_base_format -> do.call -> <Anonymous> -> match.arg
Execution halted
make: *** [pdf] Error 1

from oxforddown.

ulyngs avatar ulyngs commented on August 27, 2024

The 'citation_package' error suggests that you've done something to the index.Rmd file - is should have citation_package: biblatex set as option under bookdown::pdf_book (see index.Rmd in the demo repository).

Other than that, if the demo repository works, then just carefully take a look at what changes you've made. Other things I note:

  • clean up the files left of over from previous builds by typing 'make clean-knits' in the Terminal tab in RStudio
  • I see your references file is named 'references.bib.bak' rather than 'references.bib'?

from oxforddown.

ss4ws avatar ss4ws commented on August 27, 2024

Hi @ulyngs thank you for your tips and your patience while I am trying to resolve these errors!

  • I used the make clean-knits before a new build
  • Bibliography is correctly set as references.bib. Honestly I have no idea what the .bak file is.
  • citation_package: biblatex corrected and the the build seems to run until ... the following error (which is not mentioned in Yihui's debugging page):
/usr/local/bin/pandoc +RTS -K512m -RTS _main.utf8.md --to latex --from markdown+autolink_bare_uris+tex_math_single_backslash --output _main.tex --self-contained --table-of-contents --toc-depth 2 --template templates/template.tex --number-sections --highlight-style tango --pdf-engine pdflatex --biblatex --lua-filter /Library/Frameworks/R.framework/Versions/3.6/Resources/library/rmarkdown/rmd/lua/pagebreak.lua --lua-filter /Library/Frameworks/R.framework/Versions/3.6/Resources/library/rmarkdown/rmd/lua/latex-div.lua --wrap preserve --lua-filter=scripts_and_filters/correction_filter.lua --include-in-header /var/folders/ym/pmrvzv993psc1c4w4dvbwg180000gn/T//Rtmp55gUpy/rmarkdown-str3021684f0d2f.html --variable tables=yes --standalone -Mhas-frontmatter=false 

! LaTeX Error: Option clash for package hyperref.

Error: LaTeX failed to compile _main.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See _main.log for more info.
Execution halted
make: *** [pdf] Error 1

Exited with status 2.

update:

I commented out \usepackage[colorlinks=false,pdfpagelabels,hidelinks=$hidelinks$]{hyperref} in the template.tex file and I tried to build again with yet a new error as a result.

! Package pdftex.def Error: File `figures/beltcrest.pdf' not found.

Error: LaTeX failed to compile _main.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See _main.log for more info.
Execution halted
make: *** [pdf] Error 1

Exited with status 2.

from oxforddown.

ulyngs avatar ulyngs commented on August 27, 2024

... is there a file named beltcrest.pdf in the figures folder?

On the clashing options for the hyperref package, did you add any additional options for this? Also, could you show what the YAML front matter in your index.Rmd file looks like?

from oxforddown.

ss4ws avatar ss4ws commented on August 27, 2024

Hi @ulyngs,
Thanks for your assistance. I replaced the beltcrest.pdf figure with the logo of the University of Virginia from which I am graduating. I don't think I intentionally added any options for the hyperref package ---I hope I didn't inadvertently introduce a bug. As for the index.Rmd yaml please see below:

---
#####################
## thesis metadata ##
#####################
title: |
  _Brouillon.net:_ \
  Le rôle des blogs et sites web dans la création littéraire. \
author: Spyridon Simotas
college: University of Virginia
degree: PhD
degreedate: 2020
abstract: |
  `r paste(readLines("front-and-back-matter/_abstract.Rmd"), collapse = '\n  ')`
acknowledgements: |
  `r paste(readLines("front-and-back-matter/_acknowledgements.Rmd"), collapse = '\n  ')`
dedication: |
  À mon père. \
  À B.
abbreviations: "front-and-back-matter/abbreviations" # path to .tex file with abbreviations

#######################
## bibliography path ##
#######################
bibliography: references.bib
bibliography-heading-in-pdf: Bibliographie

#####################
## PDF formatting  ##
#####################
abstractseparate: true # include front page w/ abstract for examination schools?
bib-humanities: true #set to true if you want in-text references formatted as author-year
doi-in-bibliography: true #set to true if you want DOI's to be shown in the bibliography
draft: false # add as DRAFT mark in the footer?
page-layout: nobind #'nobind' for PDF output (equal margins), 'twoside' for two-sided binding (mirror margins and blank pages), leave blank for one-sided binding (left margin > right margin)
hidelinks: true #if false, the PDF output highlights clickable links with a colored border - you will probably want to set this to true for PDF version you wish to physically print
toc-depth: 2 # depth of heading to include in table of contents
lof: true # list of figures in front matter?
lot: true # list of tables in front matter?
mini-toc: false  # mini-table of contents at start of each chapter? (this just prepares it; you must also add \minitoc after the chapter titles)
mini-lot: false  # mini-list of tables by start of each chapter?
mini-lof: false  # mini-list of figures by start of each chapter?

params:
  corrections: false # set false to stop applying blue background to blocks of corrections

#####################
## output options  ##
#####################
output:
  bookdown::pdf_book:
    template: templates/template.tex
    keep_tex: true
    citation_package: biblatex  
    pandoc_args: ["--lua-filter=scripts_and_filters/correction_filter.lua"] #remove filter to stop applying blue background to inline corrections
  bookdown::gitbook:
    css: templates/style.css
    config:
      sharing:
        facebook: false
        twitter: false
        all: false
  bookdown::word_document2:
    toc: true   
link-citations: true
documentclass: book

---

By the way since yesterday I have been getting the following error:

 Missing \endcsname inserted.
<to be read again> 
                   \protect 
l.1169 ...tocite{hendlerSyzygySurferCreative2011} 
                                                  nous rappellent que ``surf...

from oxforddown.

ulyngs avatar ulyngs commented on August 27, 2024

ah we're getting somewhere now - for the error you're getting now, as the error message suggests, take a look at line 1169 in the generated tex file and see what's going on around "tocite{hendlerSyzygySurferCreative2011}"

Also, a general debugging tip at this stage (because it seems the problem is now in some part of your actual text) is to just cut the problem into smaller pieces - e.g., try only including one chapter of your thesis and see if it compiles correctly.

from oxforddown.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.