ismayc / thesisdown Goto Github PK
View Code? Open in Web Editor NEWAn updated R Markdown thesis template using the bookdown package
License: Other
An updated R Markdown thesis template using the bookdown package
License: Other
I have not been able to use italics for Latin names in a figure caption when plotting within the r-chunk.
I have tried:
*Ulva*
_Ulva_
{r plot1, echo=true, fig.align='center', fig.cap="A plot with a scientific name like Ulva", message=FALSE, warning=FALSE, out.width="90%"}
Something similar was referred to here:
knitr#1334
Dear Ismayc,
Firstly, thank you for creating this great spin-off of the bookdown package, I have very much enjoyed working in it. I am currently within the last days of formatting my master's thesis before submitting, however, I have trouble figuring out how to delete white pages generated if a previous chapter did not end on an odd page. Our thesis is in "paper format" and thus these white pages are undesirable in the body. Would it be possible to just limit a white page post title page? I presume \cleardoublepage or \RTcleardoublepage should be adjusted in the .cls, however due to limited time I do not have the luxury of getting more familiar with the syntax.
Thank you in advance!
Kind regards,
Bavo
Hello,
I'm excited about the possibility of using the bookdown
and thesisdown
packages to create my dissertation. However, I'm very new to LaTeX, and really have no idea what I'm doing.
My university has some .tex and .sty files that I think I can eventually get to work with my content. They are available in a zip file here: http://graduate.auburn.edu/current-students/etd-samples/
What I'm trying to do is build a very basic version of my dissertation using thesisdown
and the Auburn template files to send to my grad school administrators to make sure the formatting is correct before I devote myself to writing the complete version in thesisdown
.
Using the zip file provided by Auburn, I opened the ausample.tex file in RStudio and tried to knit it to a pdf - and I got errors about it not finding packages.
I'm hoping to write my content in .rmd files then build them into a book similar to the thesisdown example. I'm wondering if you would be able to provide any insights as to how likely it is I'll be able to use what Auburn provides with the bookdown/thesisdown packages to properly format my dissertation.
Thanks!
Hi,
first of all thank you very much for providing a template to write my thesis with bookdown.
I struggle with the automatic designation of the Chapters in the pdf output.
I managed to turn it of for knitting to gitbook by deleting the chapter section in the "_bookdown.yml" file.
I also managed to turn off the automatic designation of the chapters in the table of contents of the pdf file by deleting this part of the reedthesis.cls file:
\def@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
\refstepcounter{chapter}%
\typeout{@Chapapp\space\thechapter.}%
\addcontentsline{toc}{chapter}%
{@Chapapp\space\thechapter:\space#1}%
\else
\addcontentsline{toc}{chapter}{#1}%
\fi
\else
\addcontentsline{toc}{chapter}{#1}%
\fi
\chaptermark{#1}%
\addtocontents{lof}{\protect\addvspace{10\p@}}%
\addtocontents{lot}{\protect\addvspace{10\p@}}%
\if@twocolumn
@topnewpage[@makechapterhead{#2}]%
\else
@makechapterhead{#2}%
@afterheading
\fi}
But somehow the Chapters begin with "Chapter #" and i don't know where to change that for the .pdf file
Can someone help me with this issue?
Hi,
First, thanks for this awesome template. I wondered if there's a way to have some text in the figure capture in italics or bold? There should be, no?
I tried...
but none worked (the latter two without the spaces of course).
Thanks.
Hi Chester,
As you saw in #2, I have an interest in utilizing this for the Oregon State University thesis template. My work is currently on my osu-thesis branch. I'm wondering if you would be up for expanding this package in a similar vein to rticles. Plus, if we get people from PSU and UO to contribute, we could have an oregonthesis package on our hands 😸 . What do you think?
Currently highlighting colors are hardcoded in reedthesis.cls
, it would be great to be able to use the knitr themes, though.
I was poking around and noticed that there are quite a lot of derivative files in this package. I'm wondering which files exactly are derivative (for example, it's clear that skeleton/_book/ is a derivative, but others are not so clear.)
Otherwise, this is a fantastic idea. I plan on using this framework using the style guide from Oregon State University for my own dissertation.
Hello,
Do you have any idea how to fix this error?
[pandoc.exe warning] --chapters is deprecated. Use --top-level-division=chapter instead.
I now am not able to have the temporary thesis.Rmd be deleted after the pdf is created.
Thanks!
Hi,
I'm looking forwards using your package. Now I'm busy integrating it into my folder structure and would really prefer naming the folder text
or something else. But as you point out in README.md line 35 it's necessary to name it index
. I'd love to contribute to your package, so I though you could provide me some infos about this?
Hi again,
Don't know whether you're interested or not, but I thought it would be cool to be able to change the colorlinks
options the way it can be done with bookdown, directly in the yaml header, since this can't be done with toc = true. Though, it can be done by slightly changing the template.tex, but I would understand if you think it's unnecessary, as people could just tweak the template.tex themselves. Yet if you're interested let me know.
Cheers !
Tracked down the error after looking at the line # in thesis.tex instead of thesis.Rmd (face palm emoji)
[pandoc warning] --chapters is deprecated. Use --top-level-division=chapter instead.
! FancyVerb Error:
Empty verbatim environment
\FV@Error ... {FancyVerb Error:
\space \space #1}
Error: Failed to compile thesis.tex. See thesis.log for more info.
Execution halted
thesis.log - look @ theses lines:
\begin{verbatim}
Loading required package: gdata
\end{verbatim}
\begin{verbatim}
gdata: read.xls support for 'XLS' (Excel 97-2004) files ENABLED.
\end{verbatim}
\begin{verbatim}
\end{verbatim}
\begin{verbatim}
gdata: read.xls support for 'XLSX' (Excel 2007+) files ENABLED.
\end{verbatim}
Hotfix: remove "gdata" package dependency and recompile
Fixed: closing issue
Hi,
I have a question, that I can not figure out by myself.
How can I force the thesis down to knit also the abstract code when I use pdf version? In gitbook it knits abstract but for pdf there is this expression r if(knitr:::is_latex_output()) paste(readLines("00-abstract.Rmd"), collapse = ' ')
in YAML preamble that I do not know how to change.
Thanks beforehand.
The various references to line numbers throughout the skeleton.rmd are incorrect.
Suggest referencing the specific arguments rather than to the line numbers.
When knitting the template on a fresh install I get the following:
Error in file(con, "r") : cannot open the connection
Calls: <Anonymous> ... mapply -> <Anonymous> -> readUTF8 -> readLines -> file
In addition: Warning message:
In file(con, "r") : cannot open file 'index.Rmd': No such file or directory
Execution halted
Removing index.Rmd
from _bookdown.yml
clears the issue :)
Thanks for this great package 😃
High @ismayc
I have a problem with chunks. In my first chunk of index.Rmd (which than becomes thesis.Rmd) I have settled my knitr options like this
knitr::opts_chunk$set( fig.path = "figure/", echo = FALSE, out.width='\\textwidth',fig.height=6, fig.width=6 )
in order to have all other chunks to follow this predefined options, but unfortunately they don't.
How one can fix this behaviour?
Thanks beforehand.
Are other users experiencing issues with this template under new versions of pandoc?
This has to be a thing, right?
Hi Chester,
I got the Latex template used for submitting thesis at my Uni, and it is completely different to Reeds'. Normally when I checked some adaptations of thesisdown they keep the same format provided by Reed with some small changes. Here is the thing:
SO struggling with the code and packages (specially the ones related to the language, spanish in this case) I managed to render one Latex sample following the requiered format standards, but I lost some features that thesisdown had such as some functions created to pass YAML values to Latex.
I noticed that there are some definitions of those functions in the reedthesis.cls file between lines 193 an 213, and between lines 351 to the end. You designed the \author, \degrees, etc. that are values given in the skeleton.RMD that then pass to the .tex file.
Here is my thing: I copied those definitions into my .cls file, but it turns out the functions are added to the .tex file, the values are correctly passed, but nothing is rendered with the defined functions into the PDF file. Probably I'm missing something, but I would like to go through this pain only once, and contribute creating the format for my Uni.
I will really appreaciate your guidance,
Thanks,
Alfonso
I have a coupe of code files, that I try to include into my thesis. Basically like a figure, with a caption and reference. I can include the code and it is shown, but does not get a caption etc.
```{r examplebash, engine = 'bash', eval = FALSE, code=readLines("examplebash.sh"), fig.cap="Example bash script"}
```
My question is, is there an easy way to do this? I could basically make screenshots and include them, but as I have a bit more than only 1 or 2 of them, I'd rather have that process kind of automated and less prone to errors. I don't necessarily need a new category - like "listing" - for it. Figure would be sufficient, although I'd be interested in how much efford it would be to achive it.
Could someone point me in the right direction of where my mistake is? Thank you.
Hi there,
Thank you for your template, looks great. I encountered the issue that .png's and .jpg's files are no scaled and therefore just continued over the edge...
I solved the issue adding this line to your template:
\setkeys{Gin}{width=\linewidth}
Best regards
Hi,
first of all thank you very much for providing a skeleton to write my thesis with bookdown.
I figured out that line 22-23 of the index.Rmd
lead to various errors when knitting the file as a gitbook:
abstract: |
`r if(knitr:::is_latex_output()) paste(readLines("00-abstract.Rmd"), collapse = '\n ')`
[WARNING] Could not parse YAML metadata at line 44 column 1: :23:0: leading empty lines contain more spaces than the first non-empty line in scalar
pandoc-citeproc: reference Molina1994 not found
pandoc-citeproc: reference reedweb2007 not found
pandoc-citeproc: reference noble2002 not found
[WARNING] This document format requires a nonempty <title> element.
Please specify either 'title' or 'pagetitle' in the metadata.
Falling back to 'thesis.utf8'
Especially the second warning is critical as it removes the information about title, author and date from the gitbook. Hence, it starts directly with Introduction
Removing line 22-23 solves these problem (but is at least for me not an option to solve this issue)
Thanks,
Christian
Hello,
Not sure if this could have anything to do with #7, but currently attempting to inserting a full page image with include_graphics()
.
I am able bring in the image when I scale it down to 65% using out.width="60%", out.height="60%"
, but anything above this it simply disappears when the document is knit to pdf. I have also experimented with this as both a .png and a .pdf to no effect.
The image is an A4 map, and my goal is to use as much of the available space within the margins as possible to display the map. Therefore I currently start a new page right before the include_graphics()
chunk using \newpage
.
As I understand it, image scaling with dpi argument should not matter, as it should be over-written by my out.width
argument.
Not sure what to try next, but feeling like I might be missing a certain chunk argument or something similar to get the desired result?
Any general advice on how to get a splashy full page graphic here and there (ideally over the top of the page number for that page) but still with a figure caption that can be linked to would be most appreciated! I am working with huwiwidown for reference.
Hi, I am trying to use the terminal instead of RStudio's knit to build the PDF. I run this command to do it:
Rscript -e 'bookdown::render_book("index.Rmd", "bookdown::pdf_book")'
Unfortunately, I got this error:
/usr/bin/pandoc +RTS -K512m -RTS thesis.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output thesis.tex --table-of-contents --toc-depth 2 --template /home/ismailsunni/R/x86_64-pc-linux-gnu-library/3.6/rmarkdown/rmd/latex/default-1.17.0.2.tex --number-sections --highlight-style tango --latex-engine pdflatex --variable graphics=yes --variable 'geometry:margin=1in' --variable 'compact-title:yes' --include-in-header /tmp/Rtmppe41Um/rmarkdown-str2c4377d9ac86.html --variable tables=yes --standalone --filter /usr/bin/pandoc-citeproc
! Undefined control sequence.
l.1203 \backmatter
Error: Failed to compile thesis.tex. See https://yihui.name/tinytex/r/#debugging for debugging tips. See thesis.log for more info.
Execution halted
It's strange because I can knit it from RStudio just fine.
Is there any special setting or command to knit to PDF from the terminal?
Thanks!
Hi @ismayc,
I have an issue when I insert citation and/or text styling within a fig.cap.
They are not recognized and they are displayed as basic text when I ask for pdf output (it works fine for HTML and Word output).
I saw your issue in boodown repo issues #203 but even after having re-install my latex distribution it still doesn't work for me (my OS is Linux CentOS 7).
Thanks again for your package and I attach a screenshot to explain my issue if it wasn't clear.
Hey guys! I am trying to render my thesis using thesisdown, but for some reason, pandoc cannot locate the template file?
This is the error i am getting:
/usr/bin/pandoc +RTS -K512m -RTS thesis.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output thesis.tex --table-of-contents --toc-depth 3 --template template.tex --number-sections --highlight-style tango --latex-engine pdflatex --top-level-division=chapter --variable tables=yes --standalone --filter /usr/bin/pandoc-citeproc
pandoc: Could not find data file /usr/share/pandoc/data/templates/template.tex
Error: pandoc document conversion failed with error 97
Execution halted
This is my header:
---
author: 'Peder G. Landsverk'
date: 'May 2019'
title: 'My thesis'
csl: refstyle.csl
bibliography: lib.bib
output:
thesisdown::thesis_pdf:
header-includes:
- \setlength{\parindent}{0em}
- \setlength{\parskip}{1em}
acknowledgements: "..."
dedication: "..."
---
Hi guys, I´m having this issue to install thesisdown:
"package 'dplyr' was built under R version 3.6.2"
I´ve tried downgrading dplyr, reinstalling several other packages but this error keeps coming up. Is there any way I can work this around to sucessfully install thesisdown? I´m super interested in this package since I really need to write my thesis.
I also noticed someone had a similarly issue when R 3.6 came out and the issue solved when moving to R 3.6.1, I tried downgrading R but it didn't work either.
Thanks,
Hello,
I have been experiencing some issues with knitting my thesisdown to pdf while relying on the tinytex package. Without getting into that topic, I'm rather wondering if it is possible to rely on an alternative source of Latex from knitting?
Mainly I am thinking this might be possible is as the thesisdown doc reads
By far the easiest way to install LaTeX on any platform is with the tinytex R package
But is this the only option? Does the thesisdown package automatically enforce or search for TinyTex alone?
To try it out I have removed TinyTex and installed the full TeX Live for windows, but this is not automatically recognized by my RStudio so far - so would value a little guidance on kniting my thesisdown with the local TeX Live if it's possible.
> install.packages('thesisdown')
Warning in install.packages :
package ‘thesisdown’ is not available (for R version 3.3.2)
Is there any chance that thesisdown
can be updated for R 3.3.2 or support for it enabled?
Hi!
When I change the output to thesis_pdf: default, I get an error
/usr/lib/rstudio-server/bin/pandoc/pandoc +RTS -K512m -RTS thesis.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output thesis.tex --table-of-contents --toc-depth 3 --template template.tex --number-sections --highlight-style tango --latex-engine pdflatex --top-level-division=chapter --variable tables=yes --standalone --filter /usr/lib/rstudio-server/bin/pandoc/pandoc-citeproc
output file: thesis.knit.md
pandoc: unrecognized option `--top-level-division=chapter'
Try pandoc --help for more information.
Error: pandoc document conversion failed with error 2
Please delete thesis.Rmd after you finish debugging the error.
Execution halted
But the gitbook output works :) Any suggestions?
Here's my session info:
sessionInfo()
R version 3.4.2 (2017-09-28)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 17.04
Matrix products: default
BLAS: /usr/lib/libblas/libblas.so.3.7.0
LAPACK: /usr/lib/lapack/liblapack.so.3.7.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
other attached packages:
[1] thesisdown_0.0.2 knitr_1.17 bookdown_0.5.11 ggplot2_2.2.1 dplyr_0.7.4 devtools_1.13.4
loaded via a namespace (and not attached):
[1] Rcpp_0.12.13 bindr_0.1 magrittr_1.5 munsell_0.4.3 colorspace_1.3-2 R6_2.2.2
[7] rlang_0.1.2 stringr_1.2.0 plyr_1.8.4 tools_3.4.2 grid_3.4.2 gtable_0.2.0
[13] withr_2.1.1 htmltools_0.3.6 rprojroot_1.3-1 yaml_2.1.16 lazyeval_0.2.0 assertthat_0.2.0
[19] digest_0.6.13 tibble_1.3.4 bindrcpp_0.2 rsconnect_0.8.5 evaluate_0.10.1 memoise_1.1.0
[25] glue_1.1.1 rmarkdown_1.8 stringi_1.1.5 compiler_3.4.2 backports_1.1.2 scales_0.5.0
[31] pkgconfig_2.0.1
Not exactly an issue. Thanks for an awesome template, I'm using it for my master thesis in Biotechnology as I like latex and also have large amounts of data analysis in R. But how can I change the front page? I would like to have a more attractive one than pure text :) Thanks in advance.
Hello again @ismayc ,
I just wanted to start by saying thank you for reply so quickly to my previous comments!
I have now been able to knit the index.Rmd as a pdf successfully, however once it has completed the deletion of the temporary thesis.Rmd files associated with it does not occur. This means every time I want to re-knit I need to go and delete all of the thesis files that were created previously.
I do not see any warnings in the markdown now that I have updated to Pandoc >=2.0 as you suggested in issue #39 . The only message that appears is:
Please delete thesis.Rmd after you finish debugging the error.
I discovered this issue when returning to my own forked version of zkamvar's beaverdown called brockdown.
I have tried using rstudio/bookdown but the problem does not seem to be occurring. I worked my way back through thesisdown, beaverdown, and brockdown and they all have the same issue.
Any suggestions?
Thank you.
Is it possible to add a note about how to generate a pdf version of the thesis to README.md?
Hello! I am sorry, but I could not understand how to put everything together into a .pdf file after constructing each chapter separately!
Hi,
How can I add List of Abbreviations/Nomenclature/Symbols to yams, or manually, preferably on preamble part?
Thanks beforehand
Hi!
I am using your template and it is very nice.
However I have an issue with figures.
I use to put figure title and figure description using chunk label:
fig.cap=Fig title : Figure description
.
My issue is that the whole description appears in within the table of figures.
Is there a way to only have figure title ?
Thanks
PS: Sorry for my poor english, I'm french ;)
Hi guys, I´m having this issue to install thesisdown:
"package 'dplyr' was built under R version 3.6.2"
I´ve tried downgrading dplyr, reinstalling several other packages but this error keeps coming up. Is there any way I can work this around to sucessfully install thesisdown? I´m super interested in this package since I really need to write my thesis.
I also noticed someone had a similarly issue when R 3.6 came out and the issue solved when moving to R 3.6.1, I tried downgrading R but it didn't work either.
Thanks,
Hi,
Thanks for this great package! I've been having trouble with the bibliography: when I knit a PDF the citations appear as expected, although at the beginning of the References section the word "placeholder" shows up before the first reference even though I can't find it anywhere in the templates or any of my files. However when I knit as a gitbook all the citations appear as ??? and the References section is empty. Not sure what I'm doing wrong...
Thanks for your help!
I recently upgraded to the new version of Rstudio (which I think has a newer version of pandoc in it) and knitting either html or pdf throws the
pandoc-citeproc reference not found
for all of my references.
I tried a minimal example using only bookdown and this worked no problem.
Has anyone else encountered this issue?
I've tried reinstalling everything and the problem persists.
nevermind. problem in my yaml
Questions:
highlight
for the code snippets?Hi it's me again !
I have some table I retrieved making a screenshot.
So I would like to know if there is a way to directly include it as a table and not like a figure.
Thanks,
Thomas
Hello,
I have just downloaded the thesisdown package and would like to use it for my thesis.
However, when I load a new Rmd file with your template and I try to knit it without changing anything I receive this error message:
Error in file(con, "r") : cannot open the connection
Calls: ... mapply -> -> readUTF8 -> readLines -> file
In addition: Warning message:
In file(con, "r") : cannot open file 'index.Rmd': No such file or directory
Execution halted
Do you know what is wrong? And why it does not work?
Thanks a lot.
Not aware of a way to do this right now since index.Rmd
compiles before any of the other Rmds.
I created a new package for UoM but after installing it, it only appears under the RMarkdown template list after restarting my R session. Is this something related to the way the package is configured? Thesisdown and unswthesisdown don't have this problem.
I'm using RStudio Version 1.2.1335 and R 3.6.0 in Windows x64.
Hi,
Thanks for sharing your template, it is very neat.
Just to mention that the pandoc argument chapters is now deprecated and should be replaced with
pandoc_args = "--top-level-division=chapter". By the way, if you want to provide a French template, I can send my modified version to you. Otherwise I could share it on my Github and put your name in the references.
Cheers,
Keurcien
Hello,
I would like to have 4 levels of numbers for my sections (e.g. 1.2.3.4). I tried adding number_sections: true to output but it did not work. What is the correct way to supply this parameter?
Thank you
While knitting to a .pdf version, I kept running into the following bug:
! LaTeX Error: Environment cslreferences undefined.
According this r-markdown issue the error should be fixed in the latest rmarkdown development version, although this is not the case for me when I'm working with the thesis down template.
Any thoughts?
Adding the following lines of code to template.tex
fixed it for me at least.
$if(csl-refs)$
\newlength{\cslhangindent}
\setlength{\cslhangindent}{1.5em}
\newenvironment{cslreferences}%
{$if(csl-hanging-indent)$\setlength{\parindent}{0pt}%
\everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces$endif$}%
{\par}
$endif$
HI @ismayc,
By default settings, I see that entire figure legends get listed in the List of figures
. Is there any way that I can only list only the first sentences of figure legends.
I went through the demo thesis.pdf but couldn't find any discussion on this. May be you may know where and how to tweak the code for this.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.