This repository contains the files for a simple thesis project created using amsterdown, a modified version of thesisdown, an R package that allows you to publish both LaTeX and online versions of your thesis written in Markdown. My nine-month thesis is included as an example, but I have changed the template to accommodate a more simple, shorter thesis as the other templates are for full-fledged PhD theses. Note that some functionalities (i.e., BiBTeX) recommended in LaTeX theses are not incorporated in my thesis specifically, but they easily can be.
Normally you would be required to install a number of dependencies including TinyTeX, RMarkdown, as well as amsterdown, but I have created a Docker image which launches an RStudio server with all of these installed. If you do not want to work with the files locally, you can launch this repository as a Binder project:
If you would instead like to build the Docker image and launch the associated Docker container, please follow the instructions below.
- Prerequisites
- Getting Started
- Working with the Project
- Stopping the Docker container
- Contact
Before you begin, make sure you have installed and opened Docker Desktop.
Clone the repository from GitHub:
git clone https://github.com/sohaamir/thesisdown_lite.git
Then change into the project directory:
cd thesisdown_lite
In the project directory, build the Docker image using the provided Dockerfile (this will take about 5GB of space):
docker build -t my_project .
This will create a new Docker image named my_project
.
You can see if the Docker image has been created by running:
docker images
Start the Docker container using the image you just built:
docker run -p 8787:8787 \
--mount type=bind, source=/path/to/your/repository \
--mount type=bind, target=/home/rstudio/project \
-e PASSWORD=MY_PASSWORD \
--name my_container \
my_project
Note the sub-commands:
--mount type=bind,source=$(pwd),target=/home/rstudio/project
: Mounts the current directory (where the repository is cloned) to the/home/rstudio/project
directory inside the container.-e PASSWORD=your-password
: Sets the password for the RStudio server (replaceyour-password
with your desired password).my_container
: The name of the container that you will build.my_project
: The name of the Docker image you built earlier.
Open your web browser and navigate to http://localhost:8787
. In the RStudio login screen, use the password you set in the previous step to access the RStudio server running in the Docker container.
- Once you've started the Docker container and accessed RStudio, you should then load the project by going to
File -> Open Project
and selectingindex.Rproj
. - You can then build the gitbook and pdfbook by selecting the 'Build' tab on the right hand side and clicking 'Build Book'.
To stop the Docker container, you can use the following command in a new terminal window:
docker stop my_container
To start the container again, use the same docker run
command as before.
To delete the container entirely, run:
docker rm my_container
If you have any suggestions, bugs or improvements on this template, please feel free to open a thread or drop me an email at [email protected].