Code Monkey home page Code Monkey logo

Comments (14)

franzbischoff avatar franzbischoff commented on August 11, 2024 2

I dunno if this was solved, but, for me the issue was solved when I removed the first space before "`":

abstract: |
 `r if(knit .....

from thesisdown.

jcrodriguez1989 avatar jcrodriguez1989 commented on August 11, 2024 1

Wow, I thought that commenting those lines would fix the "[WARNING] This document format requires a nonempty <title> element." issue.
Now, I have tried it again, and I'm getting the cites correctly.
thanks @ismayc , great package! ;)

from thesisdown.

ismayc avatar ismayc commented on August 11, 2024

Thanks for reporting, Christian. I'm still digging into what might be causing this change and hope to have an answer for you this week.

from thesisdown.

ismayc avatar ismayc commented on August 11, 2024

My comment on line 20 does suggest that one doesn't try to build the gitbook with the lines below it "on", but that's not necessarily clear. I think it's probably best that I switch to having specific files be used for the PDF and gitbook versions similar to what I did with the ModernDive book here. If you think that makes sense as well, let me know and I can get to working on changing it over.

from thesisdown.

christianholland avatar christianholland commented on August 11, 2024

Thanks for tackling my issue.

For me it feels a bit redundant to specify almost exactly the same files for the different output types, but if this is working I am happy to use it.

My only concern is about the pdf output. So far some files (e.g. abstract, acknowledgement, prefect, etc...) are passed from the yaml header in index.Rmd to preamble.txt where they are integrated in their respective Latex environment:

preface: |
  This is an example of a thesis setup to use the reed thesis document class
  (for LaTeX) and the R bookdown package, in general.

to

\Preface{
$preface$
}

How will this work when you specify all files in _bookdown.yml? Will you still be able to pass them to the preamble.txt?

from thesisdown.

ismayc avatar ismayc commented on August 11, 2024

The setup that you mentioned only really works with the PDF version, so the HTML version will need to include 00--prelim.Rmd as a file to use before index.Rmd in _bookdown.yml. If we can figure out a way to have the Preface and other non-main matter content work nicely with both HTML and LaTeX in the YAML, that's the best case scenario. Unfortunately, I couldn't figure out such a way in the past to incorporate the YAML to work with both.

One alternative is to remove the YAML specifying of this intro content and force everything to appear in their own Rmd files or we could just put the content in the index.Rmd file to force it to appear in the correct spot and that will also work with both the HTML and LaTeX versions. (This could also make using the _bookdown.yml file not be necessary.)

Complicated stuff ๐Ÿ˜„

from thesisdown.

christianholland avatar christianholland commented on August 11, 2024

I found a repo that uses an adapted version of your thesisdown package (https://github.com/lazappi/phd-thesis; https://github.com/lazappi/unimelbdown). Checking the gitbook version of the thesis (https://lazappi.github.io/phd-thesis/) indicates that @lazappi might have found a way to make it work. At least title, author and date appear correctly. Maybe @lazappi is willing to help

PS: Does tagging work across repositories?

from thesisdown.

lazappi avatar lazappi commented on August 11, 2024

I'm not sure if I came up with a different solution. I used the YAML fields for the PDF version and have this file which adds them to the HTML/DOCX versions https://github.com/lazappi/phd-thesis/blob/master/0-frontmatter/00-frontmatter.Rmd.

Not sure if that is useful or not. I'm a bit rusty on how this all works now but happy to help if I can.

from thesisdown.

ismayc avatar ismayc commented on August 11, 2024

Thanks, @lazappi. It doesn't seem that there is a clean solution here. Maybe it's best to just remove the YAML introductory content for the {thesisdown} template? That way specifying them as unnumbered in the index.Rmd file will transfer nicely over to all the various output formats (PDF, Gitbook, Word, etc.) to have them appear just before the Introduction unnumbered chapter?

from thesisdown.

jcrodriguez1989 avatar jcrodriguez1989 commented on August 11, 2024

Hi, sorry I come with another issue, but by googling I note that @christianholland is having the same (other) issue as me:

pandoc-citeproc: reference Molina1994 not found
pandoc-citeproc: reference reedweb2007 not found
pandoc-citeproc: reference noble2002 not found

there is no way I can get references for the gitbook version, however for the pdf version it is working like a charm. This is happening with the fresh thesisdown example, and also with my repo https://github.com/jcrodriguez1989/tesis_doctoral/

Any idea?
thanks!

from thesisdown.

ismayc avatar ismayc commented on August 11, 2024

Hi @jcrodriguez1989. I think it's probably best that I just remove the option to include the introductory material in YAML as I suggested in the comment above. I'll try to get this figured out over the next few weeks if that's OK with you.

from thesisdown.

ismayc avatar ismayc commented on August 11, 2024

Yep. The most up-to-date version of the package template removes the extra line all together:

abstract: '`r if(knitr:::is_latex_output()) paste(readLines(here::here("prelims", "00-abstract.Rmd")), collapse = "\n ")`'

from thesisdown.

daynefiler avatar daynefiler commented on August 11, 2024

Yep. The most up-to-date version of the package template removes the extra line all together:

abstract: '`r if(knitr:::is_latex_output()) paste(readLines(here::here("prelims", "00-abstract.Rmd")), collapse = "\n ")`'

Of note, the above removes line breaks, whereas the single space solution above does not. This was a VERY helpful thread.

from thesisdown.

github-actions avatar github-actions commented on August 11, 2024

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org whenever possible) and link to this issue. If a reprex is not applicable, recording a short Loom video showing what you are seeing can go a long way in helping to diagnose problems.

from thesisdown.

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.