Moved user packages and references to subdirectories

This commit is contained in:
saundersp 2024-05-09 19:23:20 +02:00
parent 030342f2e3
commit 70fa023190
7 changed files with 28 additions and 24 deletions

View File

@ -1,40 +1,44 @@
OUT_DIR := out
$(shell mkdir -p $(OUT_DIR))
GRAPHS_DIR := graphs
CONTENTS_DIR := contents
REFERENCES_DIR := references
CONTENTS := $(wildcard $(CONTENTS)/*.tex)
REFERENCES := $(wildcard $(REFERENCES_DIR)/*.bib)
GRAPHS := $(wildcard $(GRAPHS_DIR)/*.gv)
GRAPHS_IMG := $(GRAPHS:$(GRAPHS_DIR)/%.gv=$(OUT_DIR)/%.gv.png)
.PHONY: all preview clean references pdf
.PHONY: all
all: pdf
$(OUT_DIR)/%.gv.png: $(GRAPHS_DIR)/%.gv
$(OUT_DIR):
@mkdir -v $@
$(OUT_DIR)/%.gv.png: $(GRAPHS_DIR)/%.gv | $(OUT_DIR)
dot -T png $< -o $@
.PHONY: graphs
graphs: $(GRAPHS_IMG)
.PHONY: index
index: $(OUT_DIR)/main.idx
makeindex $^
references: annexes.bib references.bib
.PHONY: references
references: $(REFERENCES)
bibtex $(OUT_DIR)/annexes
bibtex $(OUT_DIR)/references
#pdf: $(OUT_DIR)/main.pdf
#$(OUT_DIR)/main.pdf: main.tex $(GRAPHS_IMG) $(CONTENTS)
pdf: main.tex $(GRAPHS_IMG) $(CONTENTS)
pdflatex -output-directory $(OUT_DIR) $^
--inner_pdf:
pdflatex -output-directory $(OUT_DIR) main.tex
preview: $(OUT_DIR)/main.pdf
zathura $^
.PHONY: pdf
pdf: $(GRAPHS_IMG) --inner_pdf references index --inner_pdf
document:
make
make index
make references
make
.PHONY: preview
preview: pdf
@zathura $(OUT_DIR)/main.pdf
.PHONY: clean
clean:
rm $(OUT_DIR)/*
@rm -frv $(OUT_DIR)

View File

@ -7,7 +7,7 @@
%\renewcommand{\familydefault}{\ttdefault} % Change default font to monospace font family
%\renewcommand{\familydefault}{\sfdefault} % Change default font to sans serif font family
\usepackage[T1]{fontenc} % Set the font (output) encoding
\usepackage[french]{language_selector} % Allow to the language the document is written to ([french], english)
\usepackage[french]{packages/language_selector} % Allow to the language the document is written to ([french], english)
%\usepackage[autolanguage]{numprint} % for the \nombre command
\usepackage{hyphenat} % Hyphenation rules
\hyphenation{mate-mática recu-perar}
@ -18,7 +18,7 @@
\langnewcites{references}{Références}{References}
%\usepackage{lipsum} % Command to generate temporary dummy text
\usepackage[ruled,vlined,linesnumbered]{algorithm2e} % Add the algorithm environnement
\usepackage[codedark]{themes} % Include many colours themes ([default], codedark or dracula)
\usepackage[codedark]{packages/themes} % Include many colours themes ([default], codedark or dracula)
\pagecolor{th_colour_bg}
\color{th_colour_fg}
\usepackage{amsmath} % Provides command to typeset matrices with different delimiters
@ -28,7 +28,7 @@
\mdfsetup{linecolor = th_colour_fg, innerlinecolor = th_colour_fg,%
middlelinecolor = th_colour_fg, outerlinecolor = th_colour_fg,%
backgroundcolor = th_colour_bg, fontcolor = th_colour_fg}
\usepackage{macros} % Customs macros
\usepackage{packages/macros} % Customs macros
\usepackage{graphicx}
\usepackage{makeidx}[intoc] % Make a word index
@ -81,13 +81,13 @@ De de manière honteusement démagogique, je vous remercie tout lecteurs de ce n
\addcontentsline{toc}{chapter}{Références}
\begingroup
\bibliographystylereferences{IEEEtran}
\bibliographyreferences{references}
\bibliographyreferences{references/references}
\endgroup
\addcontentsline{toc}{chapter}{Annexes}
\begingroup
\bibliographystyleannexes{IEEEtran}
\bibliographyannexes{annexes}
\bibliographyannexes{references/annexes}
\endgroup
\printindex