Arif Qodari

Crafting Pixels and Code

Simple Makefile to Compile Latex Document

Below is a simple Makefile that I usually use to compile latex document.

[Makefile] (Makefile) download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Makefile to compile latex document
# write the name of your main latex file here (without suffix .tex)
project=

tex=pdflatex
bibtex=bibtex
buildtex=$(tex) $(project).tex

all:
  $(buildtex)
  $(bibtex) $(project) || true
  $(buildtex)
  $(buildtex)

clean-all:
  rm -f *.dvi *.log *.bak *.aux *.bbl *.blg *.idx *.ps *.eps *.pdf *.toc *.out *~

clean:
  rm -f *.log *.bak *.aux *.bbl *.blg *.idx *.toc *.out *~

Just run make to compile and generate pdf file. Then run make clean to clean up all unnecessary files. Alternatively, you can do both things at the same time by running make; make clean

Thanks to: Daniel Kaes

Create Isolated Python Environment Using Virtualenv and Pip

You work on multiple Python projects with different version of Python, libraries, framework, and packages. You’re looking for a better and simple way to manage them without having pain. If you are kind of person having those condition, this article may be helpful for you.

We can create an isolated environment for a specific Python project using virtualenv and pip. In each environment, you can specify version of Python, what packages, framework, libraries you are using in that project.