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 OUT_DIR := out
$(shell mkdir -p $(OUT_DIR))
GRAPHS_DIR := graphs GRAPHS_DIR := graphs
CONTENTS_DIR := contents CONTENTS_DIR := contents
REFERENCES_DIR := references
CONTENTS := $(wildcard $(CONTENTS)/*.tex) CONTENTS := $(wildcard $(CONTENTS)/*.tex)
REFERENCES := $(wildcard $(REFERENCES_DIR)/*.bib)
GRAPHS := $(wildcard $(GRAPHS_DIR)/*.gv) GRAPHS := $(wildcard $(GRAPHS_DIR)/*.gv)
GRAPHS_IMG := $(GRAPHS:$(GRAPHS_DIR)/%.gv=$(OUT_DIR)/%.gv.png) GRAPHS_IMG := $(GRAPHS:$(GRAPHS_DIR)/%.gv=$(OUT_DIR)/%.gv.png)
.PHONY: all preview clean references pdf .PHONY: all
all: pdf 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 $@ dot -T png $< -o $@
.PHONY: graphs
graphs: $(GRAPHS_IMG)
.PHONY: index
index: $(OUT_DIR)/main.idx index: $(OUT_DIR)/main.idx
makeindex $^ makeindex $^
.PHONY: references
references: annexes.bib references.bib references: $(REFERENCES)
bibtex $(OUT_DIR)/annexes bibtex $(OUT_DIR)/annexes
bibtex $(OUT_DIR)/references bibtex $(OUT_DIR)/references
#pdf: $(OUT_DIR)/main.pdf --inner_pdf:
#$(OUT_DIR)/main.pdf: main.tex $(GRAPHS_IMG) $(CONTENTS) pdflatex -output-directory $(OUT_DIR) main.tex
pdf: main.tex $(GRAPHS_IMG) $(CONTENTS)
pdflatex -output-directory $(OUT_DIR) $^
preview: $(OUT_DIR)/main.pdf .PHONY: pdf
zathura $^ pdf: $(GRAPHS_IMG) --inner_pdf references index --inner_pdf
document: .PHONY: preview
make preview: pdf
make index @zathura $(OUT_DIR)/main.pdf
make references
make
.PHONY: clean
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}{\ttdefault} % Change default font to monospace font family
%\renewcommand{\familydefault}{\sfdefault} % Change default font to sans serif font family %\renewcommand{\familydefault}{\sfdefault} % Change default font to sans serif font family
\usepackage[T1]{fontenc} % Set the font (output) encoding \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[autolanguage]{numprint} % for the \nombre command
\usepackage{hyphenat} % Hyphenation rules \usepackage{hyphenat} % Hyphenation rules
\hyphenation{mate-mática recu-perar} \hyphenation{mate-mática recu-perar}
@ -18,7 +18,7 @@
\langnewcites{references}{Références}{References} \langnewcites{references}{Références}{References}
%\usepackage{lipsum} % Command to generate temporary dummy text %\usepackage{lipsum} % Command to generate temporary dummy text
\usepackage[ruled,vlined,linesnumbered]{algorithm2e} % Add the algorithm environnement \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} \pagecolor{th_colour_bg}
\color{th_colour_fg} \color{th_colour_fg}
\usepackage{amsmath} % Provides command to typeset matrices with different delimiters \usepackage{amsmath} % Provides command to typeset matrices with different delimiters
@ -28,7 +28,7 @@
\mdfsetup{linecolor = th_colour_fg, innerlinecolor = th_colour_fg,% \mdfsetup{linecolor = th_colour_fg, innerlinecolor = th_colour_fg,%
middlelinecolor = th_colour_fg, outerlinecolor = th_colour_fg,% middlelinecolor = th_colour_fg, outerlinecolor = th_colour_fg,%
backgroundcolor = th_colour_bg, fontcolor = th_colour_fg} backgroundcolor = th_colour_bg, fontcolor = th_colour_fg}
\usepackage{macros} % Customs macros \usepackage{packages/macros} % Customs macros
\usepackage{graphicx} \usepackage{graphicx}
\usepackage{makeidx}[intoc] % Make a word index \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} \addcontentsline{toc}{chapter}{Références}
\begingroup \begingroup
\bibliographystylereferences{IEEEtran} \bibliographystylereferences{IEEEtran}
\bibliographyreferences{references} \bibliographyreferences{references/references}
\endgroup \endgroup
\addcontentsline{toc}{chapter}{Annexes} \addcontentsline{toc}{chapter}{Annexes}
\begingroup \begingroup
\bibliographystyleannexes{IEEEtran} \bibliographystyleannexes{IEEEtran}
\bibliographyannexes{annexes} \bibliographyannexes{references/annexes}
\endgroup \endgroup
\printindex \printindex