GithubHelp home page GithubHelp logo

phinguyen44 / huwiwidown Goto Github PK

View Code? Open in Web Editor NEW
10.0 2.0 4.0 808 KB

RMarkdown template for theses written at HU Berlin WiWi

License: Other

TeX 78.81% R 21.19%
rmarkdown rmarkdown-template thesis-template

huwiwidown's Introduction

huwiwidown

The huwiwidown (pronounced "who-wee-wee-down") package provides a handy template for writing a dissertation or Bachelor's/ Master's Thesis at the Humboldt-Universität zu Berlin School of Business and Economics and rendering those files in a PDF format following the Humboldt LaTeX template found here.

Users write in R Markdown (which is basically a flavor of the Markdown markup language but with the ability to incorporate R code chunks using the knitr package), and the bookdown package (powered by pandoc ) is used to convert the code into LaTeX code and finally into a PDF document. There's other formats that can be created too, such as html documents, but that is outside the scope of this package.

In the event that you've never used bookdown before, check out this handy tutorial.

Introduction

Why use this instead of the provided LaTeX template? Though LaTeX is an incredibly powerful tool, the learning curve can be difficult and a lot of time is spent wasted on finding the correct formatting. This package sacrifices some of the expressiveness of LaTeX for the ease of use of Markdown, to allow the end user to focus on writing good content.

Markdown is a much easier-to-use, lightweight, no-frills markup language. The good news is that users can still inject LaTeX code directly into the Markdown pages, in the event he/she still wants to write in LaTeX.

This thesis will contain minor differences to the due to limitations in the pandoc output, but in general the appearance is almost entirely identical. An example of the output can be seen here.

Usage

Initial Setup

  1. To install the template, be sure you have the following:
  2. Install the necessary packages:
if (!require("devtools")) {
  install.packages("devtools", repos = "http://cran.rstudio.org")
}
devtools::install_github("rstudio/bookdown")
devtools::install_github("phister/huwiwidown")
  1. Create a New R Markdown document:

File -> New File -> R Markdown... then choose 'From template', then choose 'HU Thesis", and enter index as the Name. Note that this will currently only Knit if you name the directory index at this step.

If you're not using RStudio, navigate to an empty directory and then run the following code:

rmarkdown::draft("index.Rmd", template = "hu_thesis", package = "huwiwidown")

Rendering

To render your thesis, you can open index.Rmd in RStudio and then hit the "knit" button. Alternatively, you can use:

rmarkdown::render("index.Rmd")

Your thesis will be deposited in the thesis-output/ directory.

Components

The following describes the components in the template.

index.Rmd

This file is first created when generating a new template. It contains all the relevant meta-information (e.g. name, thesis title, advisor names). You will need to fill out the sections at the top of the page, which will then auto-populate your "Title Page" and "Declaration of Authorship". If you are also familiar with the YAML header, you can also add additional LaTeX parameters or decide whether you want to add optional pages to your thesis such as the "Acknowledgements" section or the "List of Tables".

_bookdown.yml

This is the main configuration file for your thesis. It determines what Rmd files are included in the output, and in what order. Arrange the order of your chapters in this file and ensure that the names match the names in your folders. The first file should always be the index.Rmd file. The rest will be the files that you create. Some example files are already included to help you along your way.

sections/

These are the sections or chapters that will be bound together in the final render. Here's where you write the sections that make your thesis. You can name the files whatever you like, so long as they are indexed in the _bookdown.yml file.

Note that you will not need to change 98-references.Rmd as the bibliography will be auto-generated in alphabetically order so long as you cite that item in the text and your bibliography is correctly located in bib/references.bib. References should stay in that position to ensure it appears after the text but before the appendix.

bib/

Store your bibliography (as bibtex files) here. This website may be helpful in generating the bibtex file in the correct format.

figures/ and data/

Store your figures and data here and reference them in your R Markdown files.

Structure of Thesis (Suggested)

In general, the HU suggests the following structure for the thesis, and what files in the template they correspond to:

Frontmatter:

  • titlepage (mandatory, auto-generated from template)
  • acknowledgement (prelim/00-acknowledge.Rmd)
  • abstract (prelim/00-abstract.Rmd)
  • table of contents (mandatory, auto-generated from template)
  • list of abbreviations (not mandatory, prelim/00-abbreviations.Rmd)
  • list of figures (not mandatory, auto-generated from template)
  • list of tables (not mandatory, auto-generated from template)

Body: the structure of the thesis body is not mandatory, but the references are:

  • introduction (sections/01-intro.Rmd)
  • methods (sections/02-method.Rmd)
  • data (sections/03-data.Rmd)
  • results (sections/04-results.Rmd)
  • conclusion (sections/05-conclusion.Rmd)
  • references (mandatory, auto-generated from template)
  • appendix (not mandatory, sections/99-appendix.Rmd)

Last page:

  • declaration of authorship (mandatory, auto-generated from template)

