Compare commits
1 commit
Author | SHA1 | Date | |
---|---|---|---|
704db26798 |
20 changed files with 81 additions and 474 deletions
7
Makefile
7
Makefile
|
@ -1,7 +0,0 @@
|
||||||
VC = git
|
|
||||||
|
|
||||||
all:
|
|
||||||
|
|
||||||
|
|
||||||
clean:
|
|
||||||
@$(VC) clean -Xdf
|
|
67
README.md
67
README.md
|
@ -3,12 +3,10 @@
|
||||||
- [C](#c)
|
- [C](#c)
|
||||||
- [C++](#c-1)
|
- [C++](#c-1)
|
||||||
- [LaTeX](#latex)
|
- [LaTeX](#latex)
|
||||||
- [Book](#book)
|
|
||||||
- [Document](#document)
|
- [Document](#document)
|
||||||
- [Examen](#examen)
|
|
||||||
- [Presentation](#presentation)
|
- [Presentation](#presentation)
|
||||||
- [OCaml](#ocaml)
|
|
||||||
- [Python](#python)
|
- [Python](#python)
|
||||||
|
- [OCaml](#ocaml)
|
||||||
- [Rust](#rust)
|
- [Rust](#rust)
|
||||||
- [Typescript](#typescript)
|
- [Typescript](#typescript)
|
||||||
|
|
||||||
|
@ -18,8 +16,8 @@ Copy and paste [`c/`](./c/) directory, and you should be good to go!
|
||||||
|
|
||||||
- Remember to change executable's name and change std's target in
|
- Remember to change executable's name and change std's target in
|
||||||
the [`Makefile`](./c/Makefile).
|
the [`Makefile`](./c/Makefile).
|
||||||
- **Run `make` to compile the program in release mode.**
|
- **Run `make` to compile the program.**
|
||||||
- **Run `make debug` to compile the program in debug mode.**
|
- **Run `make dev` to compile the program in debug mode.**
|
||||||
- **Run `make clean` to clean artifacts.**
|
- **Run `make clean` to clean artifacts.**
|
||||||
|
|
||||||
## C++
|
## C++
|
||||||
|
@ -28,28 +26,14 @@ Copy and paste [`cpp/`](./cpp/) directory, and you should be good to go!
|
||||||
|
|
||||||
- Remember to change executable's name and change std's target in
|
- Remember to change executable's name and change std's target in
|
||||||
the [`Makefile`](./cpp/Makefile).
|
the [`Makefile`](./cpp/Makefile).
|
||||||
- **Run `make` to compile the program in release mode.**
|
- **Run `make` to compile the program.**
|
||||||
- **Run `make debug` to compile the program in debug mode.**
|
- **Run `make dev` to compile the program in debug mode.**
|
||||||
- **Run `make clean` to clean artifacts.**
|
- **Run `make clean` to clean artifacts.**
|
||||||
|
|
||||||
## LaTeX
|
## LaTeX
|
||||||
|
|
||||||
### Book
|
|
||||||
|
|
||||||
This is for complex document.
|
|
||||||
|
|
||||||
Copy and paste [`latex/book`](./latex/book/) directory,
|
|
||||||
and you should be good to go!
|
|
||||||
|
|
||||||
- **Run `make` to compile the document.**
|
|
||||||
- **Run `make clean` to clean artifacts.**
|
|
||||||
|
|
||||||
> It is by default configured to output `book.pdf`.
|
|
||||||
|
|
||||||
### Document
|
### Document
|
||||||
|
|
||||||
This is for simple document.
|
|
||||||
|
|
||||||
Copy and paste [`latex/document`](./latex/document/) directory,
|
Copy and paste [`latex/document`](./latex/document/) directory,
|
||||||
and you should be good to go!
|
and you should be good to go!
|
||||||
|
|
||||||
|
@ -58,33 +42,30 @@ and you should be good to go!
|
||||||
|
|
||||||
> It is by default configured to output `document.pdf`.
|
> It is by default configured to output `document.pdf`.
|
||||||
|
|
||||||
### Examen
|
|
||||||
|
|
||||||
This is for simple test.
|
|
||||||
|
|
||||||
Copy and paste [`latex/exam`](./latex/exam/) directory,
|
|
||||||
and you should be good to go!
|
|
||||||
|
|
||||||
- **Run `make` to compile the document.**
|
|
||||||
- **Run `make clean` to clean artifacts.**
|
|
||||||
|
|
||||||
> It is by default configured to output `test.pdf`.
|
|
||||||
|
|
||||||
### Presentation
|
### Presentation
|
||||||
|
|
||||||
This is for presentations.
|
|
||||||
|
|
||||||
Copy and paste [`latex/presentation`](./latex/presentation/) directory,
|
Copy and paste [`latex/presentation`](./latex/presentation/) directory,
|
||||||
and you should be good to go!
|
and you should be good to go!
|
||||||
|
|
||||||
- **Run `make updatepackage` to download/update dependencie**
|
- **Run `make updatepackage` to download/update dependencie (projektor).**
|
||||||
**([projektor](https://git.mylloon.fr/Anri/projektor)).**
|
|
||||||
- **Run `make` to compile the document.**
|
- **Run `make` to compile the document.**
|
||||||
- **Run `make clean` to clean artifacts.**
|
- **Run `make clean` to clean artifacts.**
|
||||||
|
|
||||||
> It is by default configured to build `slides.tex` and output `slides.pdf`.
|
> It is by default configured to build `slides.tex` and output `slides.pdf`.
|
||||||
> There is a more advanced file with more examples named `slides_advanced.tex`.
|
> There is a more advanced file with more examples named `slides_advanced.tex`.
|
||||||
|
|
||||||
|
## Python
|
||||||
|
|
||||||
|
Copy and paste [`python/`](./python/) directory, and you should be good to go!
|
||||||
|
|
||||||
|
- **Run `python main.py` to start the program.**
|
||||||
|
|
||||||
|
> It's recommended to use virtual environnement:
|
||||||
|
>
|
||||||
|
> - `virtualenv .` → create the virtual env in the current folder
|
||||||
|
> - `activate` → activate the virtual env
|
||||||
|
> - Now, it won't affect your other projects
|
||||||
|
|
||||||
## OCaml
|
## OCaml
|
||||||
|
|
||||||
Copy and paste [`ocaml/`](./ocaml/) directory, and you should be good to go!
|
Copy and paste [`ocaml/`](./ocaml/) directory, and you should be good to go!
|
||||||
|
@ -103,18 +84,6 @@ Copy and paste [`ocaml/`](./ocaml/) directory, and you should be good to go!
|
||||||
> It's recommended to have this one as a "working example", and still create
|
> It's recommended to have this one as a "working example", and still create
|
||||||
> new projects via `dune init proj`.
|
> new projects via `dune init proj`.
|
||||||
|
|
||||||
## Python
|
|
||||||
|
|
||||||
Copy and paste [`python/`](./python/) directory, and you should be good to go!
|
|
||||||
|
|
||||||
- **Run `python main.py` to start the program.**
|
|
||||||
|
|
||||||
> It's recommended to use virtual environnement:
|
|
||||||
>
|
|
||||||
> - `virtualenv .` → create the virtual env in the current folder
|
|
||||||
> - `activate` → activate the virtual env
|
|
||||||
> - Now, it won't affect your other projects
|
|
||||||
|
|
||||||
## Rust
|
## Rust
|
||||||
|
|
||||||
Copy and paste [`rust/`](./rust/) directory, and you should be good to go!
|
Copy and paste [`rust/`](./rust/) directory, and you should be good to go!
|
||||||
|
|
27
c/Makefile
27
c/Makefile
|
@ -2,9 +2,9 @@ CC = gcc
|
||||||
RM = rm
|
RM = rm
|
||||||
|
|
||||||
SOURCES = $(wildcard src/*.c)
|
SOURCES = $(wildcard src/*.c)
|
||||||
OBJECTS = $(patsubst %.c,%.o,$(notdir $(SOURCES)))
|
OBJETS = $(patsubst %.c,%.o,$(notdir $(SOURCES)))
|
||||||
|
|
||||||
CFLAGS = -std=c17 -pedantic
|
CFLAGS = -std=c11 -pedantic
|
||||||
LDFLAGS =
|
LDFLAGS =
|
||||||
|
|
||||||
EXE = example
|
EXE = example
|
||||||
|
@ -13,22 +13,19 @@ EXE_EXT = out
|
||||||
%.o: src/%.c
|
%.o: src/%.c
|
||||||
$(CC) -c $< -o $@ $(CFLAGS)
|
$(CC) -c $< -o $@ $(CFLAGS)
|
||||||
|
|
||||||
release: CFLAGS += -O3
|
compilation: $(OBJETS)
|
||||||
release: compilation
|
$(CC) -o $(EXE).$(EXE_EXT) $(OBJETS) $(LDFLAGS)
|
||||||
|
|
||||||
debug: CFLAGS += -Wall -Wextra -Wshadow -Wcast-align -Wstrict-prototypes
|
main: CFLAGS += -O3
|
||||||
debug: CFLAGS += -fanalyzer -fsanitize=undefined -g -Og
|
main: compilation
|
||||||
debug: LDFLAGS += -fsanitize=undefined -fsanitize=leak
|
|
||||||
debug: compilation
|
|
||||||
|
|
||||||
compilation: $(OBJECTS)
|
dev: CFLAGS += -Wall -Wextra -Wshadow -Wcast-align -Wstrict-prototypes
|
||||||
$(CC) -o $(EXE).$(EXE_EXT) $(OBJECTS) $(LDFLAGS)
|
dev: CFLAGS += -fanalyzer -fsanitize=undefined -g -Og
|
||||||
|
dev: LDFLAGS += -fsanitize=undefined
|
||||||
|
dev: compilation
|
||||||
|
|
||||||
all:
|
all:
|
||||||
release
|
main
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(RM) $(OBJECTS)
|
$(RM) $(OBJETS) $(EXE).$(EXE_EXT)
|
||||||
|
|
||||||
full-clean: clean
|
|
||||||
$(RM) $(EXE).$(EXE_EXT)
|
|
||||||
|
|
25
cpp/Makefile
25
cpp/Makefile
|
@ -2,9 +2,9 @@ CXX = g++
|
||||||
RM = rm
|
RM = rm
|
||||||
|
|
||||||
SOURCES = $(wildcard src/*.cpp)
|
SOURCES = $(wildcard src/*.cpp)
|
||||||
OBJECTS = $(patsubst %.cpp,%.o,$(notdir $(SOURCES)))
|
OBJETS = $(patsubst %.cpp,%.o,$(notdir $(SOURCES)))
|
||||||
|
|
||||||
CXXFLAGS = -std=c++17 -pedantic
|
CXXFLAGS = --std=c++11
|
||||||
|
|
||||||
EXE = example
|
EXE = example
|
||||||
EXE_EXT = out
|
EXE_EXT = out
|
||||||
|
@ -12,21 +12,18 @@ EXE_EXT = out
|
||||||
%.o: src/%.cpp
|
%.o: src/%.cpp
|
||||||
$(CXX) -c -o $@ $< $(CXXFLAGS)
|
$(CXX) -c -o $@ $< $(CXXFLAGS)
|
||||||
|
|
||||||
release: CXXFLAGS += -O3
|
compilation: $(OBJETS)
|
||||||
release: compilation
|
$(CXX) -o $(EXE).$(EXE_EXT) $(OBJETS)
|
||||||
|
|
||||||
debug: CXXFLAGS += -Wall -Wextra -Wshadow -Wnon-virtual-dtor -g
|
main: CXXFLAGS += -O3
|
||||||
debug: CXXFLAGS += -Wold-style-cast -Wsign-conversion
|
main: compilation
|
||||||
debug: compilation
|
|
||||||
|
|
||||||
compilation: $(OBJECTS)
|
dev: CXXFLAGS += -Wall -Wextra -Wshadow -Wnon-virtual-dtor -pedantic -g
|
||||||
$(CXX) -o $(EXE).$(EXE_EXT) $(OBJECTS)
|
dev: CXXFLAGS += -Wold-style-cast -Wsign-conversion
|
||||||
|
dev: compilation
|
||||||
|
|
||||||
all:
|
all:
|
||||||
release
|
main
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(RM) $(OBJECTS)
|
$(RM) $(OBJETS) $(EXE).$(EXE_EXT)
|
||||||
|
|
||||||
full-clean: clean
|
|
||||||
$(RM) $(EXE).$(EXE_EXT)
|
|
||||||
|
|
8
latex/book/.gitignore
vendored
8
latex/book/.gitignore
vendored
|
@ -1,8 +0,0 @@
|
||||||
*
|
|
||||||
|
|
||||||
!.gitignore
|
|
||||||
!Makefile
|
|
||||||
!*.tex
|
|
||||||
!*.bib
|
|
||||||
|
|
||||||
!sections/
|
|
|
@ -1,22 +0,0 @@
|
||||||
NAME = book
|
|
||||||
|
|
||||||
PDF = $(NAME).pdf
|
|
||||||
|
|
||||||
TEXMK = latexmk -lualatex -shell-escape -interaction=nonstopmode
|
|
||||||
QPDF = qpdf --linearize --replace-input
|
|
||||||
RM = rm -rf
|
|
||||||
|
|
||||||
.PHONY: $(PDF)
|
|
||||||
|
|
||||||
all: $(PDF)
|
|
||||||
|
|
||||||
$(PDF): %.pdf: %.tex
|
|
||||||
$(TEXMK) $<
|
|
||||||
@$(QPDF) $@ 2>/dev/null |:
|
|
||||||
|
|
||||||
EXTS = aux fdb_latexmk fls log nav out snm synctex.gz toc bbl blg sta
|
|
||||||
clean:
|
|
||||||
$(RM) _minted-$(NAME)/ $(foreach ext,$(EXTS),$(NAME).$(ext))
|
|
||||||
|
|
||||||
full-clean: clean
|
|
||||||
$(RM) $(PDF)
|
|
|
@ -1,80 +0,0 @@
|
||||||
\DocumentMetadata{testphase = {phase-II,sec,toc,graphic,minipage,float,text}}
|
|
||||||
\documentclass[a4paper]{article}
|
|
||||||
|
|
||||||
% Files
|
|
||||||
\usepackage[subpreambles=true]{standalone}
|
|
||||||
\usepackage{import}
|
|
||||||
|
|
||||||
% Font
|
|
||||||
\usepackage[T1]{fontenc}
|
|
||||||
\renewcommand{\familydefault}{\sfdefault}
|
|
||||||
\usepackage[nopatch=footnote]{microtype}
|
|
||||||
|
|
||||||
% Languages
|
|
||||||
\usepackage[french]{babel}
|
|
||||||
\frenchsetup{SmallCapsFigTabCaptions=false}
|
|
||||||
\usepackage{csquotes}
|
|
||||||
\MakeOuterQuote{"}
|
|
||||||
|
|
||||||
% Add \extra info to title
|
|
||||||
\makeatletter
|
|
||||||
\providecommand{\extra}[1]{
|
|
||||||
\apptocmd{\@author}{
|
|
||||||
\end{tabular}
|
|
||||||
\par\vspace*{0.7em}
|
|
||||||
\begin{tabular}[t]{c}
|
|
||||||
#1}{}{}
|
|
||||||
}
|
|
||||||
\makeatother
|
|
||||||
|
|
||||||
% Change page dimensions
|
|
||||||
%\usepackage[
|
|
||||||
% a4paper,
|
|
||||||
% left=20mm,
|
|
||||||
% top=20mm,
|
|
||||||
%]{geometry}
|
|
||||||
|
|
||||||
% Bibliography
|
|
||||||
\bibliographystyle{unsrt}
|
|
||||||
\nocite{*}
|
|
||||||
|
|
||||||
% Metadatas
|
|
||||||
\def\docTitle{TITLE}
|
|
||||||
\def\docAuthor{YOU}
|
|
||||||
\def\authorMail{mailto:place@holder.com}
|
|
||||||
\def\docSubject{SUBJECT}
|
|
||||||
\def\docLocation{LOCATION}
|
|
||||||
|
|
||||||
% Dependencies
|
|
||||||
\usepackage[
|
|
||||||
pdfauthor={\docAuthor}, % author metadata
|
|
||||||
pdftitle={\docTitle}, % title metadata
|
|
||||||
pdfsubject={\docSubject}, % subject metadata
|
|
||||||
hidelinks, % clickable links in table of contents
|
|
||||||
]{hyperref}
|
|
||||||
|
|
||||||
\title{\docTitle}
|
|
||||||
\author{\docAuthor}
|
|
||||||
\extra{\docSubject~$\cdot$ \docLocation}
|
|
||||||
\date{}
|
|
||||||
|
|
||||||
\begin{document}
|
|
||||||
\maketitle
|
|
||||||
\flushbottom
|
|
||||||
\tableofcontents
|
|
||||||
\clearpage
|
|
||||||
|
|
||||||
\section{First section}
|
|
||||||
\import{sections/}{section1}
|
|
||||||
|
|
||||||
\section{Second section}
|
|
||||||
\import{sections/}{section2}
|
|
||||||
|
|
||||||
\section{Third section}
|
|
||||||
\import{sections/}{section3}
|
|
||||||
|
|
||||||
\clearpage
|
|
||||||
\appendix
|
|
||||||
\bibliography{sources}
|
|
||||||
|
|
||||||
\end{document}
|
|
|
@ -1,11 +0,0 @@
|
||||||
\documentclass[class=article]{standalone}
|
|
||||||
|
|
||||||
% Code integration
|
|
||||||
%\usepackage{minted}
|
|
||||||
%\usemintedstyle{emacs}
|
|
||||||
|
|
||||||
\begin{document}
|
|
||||||
|
|
||||||
Here is the first section.
|
|
||||||
|
|
||||||
\end{document}
|
|
|
@ -1,11 +0,0 @@
|
||||||
\documentclass[class=article]{standalone}
|
|
||||||
|
|
||||||
% Code integration
|
|
||||||
%\usepackage{minted}
|
|
||||||
%\usemintedstyle{emacs}
|
|
||||||
|
|
||||||
\begin{document}
|
|
||||||
|
|
||||||
Here is the second section.
|
|
||||||
|
|
||||||
\end{document}
|
|
|
@ -1,11 +0,0 @@
|
||||||
\documentclass[class=article]{standalone}
|
|
||||||
|
|
||||||
% Code integration
|
|
||||||
%\usepackage{minted}
|
|
||||||
%\usemintedstyle{emacs}
|
|
||||||
|
|
||||||
\begin{document}
|
|
||||||
|
|
||||||
Here is the third section.
|
|
||||||
|
|
||||||
\end{document}
|
|
|
@ -1,4 +0,0 @@
|
||||||
@misc{example,
|
|
||||||
author = {John Doe},
|
|
||||||
howpublished = {\url{https://example.com}}
|
|
||||||
}
|
|
|
@ -1,20 +1,16 @@
|
||||||
NAME = document
|
NAME = document
|
||||||
|
|
||||||
PDF = $(NAME).pdf
|
TEX = $(NAME).tex
|
||||||
|
SRC = $(TEX)
|
||||||
|
PDF = $(TEX:.tex=.pdf)
|
||||||
|
|
||||||
TEXMK = latexmk -lualatex -shell-escape -interaction=nonstopmode
|
TEXMK = latexmk -lualatex -shell-escape -interaction=nonstopmode
|
||||||
QPDF = qpdf --linearize --replace-input
|
|
||||||
RM = rm -rf
|
|
||||||
|
|
||||||
all: $(PDF)
|
all: $(PDF)
|
||||||
|
|
||||||
$(PDF): %.pdf: %.tex
|
$(PDF): %.pdf: %.tex
|
||||||
$(TEXMK) $<
|
$(TEXMK) $<
|
||||||
@$(QPDF) $@ 2>/dev/null |:
|
|
||||||
|
|
||||||
EXTS = aux fdb_latexmk fls log nav out snm synctex.gz toc
|
EXTS = aux fdb_latexmk fls log nav out snm synctex.gz toc xmpdata
|
||||||
clean:
|
clean:
|
||||||
$(RM) _minted-$(NAME)/ $(foreach ext,$(EXTS),$(NAME).$(ext))
|
rm -rf $(PDF) _minted-$(NAME)/ $(foreach ext,$(EXTS),$(NAME).$(ext)) pdfa.xmpi
|
||||||
|
|
||||||
full-clean: clean
|
|
||||||
$(RM) $(PDF)
|
|
||||||
|
|
|
@ -1,57 +1,36 @@
|
||||||
\DocumentMetadata{testphase = {phase-III,math,firstaid}}
|
\newcommand{\settitle}{TITLE}
|
||||||
\documentclass[a4paper]{article}
|
\newcommand{\setauthor}{YOU}
|
||||||
|
\newcommand{\setsubject}{SUBJECT}
|
||||||
|
\newcommand{\setlocation}{LOCATION}
|
||||||
|
\newcommand{\setmail}{mailto:place@holder.com}
|
||||||
|
|
||||||
% Font
|
\begin{filecontents*}{\jobname.xmpdata}
|
||||||
\usepackage[T1]{fontenc}
|
\Title{\settitle}
|
||||||
\renewcommand{\familydefault}{\sfdefault}
|
\Author{\setauthor}
|
||||||
\usepackage[nopatch=footnote]{microtype}
|
\Subject{\setsubject}
|
||||||
|
\end{filecontents*}
|
||||||
|
\documentclass{article}
|
||||||
|
|
||||||
% Code integration
|
\usepackage[T1]{fontenc} % encoding
|
||||||
%\usepackage{minted}
|
\renewcommand{\familydefault}{\sfdefault} % sans-serif font
|
||||||
%\setminted{autogobble,breaklines}
|
|
||||||
%\usemintedstyle{emacs}
|
|
||||||
|
|
||||||
% Languages
|
\usepackage[french]{babel} % langages
|
||||||
\usepackage[french]{babel}
|
|
||||||
\frenchsetup{SmallCapsFigTabCaptions=false}
|
\frenchsetup{SmallCapsFigTabCaptions=false}
|
||||||
\usepackage{csquotes}
|
|
||||||
\MakeOuterQuote{"}
|
|
||||||
|
|
||||||
% Add \extra info to title
|
% \usepackage[ % change page dimensions
|
||||||
\makeatletter
|
|
||||||
\providecommand{\extra}[1]{
|
|
||||||
\apptocmd{\@author}{
|
|
||||||
\end{tabular}
|
|
||||||
\par\vspace*{0.7em}
|
|
||||||
\begin{tabular}[t]{c}
|
|
||||||
#1}{}{}
|
|
||||||
}
|
|
||||||
\makeatother
|
|
||||||
|
|
||||||
% Change page dimensions
|
|
||||||
%\usepackage[
|
|
||||||
% a4paper,
|
% a4paper,
|
||||||
% left=20mm,
|
% left=20mm,
|
||||||
% top=20mm,
|
% top=20mm,
|
||||||
%]{geometry}
|
% ]{geometry}
|
||||||
|
|
||||||
% Metadatas
|
% \usepackage{minted} % code integration
|
||||||
\def\docTitle{TITLE}
|
% \usemintedstyle{emacs}
|
||||||
\def\docAuthor{YOU}
|
|
||||||
\def\authorMail{mailto:place@holder.com}
|
|
||||||
\def\docSubject{SUBJECT}
|
|
||||||
\def\docLocation{LOCATION}
|
|
||||||
|
|
||||||
\usepackage[
|
\usepackage[a-3u]{pdfx}
|
||||||
pdfauthor={\docAuthor}, % author metadata
|
\hypersetup{hidelinks} % clickable links in table of contents
|
||||||
pdftitle={\docTitle}, % title metadata
|
|
||||||
pdfsubject={\docSubject}, % subject metadata
|
|
||||||
hidelinks, % clickable links in table of contents
|
|
||||||
]{hyperref}
|
|
||||||
|
|
||||||
\title{\docTitle}
|
\title{\settitle}
|
||||||
\author{\href{\authorMail}{\docAuthor}}
|
\author{\href{\setmail}{\setauthor}\\\setsubject~$\cdot$ \setlocation}
|
||||||
\extra{\docSubject~$\cdot$ \docLocation}
|
|
||||||
\date{}
|
\date{}
|
||||||
|
|
||||||
\begin{document}
|
\begin{document}
|
||||||
|
|
5
latex/exam/.gitignore
vendored
5
latex/exam/.gitignore
vendored
|
@ -1,5 +0,0 @@
|
||||||
*
|
|
||||||
|
|
||||||
!.gitignore
|
|
||||||
!Makefile
|
|
||||||
!*.tex
|
|
|
@ -1,20 +0,0 @@
|
||||||
NAME = test
|
|
||||||
|
|
||||||
PDF = $(NAME).pdf
|
|
||||||
|
|
||||||
TEXMK = latexmk -lualatex -shell-escape -interaction=nonstopmode
|
|
||||||
QPDF = qpdf --linearize --replace-input
|
|
||||||
RM = rm -rf
|
|
||||||
|
|
||||||
all: $(PDF)
|
|
||||||
|
|
||||||
$(PDF): %.pdf: %.tex
|
|
||||||
$(TEXMK) $<
|
|
||||||
@$(QPDF) $@ 2>/dev/null |:
|
|
||||||
|
|
||||||
EXTS = aux fdb_latexmk fls log nav out snm synctex.gz toc
|
|
||||||
clean:
|
|
||||||
$(RM) _minted-$(NAME)/ $(foreach ext,$(EXTS),$(NAME).$(ext))
|
|
||||||
|
|
||||||
full-clean: clean
|
|
||||||
$(RM) $(PDF)
|
|
|
@ -1,144 +0,0 @@
|
||||||
\documentclass[a4paper,12pt,addpoints]{exam}
|
|
||||||
|
|
||||||
% Font
|
|
||||||
\usepackage[T1]{fontenc}
|
|
||||||
\renewcommand{\familydefault}{\sfdefault}
|
|
||||||
\usepackage{microtype}
|
|
||||||
|
|
||||||
% Code integration
|
|
||||||
%\usepackage{minted}
|
|
||||||
%\setminted{autogobble,breaklines}
|
|
||||||
%\usemintedstyle{emacs}
|
|
||||||
|
|
||||||
% Languages
|
|
||||||
\usepackage[french]{babel}
|
|
||||||
\frenchsetup{SmallCapsFigTabCaptions=false}
|
|
||||||
\usepackage{csquotes}
|
|
||||||
\MakeOuterQuote{"}
|
|
||||||
|
|
||||||
% Change page dimensions
|
|
||||||
%\usepackage[
|
|
||||||
% a4paper,
|
|
||||||
% left=20mm,
|
|
||||||
% top=20mm,
|
|
||||||
%]{geometry}
|
|
||||||
|
|
||||||
% Metadatas
|
|
||||||
\def\docTitle{TITLE}
|
|
||||||
\def\docSubject{SUBJECT}
|
|
||||||
\def\docLocation{LOCATION}
|
|
||||||
\def\docTimeAllocated{1 heure 30 minutes}
|
|
||||||
|
|
||||||
\usepackage[
|
|
||||||
pdfauthor={\docLocation}, % author metadata
|
|
||||||
pdftitle={\docTitle}, % title metadata
|
|
||||||
pdfsubject={\docSubject}, % subject metadata
|
|
||||||
pdfkeywords={examen, test, \docSubject},
|
|
||||||
]{hyperref}
|
|
||||||
|
|
||||||
% Style marks
|
|
||||||
\pointsinrightmargin
|
|
||||||
%\usepackage{color}
|
|
||||||
%\colorsolutionboxes
|
|
||||||
|
|
||||||
% Style head an foot
|
|
||||||
\pagestyle{headandfoot}
|
|
||||||
\runningheadrule
|
|
||||||
\firstpageheader{\docSubject}{}{\docLocation}
|
|
||||||
\runningheader{\docSubject}{\docTitle}{\docLocation}
|
|
||||||
\cfoot{\thepage}
|
|
||||||
|
|
||||||
% Style question
|
|
||||||
\renewcommand\questionlabel{\textbf{Exercice \Roman{question}.}}
|
|
||||||
%\renewcommand\questionshook{\setlength{\labelwidth}{1in}} % realign points
|
|
||||||
\renewcommand\partlabel{\arabic{partno}.}
|
|
||||||
\renewcommand\subpartlabel{\alph{subpart}.}
|
|
||||||
\renewcommand\subsubpartlabel{\greeknum{subsubpart}.}
|
|
||||||
|
|
||||||
% Show answers
|
|
||||||
%\printanswers
|
|
||||||
|
|
||||||
\begin{document}
|
|
||||||
% \definecolor{SolutionBoxColor}{gray}{1} % invisible answer area outline
|
|
||||||
|
|
||||||
\begin{center}
|
|
||||||
{\LARGE\bfseries\docTitle} \\
|
|
||||||
\docTimeAllocated~-- /\numpoints~\points
|
|
||||||
\end{center}
|
|
||||||
|
|
||||||
\begin{center}
|
|
||||||
\parbox{14cm}{\centering
|
|
||||||
\textbf{Tout document autorisé.
|
|
||||||
Tout dispositif de communication est interdit. } \\
|
|
||||||
Sauf indication contraire, toute assertion doit être démontrée. \\
|
|
||||||
Le sujet est composé de \totalnumpages~pages.}
|
|
||||||
\end{center}
|
|
||||||
|
|
||||||
\begin{tabular}{r@{}p{0.8\textwidth}}
|
|
||||||
Nom & ~: \hrulefill \\[0.5em]
|
|
||||||
Prénom & ~: \hrulefill
|
|
||||||
\end{tabular}
|
|
||||||
|
|
||||||
% Additional information
|
|
||||||
%\vspace{1cm}
|
|
||||||
%\parbox{14cm}{Nota :
|
|
||||||
% \begin{itemize}
|
|
||||||
% \item Les exercices sont indépendants.
|
|
||||||
% \item Toute réponse hors du cadre sera ignorée.
|
|
||||||
% \end{itemize}}
|
|
||||||
|
|
||||||
\vspace{1cm}
|
|
||||||
\begin{questions}
|
|
||||||
\question
|
|
||||||
ÉNONCÉ DE L'EXERCICE 1
|
|
||||||
\begin{parts}
|
|
||||||
\part[6]
|
|
||||||
ÉNONCÉ DE LA QUESTION 1
|
|
||||||
\begin{solutionorbox}[3cm]
|
|
||||||
RÉPONSE DE LA QUESTION 1
|
|
||||||
\end{solutionorbox}
|
|
||||||
|
|
||||||
\part[2]
|
|
||||||
ÉNONCÉ DE LA QUESTION 2
|
|
||||||
\begin{solutionorbox}[3cm]
|
|
||||||
RÉPONSE DE LA QUESTION 2
|
|
||||||
\end{solutionorbox}
|
|
||||||
\end{parts}
|
|
||||||
|
|
||||||
\question
|
|
||||||
ÉNONCÉ DE L'EXERCICE 2
|
|
||||||
\begin{parts}
|
|
||||||
\part[3]
|
|
||||||
ÉNONCÉ DE LA QUESTION 1
|
|
||||||
\begin{solutionorbox}[4cm]
|
|
||||||
RÉPONSE DE LA QUESTION 1
|
|
||||||
\end{solutionorbox}
|
|
||||||
|
|
||||||
\part[2]
|
|
||||||
ÉNONCÉ DE LA QUESTION 2
|
|
||||||
\begin{solutionorbox}[4cm]
|
|
||||||
RÉPONSE DE LA QUESTION 2
|
|
||||||
\end{solutionorbox}
|
|
||||||
\end{parts}
|
|
||||||
|
|
||||||
\question
|
|
||||||
ÉNONCÉ DE L'EXERCICE 3
|
|
||||||
\begin{parts}
|
|
||||||
\part[3]
|
|
||||||
ÉNONCÉ DE LA QUESTION 1
|
|
||||||
\begin{solutionorbox}[3cm]
|
|
||||||
RÉPONSE DE LA QUESTION 1
|
|
||||||
\end{solutionorbox}
|
|
||||||
|
|
||||||
\part[4]
|
|
||||||
ÉNONCÉ DE LA QUESTION 2
|
|
||||||
\begin{solutionorbox}[3cm]
|
|
||||||
RÉPONSE DE LA QUESTION 2
|
|
||||||
\end{solutionorbox}
|
|
||||||
\end{parts}
|
|
||||||
\end{questions}
|
|
||||||
|
|
||||||
\begin{center}
|
|
||||||
Fin de l'examen.
|
|
||||||
\end{center}
|
|
||||||
\end{document}
|
|
|
@ -1,12 +1,12 @@
|
||||||
NAME = slides
|
NAME = slides
|
||||||
|
|
||||||
|
TEX = $(NAME).tex
|
||||||
|
SRC = $(TEX)
|
||||||
|
PDF = $(TEX:.tex=.pdf)
|
||||||
PKG = projektor.sty
|
PKG = projektor.sty
|
||||||
PDF = $(NAME).pdf
|
|
||||||
|
|
||||||
TEXMK = latexmk -lualatex -shell-escape -interaction=nonstopmode
|
TEXMK = latexmk -lualatex -shell-escape -interaction=nonstopmode
|
||||||
QPDF = qpdf --linearize --replace-input
|
|
||||||
WGET = wget -q --show-progress
|
WGET = wget -q --show-progress
|
||||||
RM = rm -rf
|
|
||||||
|
|
||||||
|
|
||||||
all: $(PDF)
|
all: $(PDF)
|
||||||
|
@ -14,18 +14,13 @@ all: $(PDF)
|
||||||
$(PDF): %.pdf: %.tex
|
$(PDF): %.pdf: %.tex
|
||||||
ifneq (,$(wildcard $(PKG)))
|
ifneq (,$(wildcard $(PKG)))
|
||||||
@$(TEXMK) $<
|
@$(TEXMK) $<
|
||||||
@$(QPDF) $@ 2>/dev/null |:
|
|
||||||
else
|
else
|
||||||
@$(MAKE) updatepackage
|
@echo "Can't proceed, $(PKG) missing."
|
||||||
@$(MAKE) $@
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
EXTS = aux fdb_latexmk fls log nav out snm synctex.gz toc vrb
|
EXTS = aux fdb_latexmk fls log nav out snm synctex.gz toc vrb
|
||||||
clean:
|
clean:
|
||||||
$(RM) _minted-$(NAME)/ $(foreach ext,$(EXTS),$(NAME).$(ext))
|
rm -rf $(PDF) _minted-$(NAME)/ $(foreach ext,$(EXTS),$(NAME).$(ext))
|
||||||
|
|
||||||
full-clean: clean
|
|
||||||
$(RM) $(PDF) $(PKG)
|
|
||||||
|
|
||||||
updatepackage:
|
updatepackage:
|
||||||
@$(WGET) https://git.mylloon.fr/Anri/projektor/raw/branch/main/projektor.sty \
|
@$(WGET) https://git.mylloon.fr/Anri/projektor/raw/branch/main/projektor.sty \
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
\date{}
|
\date{}
|
||||||
|
|
||||||
\begin{document}
|
\begin{document}
|
||||||
|
|
||||||
\maketitle
|
\maketitle
|
||||||
|
|
||||||
\begin{frame}[t,plain]{\contentsname}
|
\begin{frame}[t,plain]{\contentsname}
|
||||||
|
@ -24,4 +25,5 @@
|
||||||
\end{center}
|
\end{center}
|
||||||
\end{frame}
|
\end{frame}
|
||||||
|
|
||||||
|
|
||||||
\end{document}
|
\end{document}
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
\date{}
|
\date{}
|
||||||
|
|
||||||
\begin{document}
|
\begin{document}
|
||||||
|
|
||||||
\maketitle
|
\maketitle
|
||||||
|
|
||||||
\section[FIRST SECTION]{SECTION} % title and subtitle reversed
|
\section[FIRST SECTION]{SECTION} % title and subtitle reversed
|
||||||
|
@ -38,11 +39,9 @@
|
||||||
|
|
||||||
\appendix
|
\appendix
|
||||||
\begin{frame}{Sources}
|
\begin{frame}{Sources}
|
||||||
\begin{itemize}
|
\begin{itemize}\begin{multicols}{2}
|
||||||
\begin{multicols}{2}
|
|
||||||
\item \href{https://fr.wikipedia.org/}{\nolinkurl{wikipedia.org}}
|
\item \href{https://fr.wikipedia.org/}{\nolinkurl{wikipedia.org}}
|
||||||
\end{multicols}
|
\end{multicols}\end{itemize}
|
||||||
\end{itemize}
|
|
||||||
\end{frame}
|
\end{frame}
|
||||||
|
|
||||||
\end{document}
|
\end{document}
|
||||||
|
|
|
@ -8,7 +8,3 @@ license = "AGPL-3.0-or-later"
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|
||||||
|
|
||||||
[lints.clippy]
|
|
||||||
pedantic = "warn"
|
|
||||||
|
|
Loading…
Reference in a new issue