I often find myself thinking of ways to automate repitive tasks. This led me to creating tex-init, a shell script designed to simplify the initiation of LaTeX projects. It offers a command-line interface (CLI) to select between predefined LaTeX templates, then creates the project structure and main .tex file. This article teaches you how to achieve a similiar setup.


project_name
├── figures
│   ├── uts_logo.png
│   └── title_image.png
├── sections
│   ├── preamble.tex
│   └── titlepage.tex
├── bib
│   └── bibliography.bib
├── project_name.tex
└── project_name.pdf

Prerequisites

Before diving into tex-init, make sure you have the following:

  • A Linux system with a LaTeX distrubution installed
  • A directory under ~/templates/latex containing:
    • A directory named tex with your LaTeX templates
    • A directory named sections with the files titlepage.tex and preamble.tex in it
    • A directory named figures with the files logo.png