This is a basic template for a LaTeX project, uses latexmk
for rendering and a Makefile
to build the project.
git clone https://github.com/aziis98/template-latex
or (I personally prefer) the following
cd /path/to/folder
git init
git pull --depth=1 https://github.com/aziis98/template-latex
that downloads just the most recent commit (the --depth=1
option) and leaves the remote origin empty.
Fow now there is only one extra layout, but as time passes I will add even more
-
A4 with two column layout
cd /path/to/folder git init git pull --depth=1 https://github.com/aziis98/template-latex layout-a4-c2
All source files should be placed in src/
, they are copied to the .cache
directory, rendered and then main.pdf
is copied back into the root of the project.
To be organized I've recently started using this Makefile to manage LaTeX projects, so just use make
, make all
or make main.pdf
to build the project and generate the output PDF.
The alternative is to run ./watch
that uses entr
to watch and rerender the PDF when the source files change (and shows a notification with notify-send
).
If you have entr
installed you can also have "live reload" on save with
find src/ -type f | entr make
that will automatically rebuild main.pdf
.