Richard Wen
[email protected]
Personal template for LaTeX documents following thesis, major research papers, and dissertation submission guidelines by the Yeates School of Graduate Studies at Ryerson University.
- Install Python
- Install cookiecutter with pip
- Install TeX Live or Miktex
- Install git
- Install perl
- Add TeX Live path or Miktex path to system or environmental paths
pip install cookiecutter
- Create a template using cookiecutter with a user input prompt
- Change directory to the
project_name
folder (based on user input) with cd - Modify LaTeX files inside
front_matter
,back_matter
, andmain_body
folders - Create a PDF file from the LaTex files with
make.bat
ormake.sh
- Re-create PDF file as needed with Step 4
In windows:
cookiecutter gh:rrwen/cookiecutter-latex-ryerson
cd project_name
make
In Linux/Mac:
cookiecutter gh:rrwen/cookiecutter-latex-ryerson
cd project_name
chmod +x make.sh
./make.sh
See Implementation for more details.
You may wish to also create a Github repository for your paper:
- Ensure git is installed
- Change directory to the
project_name
folder - Initialize the repository with git init
- Add the template files to commit with git add
- Sign up for a Github Account if you have not already
- Create an empty Github repository with the same name as
project_name
- Add the empty remote repository from Step 6 with git remote
- (Optional) Pull any changes if the Github repository is not empty with git pull
- Push the commit from Step 4 to your created Github repository with git push
- View your Github repository at
https://github.com/<github_user>/<project_name>
cd project_name
git init
git add .
git commit -a -m "Initial commit"
git remote add origin https://github.com/<github_user>/<project_name>.git
git pull origin master --allow-unrelated-histories
git push -u origin master
This code creates folders and files for cookiecutter templates.
- The main file is cookiecutter.json which defines the inputs for the command line interface
- The inputs then replace any values surrounded with
{{}}
inside the folder {{cookiecutter.project_name}}
cookiecutter <-- template tool
|
cookiecutter.json <-- template inputs
|
{{cookiecutter.project_name}} <-- generated template
The following files will be created inside a folder with the same name as the project_name
input:
File | Description |
---|---|
back_matter/appendices.tex | a LaTeX file containing the appendices content |
back_matter/bibliography.bib | a BibTeX file for storing references |
back_matter/bibliography.tex | a LaTeX file containing the automatic bibliography |
back_matter/glossary.tex | a LaTeX file containing the glossary content |
back_matter/index.tex | a LaTeX file containing the index content |
code/helloworld.py | a sample Python file to demonstrate code listings |
front_matter/abstract.tex | a LaTeX file containing the abstract content |
front_matter/acknowledgements.tex | a LaTeX file containing the acknowledgements content |
front_matter/authors_declaration.tex | a LaTeX file containing the declaration content |
front_matter/dedication.tex | a LaTeX file containing the dedication content |
front_matter/list_of_appendices.tex | a LaTeX file containing the automatic list of appendices using commands in custom.tex |
front_matter/list_of_figures.tex | a LaTeX file containing the automatic list of figures |
front_matter/list_of_tables.tex | a LaTeX file containing the automatic list of tables |
front_matter/table_of_contents.tex | a LaTeX file containing the automatic table of contents |
front_matter/title_page.tex | a LaTeX file containing the title page |
figures/ | folder for figure image files (.pdf, .png, .jpg) |
figures/graphic.pdf | sample figure image in .pdf format |
main_body/chapter01_background.tex | a LaTeX file containing the background content |
main_body/chapter02_methods.tex | a LaTeX file containing the method content |
main_body/chapter03_results.tex | a LaTeX file containing the results content |
main_body/chapter04_discussion.tex | a LaTeX file containing the discussion content |
main_body/chapter05_conclusion.tex | a LaTeX file containing the conclusion content |
main_body/introduction.tex | a LaTeX file containing the introduction content |
.gitignore | a gitignore file for manually untracking files |
.travis.yml | a Travis CI file for automatic testing |
{{cookiecutter.vars.tex_file}}.tex | the main LaTeX file for producing the PDF (named lastnameYear_project_name.tex ) |
LICENSE | MIT license file automatically created from github |
make.bat | a Batch file for creating the PDF in Windows |
make.sh | a Shell Script for creating the PDF in Linux/Mac |
packages.tex | a file containing the required LaTeX packages used in the template |
README.md | a readme Markdown file with header section |