mirror of
https://github.com/cupcakearmy/memoir.git
synced 2024-12-22 08:06:27 +00:00
latex
This commit is contained in:
parent
2a14b71435
commit
17d7ff129c
@ -2,5 +2,6 @@
|
|||||||
"index": "Intro",
|
"index": "Intro",
|
||||||
"cli": "CLI",
|
"cli": "CLI",
|
||||||
"git": "Git",
|
"git": "Git",
|
||||||
"dev_ops": "Dev Ops"
|
"dev_ops": "Dev Ops",
|
||||||
|
"latex": "LaTeX"
|
||||||
}
|
}
|
||||||
|
12
pages/latex.md
Executable file
12
pages/latex.md
Executable file
@ -0,0 +1,12 @@
|
|||||||
|
# LaTeX
|
||||||
|
|
||||||
|
This is a collection of different LaTeX snippets for different use-cases.
|
||||||
|
|
||||||
|
## Building
|
||||||
|
|
||||||
|
I exclusively [Tectonic](https://tectonic-typesetting.github.io/en-US/) as build engine, as it is a modern alternative to the "OGs".
|
||||||
|
Most importantly, it supports lazy loading of dependencies, so the install size is tiny (in comparison).
|
||||||
|
|
||||||
|
## Pipeline
|
||||||
|
|
||||||
|
To build Latex in a GitHub Action, see [here](dev_ops/github-actions/latex)
|
14
pages/latex/acronyms.md
Executable file
14
pages/latex/acronyms.md
Executable file
@ -0,0 +1,14 @@
|
|||||||
|
# Acronyms
|
||||||
|
|
||||||
|
```latex
|
||||||
|
\usepackage{acro}
|
||||||
|
|
||||||
|
\DeclareAcronym{dtn}{
|
||||||
|
short = DTN ,
|
||||||
|
long = Delay / Disruption Tollerant Networking ,
|
||||||
|
}
|
||||||
|
|
||||||
|
\ac{tcp}
|
||||||
|
|
||||||
|
\printacronyms
|
||||||
|
```
|
34
pages/latex/bibliography.md
Executable file
34
pages/latex/bibliography.md
Executable file
@ -0,0 +1,34 @@
|
|||||||
|
# Bibliography
|
||||||
|
|
||||||
|
```latex
|
||||||
|
\usepackage[backend=bibtex8, style=ieee]{biblatex}
|
||||||
|
\addbibresource{db.bib}
|
||||||
|
|
||||||
|
\cite{jedari2018survey}
|
||||||
|
|
||||||
|
\medskip
|
||||||
|
\printbibliography
|
||||||
|
```
|
||||||
|
|
||||||
|
```latex
|
||||||
|
@article{jedari2018survey,
|
||||||
|
title = {A survey on human-centric communications in non-cooperative wireless relay networks},
|
||||||
|
author = {Jedari, Behrouz and Xia, Feng and Ning, Zhaolong},
|
||||||
|
journal = {IEEE Communications Surveys \& Tutorials},
|
||||||
|
volume = {20},
|
||||||
|
number = {2},
|
||||||
|
pages = {914--944},
|
||||||
|
year = {2018},
|
||||||
|
publisher = {IEEE}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
For the backend `biber` should be the one used if versions compatiblity is not an issue
|
||||||
|
|
||||||
|
- [Styles](https://www.overleaf.com/learn/latex/Biblatex_citation_styles#Citation_styles)
|
||||||
|
- [Intro](https://www.overleaf.com/learn/latex/Bibliography_management_with_biblatex#Introduction)
|
||||||
|
|
||||||
|
### RFC
|
||||||
|
|
||||||
|
- [https://datatracker.ietf.org/doc/html/draft-carpenter-rfc-citation-recs-01#section-5.2](https://datatracker.ietf.org/doc/html/draft-carpenter-rfc-citation-recs-01#section-5.2)
|
||||||
|
- [https://notesofaprogrammer.blogspot.com/2014/11/bibtex-entries-for-ietf-rfcs-and.html](https://notesofaprogrammer.blogspot.com/2014/11/bibtex-entries-for-ietf-rfcs-and.html)
|
13
pages/latex/code.md
Executable file
13
pages/latex/code.md
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
# Code
|
||||||
|
|
||||||
|
```latex
|
||||||
|
% Inline
|
||||||
|
Version: \verb|1.2.3|
|
||||||
|
|
||||||
|
% Block
|
||||||
|
\begin{verbatim*}
|
||||||
|
Text enclosed inside \texttt{verbatim} environment
|
||||||
|
is printed directly
|
||||||
|
and all \LaTeX{} commands are ignored.
|
||||||
|
\end{verbatim*}
|
||||||
|
```
|
11
pages/latex/footnotes.md
Executable file
11
pages/latex/footnotes.md
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
# Footnotes
|
||||||
|
|
||||||
|
```latex
|
||||||
|
% Simple
|
||||||
|
Something\footnote{This is a footnote}
|
||||||
|
|
||||||
|
% With link
|
||||||
|
Kubernetes\footnote{\url{https://kubernetes.io/}}
|
||||||
|
```
|
||||||
|
|
||||||
|
[https://www.overleaf.com/learn/latex/Footnotes](https://www.overleaf.com/learn/latex/Footnotes#Introduction_to_LaTeX.27s_main_footnote_commands)
|
19
pages/latex/images.md
Executable file
19
pages/latex/images.md
Executable file
@ -0,0 +1,19 @@
|
|||||||
|
# Images
|
||||||
|
|
||||||
|
```latex
|
||||||
|
\usepackage{graphicx}
|
||||||
|
|
||||||
|
% Relative to .tex file
|
||||||
|
\graphicspath{ {../images/} }
|
||||||
|
|
||||||
|
\begin{figure}[h]
|
||||||
|
\label{fig:cat}
|
||||||
|
\caption{Miaaauu}
|
||||||
|
\centering
|
||||||
|
\includegraphics[width=0.6\textwidth]{cat.png}
|
||||||
|
\end{figure}
|
||||||
|
|
||||||
|
Some cat here! \ref{fig:cat}
|
||||||
|
```
|
||||||
|
|
||||||
|
[https://www.overleaf.com/learn/latex/Inserting_Images](https://www.overleaf.com/learn/latex/Inserting_Images)
|
13
pages/latex/links.md
Executable file
13
pages/latex/links.md
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
# Links
|
||||||
|
|
||||||
|
```latex
|
||||||
|
\usepackage{hyperref}
|
||||||
|
|
||||||
|
\href{http://www.overleaf.com}{Something Linky}
|
||||||
|
|
||||||
|
\url{http://www.overleaf.com}
|
||||||
|
```
|
||||||
|
|
||||||
|
Also required for linked TOC.
|
||||||
|
|
||||||
|
[https://www.overleaf.com/learn/latex/Hyperlinks#Linking_web_addresses](https://www.overleaf.com/learn/latex/Hyperlinks#Linking_web_addresses)
|
17
pages/latex/lists.md
Executable file
17
pages/latex/lists.md
Executable file
@ -0,0 +1,17 @@
|
|||||||
|
# Lists
|
||||||
|
|
||||||
|
```latex
|
||||||
|
% Items
|
||||||
|
\begin{itemize}
|
||||||
|
\item a
|
||||||
|
\item b
|
||||||
|
\end{itemize}
|
||||||
|
|
||||||
|
% Numbered
|
||||||
|
\begin{enumerate}
|
||||||
|
\item One
|
||||||
|
\item Two
|
||||||
|
\end{enumerate}
|
||||||
|
```
|
||||||
|
|
||||||
|
[https://www.overleaf.com/learn/latex/Lists](https://www.overleaf.com/learn/latex/Lists)
|
35
pages/latex/tables.md
Executable file
35
pages/latex/tables.md
Executable file
@ -0,0 +1,35 @@
|
|||||||
|
# Tables
|
||||||
|
|
||||||
|
```latex
|
||||||
|
\begin{tabular}{ l|r }
|
||||||
|
\label{item:dtn-simulators-chosen}
|
||||||
|
Name & Language \\
|
||||||
|
\hline
|
||||||
|
The One \cite{sim-theone} & \verb|Java| \\
|
||||||
|
OPS \cite{sim-ops} & \verb|C++| \\
|
||||||
|
ns3-dtn-bit \cite{sim-ns3} & \verb|C++| \\
|
||||||
|
dtnsim \cite{sim-dtnsim} & \verb|Python| \\
|
||||||
|
DTN \cite{sim-dtn} & \verb|C#| \\
|
||||||
|
\end{tabular}
|
||||||
|
```
|
||||||
|
|
||||||
|
```latex
|
||||||
|
begin{table}[h!]
|
||||||
|
\centering
|
||||||
|
\begin{tabular}{|c c c c|}
|
||||||
|
\hline
|
||||||
|
Col1 & Col2 & Col2 & Col3 \\
|
||||||
|
\hline\hline
|
||||||
|
1 & 6 & 87837 & 787 \\
|
||||||
|
2 & 7 & 78 & 5415 \\
|
||||||
|
3 & 545 & 778 & 7507 \\
|
||||||
|
4 & 545 & 18744 & 7560 \\
|
||||||
|
5 & 88 & 788 & 6344 \\
|
||||||
|
\hline
|
||||||
|
\end{tabular}
|
||||||
|
\caption{Table to test captions and labels.}
|
||||||
|
\label{table:1}
|
||||||
|
\end{table}
|
||||||
|
```
|
||||||
|
|
||||||
|
[https://www.overleaf.com/learn/latex/Tables#Tables_with_fixed_length](https://www.overleaf.com/learn/latex/Tables#Tables_with_fixed_length)
|
33
pages/latex/tu-dresden.md
Executable file
33
pages/latex/tu-dresden.md
Executable file
@ -0,0 +1,33 @@
|
|||||||
|
# TU Dresden
|
||||||
|
|
||||||
|
```latex
|
||||||
|
\documentclass{tudscrartcl}
|
||||||
|
|
||||||
|
\iftutex
|
||||||
|
\usepackage{fontspec}
|
||||||
|
\else
|
||||||
|
\usepackage[T1]{fontenc}
|
||||||
|
\fi
|
||||||
|
|
||||||
|
\begin{document}
|
||||||
|
|
||||||
|
% Title
|
||||||
|
\faculty{Faculty of Computer Science}
|
||||||
|
\institute{Institute of Systems Architecture}
|
||||||
|
\chair{Chair of Computer Networks}
|
||||||
|
\extraheadline{Source: \href{https://github.com/cupcakearmy/master-thesis/}{github.com/cupcakearmy/master-thesis/}}
|
||||||
|
\author{Niccolo Borgioli}
|
||||||
|
\date{\today}
|
||||||
|
\title{Comparison of DTN simulators}
|
||||||
|
\maketitle
|
||||||
|
|
||||||
|
\tableofcontents
|
||||||
|
|
||||||
|
\section{Introduction}
|
||||||
|
|
||||||
|
Foo bar
|
||||||
|
|
||||||
|
\end{document}
|
||||||
|
```
|
||||||
|
|
||||||
|
[Docs](https://mirror.foobar.to/CTAN/macros/latex/contrib/tudscr/doc/tudscr.pdf)
|
Loading…
Reference in New Issue
Block a user