A Simple Makefile for Latex
Posted on In LinuxCompiling a latex documents may take several steps when bibtex is used with latex. However, this latex compilation process is the same for most documents. We can make it a template with Makefile so that simply running make
will generate the dvi/ps/pdf files for us.
A simple Makefile for using latex with bibtex enabled is as follows (replace the spaces with TAB at the beginning of each line).
Download the Makefile directly: Makefile.
Please set “filename” as the main tex file’s name for your document project.
The Makefile first generates dvi by calling latex by 3 times and bibtex by 1 time and then generate the ps file and pdf files.
Table of Contents
The usage:
Compile to pdf:
make
Compile pdf file and read it in Evince:
make clean; make && make read
Or use Adobe Reader by:
make clean; make && make aread
Clean up temporary files:
make clean
The makefile download link provide no file
Hi Eric, the makefile does not seem to exist
got it. Thank you! I think it work in general. But,
I compile with `pdflatex -shell-escape main.tex` as I am using the minted package to display codes. So your Makefile still does not work in my case..I am using beamer latex…
This is the file:
https://raw.githubusercontent.com/zma/makefile4latex/master/Makefile
Github page link for makefile
https://github.com/zma/makefile4latex
Hey, My Latex report has some images in it and when i am trying to make it, it is giving me errors could you please help me with that?