Further Resources

  1. Chester Ismay's thesisdown package: thesisdown
  2. Details from the HU WiWi: thesis resources
  3. Basic R Markdown syntax: R Markdown
  4. R Markdown reference guide: R Markdown Reference

huwiwidown's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

huwiwidown's Issues

changing bibtex style

According to the bookdown book I should be able to simply add

biblio-style: "apalike"

to the yaml. However, that doesn't seem to work.

Any ideas? Thanks a lot in advance!

environment cal references undefined

Hi! As a fellow student at HU, I was thrilled to find this template to help with my master thesis. I installed it as per the instructions but I got the following error:

! LaTeX Error: Environment CSLReferences undefined.

I saw the same error reported here in the original template (thesis down) and solved by adding the following to template.tex

$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$

But doing this with your template still results in the same issue. Could you tell me how could I solve the issue? Thanks in advanced!

!LaTex error: environment CSLReferences undefined

I got this error when I tried to knit. Can you give some insight, please?

Use of uninitialized value $ver in scalar chomp at C:/Users/hp/AppData/Roaming/TinyTeX/tlpkg/TeXLive/TLWinGoo.pm line 196.
Use of uninitialized value $ver in substitution (s///) at C:/Users/hp/AppData/Roaming/TinyTeX/tlpkg/TeXLive/TLWinGoo.pm line 197.
Use of uninitialized value $ver in substitution (s///) at C:/Users/hp/AppData/Roaming/TinyTeX/tlpkg/TeXLive/TLWinGoo.pm line 197.
Can't spawn "cmd.exe": No such file or directory at C:/Users/hp/AppData/Roaming/TinyTeX/tlpkg/TeXLive/TLUtils.pm line 2915.
Setting up tar with C:/Users/hp/AppData/Roaming/TinyTeX/tlpkg/installer/tar.exe as C:\Users\hp\AppData\Roaming\TinyTeX\tlpkg\installer\tar.exe didn't work
Can't spawn "cmd.exe": No such file or directory at C:/Users/hp/AppData/Roaming/TinyTeX/tlpkg/TeXLive/TLUtils.pm line 2898.
Can't spawn "cmd.exe": No such file or directory at C:/Users/hp/AppData/Roaming/TinyTeX/tlpkg/TeXLive/TLUtils.pm line 2915.
Setting up curl with C:/Users/hp/AppData/Roaming/TinyTeX/tlpkg/installer/curl/curl.exe as C:\Users\hp\AppData\Roaming\TinyTeX\tlpkg\installer\curl\curl.exe didn't work
Can't spawn "cmd.exe": No such file or directory at C:/Users/hp/AppData/Roaming/TinyTeX/tlpkg/TeXLive/TLUtils.pm line 2898.
Can't spawn "cmd.exe": No such file or directory at C:/Users/hp/AppData/Roaming/TinyTeX/tlpkg/TeXLive/TLUtils.pm line 2915.
Setting up wget with C:/Users/hp/AppData/Roaming/TinyTeX/tlpkg/installer/wget/wget.exe as C:\Users\hp\AppData\Roaming\TinyTeX\tlpkg\installer\wget\wget.exe didn't work
Can't spawn "cmd.exe": No such file or directory at C:/Users/hp/AppData/Roaming/TinyTeX/tlpkg/TeXLive/TLUtils.pm line 2898.
Can't spawn "cmd.exe": No such file or directory at C:/Users/hp/AppData/Roaming/TinyTeX/tlpkg/TeXLive/TLUtils.pm line 2915.
Setting up lz4 with C:/Users/hp/AppData/Roaming/TinyTeX/tlpkg/installer/lz4/lz4.exe as C:\Users\hp\AppData\Roaming\TinyTeX\tlpkg\installer\lz4\lz4.exe didn't work
Can't spawn "cmd.exe": No such file or directory at C:/Users/hp/AppData/Roaming/TinyTeX/tlpkg/TeXLive/TLUtils.pm line 2898.
Can't spawn "cmd.exe": No such file or directory at C:/Users/hp/AppData/Roaming/TinyTeX/tlpkg/TeXLive/TLUtils.pm line 2898.
Can't spawn "cmd.exe": No such file or directory at C:/Users/hp/AppData/Roaming/TinyTeX/tlpkg/TeXLive/TLUtils.pm line 2915.
Setting up xz with C:/Users/hp/AppData/Roaming/TinyTeX/tlpkg/installer/xz/xz.exe as C:\Users\hp\AppData\Roaming\TinyTeX\tlpkg\installer\xz\xz.exe didn't work
Can't spawn "cmd.exe": No such file or directory at C:/Users/hp/AppData/Roaming/TinyTeX/tlpkg/TeXLive/TLUtils.pm line 2898.
cannot contact mirror.ctan.org, returning a backbone server!

C:\Users\hp\AppData\Roaming\TinyTeX\texmf-dist\scripts\texlive\tlmgr.pl: TLPDB::from_file could not initialize from: https://www.ctan.org/tex-archive/systems/texlive/tlnet/tlpkg/texlive.tlpdb
C:\Users\hp\AppData\Roaming\TinyTeX\texmf-dist\scripts\texlive\tlmgr.pl: Maybe the repository setting should be changed.
C:\Users\hp\AppData\Roaming\TinyTeX\texmf-dist\scripts\texlive\tlmgr.pl: More info: https://tug.org/texlive/acquire.html
Use of uninitialized value $ver in scalar chomp at C:/Users/hp/AppData/Roaming/TinyTeX/tlpkg/TeXLive/TLWinGoo.pm line 196.
Use of uninitialized value $ver in substitution (s///) at C:/Users/hp/AppData/Roaming/TinyTeX/tlpkg/TeXLive/TLWinGoo.pm line 197.
Use of uninitialized value $ver in substitution (s///) at C:/Users/hp/AppData/Roaming/TinyTeX/tlpkg/TeXLive/TLWinGoo.pm line 197.
Can't spawn "cmd.exe": No such file or directory at C:/Users/hp/AppData/Roaming/TinyTeX/tlpkg/TeXLive/TLUtils.pm line 2915.
Setting up tar with C:/Users/hp/AppData/Roaming/TinyTeX/tlpkg/installer/tar.exe as C:\Users\hp\AppData\Roaming\TinyTeX\tlpkg\installer\tar.exe didn't work
Can't spawn "cmd.exe": No such file or directory at C:/Users/hp/AppData/Roaming/TinyTeX/tlpkg/TeXLive/TLUtils.pm line 2898.
Can't spawn "cmd.exe": No such file or directory at C:/Users/hp/AppData/Roaming/TinyTeX/tlpkg/TeXLive/TLUtils.pm line 2915.
Setting up curl with C:/Users/hp/AppData/Roaming/TinyTeX/tlpkg/installer/curl/curl.exe as C:\Users\hp\AppData\Roaming\TinyTeX\tlpkg\installer\curl\curl.exe didn't work
Can't spawn "cmd.exe": No such file or directory at C:/Users/hp/AppData/Roaming/TinyTeX/tlpkg/TeXLive/TLUtils.pm line 2898.
Can't spawn "cmd.exe": No such file or directory at C:/Users/hp/AppData/Roaming/TinyTeX/tlpkg/TeXLive/TLUtils.pm line 2915.
Setting up wget with C:/Users/hp/AppData/Roaming/TinyTeX/tlpkg/installer/wget/wget.exe as C:\Users\hp\AppData\Roaming\TinyTeX\tlpkg\installer\wget\wget.exe didn't work
Can't spawn "cmd.exe": No such file or directory at C:/Users/hp/AppData/Roaming/TinyTeX/tlpkg/TeXLive/TLUtils.pm line 2898.
Can't spawn "cmd.exe": No such file or directory at C:/Users/hp/AppData/Roaming/TinyTeX/tlpkg/TeXLive/TLUtils.pm line 2915.
Setting up lz4 with C:/Users/hp/AppData/Roaming/TinyTeX/tlpkg/installer/lz4/lz4.exe as C:\Users\hp\AppData\Roaming\TinyTeX\tlpkg\installer\lz4\lz4.exe didn't work
Can't spawn "cmd.exe": No such file or directory at C:/Users/hp/AppData/Roaming/TinyTeX/tlpkg/TeXLive/TLUtils.pm line 2898.
Can't spawn "cmd.exe": No such file or directory at C:/Users/hp/AppData/Roaming/TinyTeX/tlpkg/TeXLive/TLUtils.pm line 2898.
Can't spawn "cmd.exe": No such file or directory at C:/Users/hp/AppData/Roaming/TinyTeX/tlpkg/TeXLive/TLUtils.pm line 2915.
Setting up xz with C:/Users/hp/AppData/Roaming/TinyTeX/tlpkg/installer/xz/xz.exe as C:\Users\hp\AppData\Roaming\TinyTeX\tlpkg\installer\xz\xz.exe didn't work
Can't spawn "cmd.exe": No such file or directory at C:/Users/hp/AppData/Roaming/TinyTeX/tlpkg/TeXLive/TLUtils.pm line 2898.
cannot contact mirror.ctan.org, returning a backbone server!

C:\Users\hp\AppData\Roaming\TinyTeX\texmf-dist\scripts\texlive\tlmgr.pl: TLPDB::from_file could not initialize from: https://www.ctan.org/tex-archive/systems/texlive/tlnet/tlpkg/texlive.tlpdb
C:\Users\hp\AppData\Roaming\TinyTeX\texmf-dist\scripts\texlive\tlmgr.pl: Maybe the repository setting should be changed.
C:\Users\hp\AppData\Roaming\TinyTeX\texmf-dist\scripts\texlive\tlmgr.pl: More info: https://tug.org/texlive/acquire.html
! LaTeX Error: Environment CSLReferences undefined.

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

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.