/cookiecutter-latex-research-proposal

Personal template for LaTeX research proposals with Python cookiecutter

Primary LanguageTeXMIT LicenseMIT

cookiecutter-latex-research-proposal

Richard Wen
rrwen.dev@gmail.com

Personal template for LaTeX research proposals with Python cookiecutter.

Build Status GitHub license

Install

  1. Install Python
  2. Install cookiecutter via pip
  3. Install TeX Live or Miktex
pip install cookiecutter

Usage

  1. Create the LaTeX template using cookiecutter
  2. Change the directory to the folder with the same name as the template_name input
  3. Edit <template_name>/tex/body.tex as the research proposal text
  4. Render a pdf of the main file named as the tex_file input

In Windows:

cookiecutter gh:rrwen/cookiecutter-latex-research-proposal
cd <template_name>
make

In Linux/Mac:

cookiecutter gh:rrwen/cookiecutter-latex-research-proposal
cd <template_name>
chmod +x make.sh
./make.sh

See Implementation for more details.

Developer Notes

Create Github Repository

  1. Ensure git is installed
  2. Change directory to the generated folder cd <template_name>
  3. Initialize the repository
  4. Add the generated files to commit
  5. Create an empty Github repository with the same name as template_name
  6. Pull any changes if the Github repository is not empty
  7. Push the commit from 4. to your created Github repository
git init
git add .
git commit -a -m "Initial commit"
git remote add origin https://github.com/<github_user>/<template_name>.git
git pull origin master --allow-unrelated-histories
git push -u origin master

Implementation

This code creates a latex template using cookiecutter.

        cookiecutter              <-- template tool
             |
      cookiecutter.json           <-- template inputs
             |
{{cookiecutter.template_name}}    <-- generated template

The following files will be created inside a folder with the same name as the template_name input:

File Description
img/graphic.pdf Sample pdf as a graphic
body.tex LaTeX file containing the main content of the research proposal
commands.tex LaTeX custom commands used for the document
packages.tex LaTeX packages required for the document
references.bib BibTeX style references used in the document
LICENSE MIT license file automatically created from github
README.md a readme Markdown file with header section
make.sh Linux bash shell script to generate the pdf file
<tex_file>.tex LaTeX main file that gathers all the required tex files to generate the pdf
.gitignore LaTex Github ignore file
make.bat Windows batch script to generate the pdf file