Add LaTeX document

This commit is contained in:
Mylloon 2023-10-03 12:08:51 +02:00
parent ae366b5f81
commit f8b209af75
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
7 changed files with 121 additions and 0 deletions

View file

@ -2,6 +2,9 @@
- [C](#c)
- [C++](#c-1)
- [LaTeX](#latex)
- [Document](#document)
- [Presentation](#presentation)
- [Python](#python)
- [OCaml](#ocaml)
- [Rust](#rust)
@ -31,6 +34,29 @@ Copy and paste [`cpp/`](./cpp/) directory, and you should be good to go!
> Note that in headers, the syntax is `PROJECTNAME_FILENAME_HPP`
## LaTeX
### Document
Copy and paste [`latex/document`](./latex/document/) 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 `document.pdf`.
### Presentation
Copy and paste [`latex/presentation`](./latex/presentation/) directory,
and you should be good to go!
- **Run `make updatepackage` to download/update dependencie (projektor).**
- **Run `make` to compile the document.**
- **Run `make clean` to clean artifacts.**
> It is by default configured to output `slides.pdf`.
## Python
Copy and paste [`python/`](./python/) directory, and you should be good to go!

5
latex/document/.gitignore vendored Normal file
View file

@ -0,0 +1,5 @@
*
!.gitignore
!Makefile
!*.tex

16
latex/document/Makefile Normal file
View file

@ -0,0 +1,16 @@
NAME = document
TEX = $(NAME).tex
SRC = $(TEX)
PDF = $(TEX:.tex=.pdf)
TEXMK = latexmk -shell-escape -lualatex
all: $(PDF)
$(PDF): %.pdf: %.tex
$(TEXMK) $<
EXTS = aux fdb_latexmk fls log nav out snm synctex.gz toc
clean:
rm -rf $(PDF) _minted-$(NAME)/ $(foreach ext,$(EXTS),$(NAME).$(ext))

View file

@ -0,0 +1,23 @@
\documentclass{article}
\usepackage[T1]{fontenc} % encoding
\renewcommand{\familydefault}{\sfdefault} % sans-serif font
\usepackage[french]{babel} % langages
\frenchsetup{SmallCapsFigTabCaptions=false}
\usepackage[hidelinks]{hyperref} % clickable links in table of contents
\title{TITLE}
\author{YOU}
\date{}
\begin{document}
\maketitle
\tableofcontents
\clearpage
\section{SECTION}
Hello, world!
\end{document}

5
latex/presentation/.gitignore vendored Normal file
View file

@ -0,0 +1,5 @@
*
!.gitignore
!Makefile
!*.tex

View file

@ -0,0 +1,22 @@
NAME = slides
TEX = $(NAME).tex
SRC = $(TEX)
PDF = $(TEX:.tex=.pdf)
TEXMK = latexmk -lualatex -shell-escape
WGET = wget -q --show-progress
all: $(PDF)
$(PDF): %.pdf: %.tex
$(TEXMK) $<
EXTS = aux fdb_latexmk fls log nav out snm synctex.gz toc vrb
clean:
rm -rf $(PDF) _minted-$(NAME)/ $(foreach ext,$(EXTS),$(NAME).$(ext))
updatepackage:
@$(WGET) https://git.mylloon.fr/Anri/projektor/raw/branch/main/projektor.sty \
-O projektor.sty

View file

@ -0,0 +1,24 @@
\documentclass{beamer}
\usepackage{projektor}
\title{TITLE}
\author{YOU}
\date{}
\begin{document}
\maketitle
\begin{frame}[t, plain]{Plan}
\tableofcontents
\end{frame}
\section{SECTION}
\begin{frame}{TITLE}
Hello, world!
\end{frame}
\section*{\hspace*{15mm} Bye, world.}
\end{document}