Browse Source

style: use minted & tcolorbox for listings

develop
Ezerous 3 years ago
parent
commit
c95f7b12f2
  1. 12
      assets/code/orbit-db-identity.js
  2. 0
      assets/figures/merkle-dag.png
  3. BIN
      assets/figures/orbitdb-identity.png
  4. 1
      chapters/0.preamble/0.0.preamble.tex
  5. 4
      chapters/0.preamble/0.1.summary.tex
  6. 4
      chapters/0.preamble/0.2.abstract.tex
  7. 2
      chapters/0.preamble/0.3.acknowledgements.tex
  8. 4
      chapters/2.theoretical-background/2.2.asymmetric-cryptography.tex
  9. 2
      chapters/2.theoretical-background/2.6.ethereum.tex
  10. 4
      chapters/2.theoretical-background/2.7.ipfs.tex
  11. 4
      chapters/2.theoretical-background/2.8.orbit-db.tex
  12. 10
      custom-commands/custom-listings.tex
  13. 7
      custom-commands/custom-title-page.tex
  14. 21
      examples-page.tex
  15. 28
      packages.tex
  16. 12
      thesis-general.sty
  17. BIN
      thesis.pdf
  18. 8
      thesis.tex
  19. 0
      title-page.tex

12
assets/code/orbit-db-identity.js

@ -0,0 +1,12 @@
{
_id: '<the ID of the external identity>',
// Auto-generated by OrbitDB
_publicKey: '<signing key used to sign OrbitDB entries>',
signatures: {
//Allows the owner of id to prove they own the private key associated with publicKey
id: '<signature of _id signed using publicKey>',
//This links the two ids
publicKey: '<signature of signatures.id + _publicKey using _id>'
},
type: 'orbitdb'
}

0
assets/figures/merkle-dag.PNG → assets/figures/merkle-dag.png

Before

Width:  |  Height:  |  Size: 120 KiB

After

Width:  |  Height:  |  Size: 120 KiB

BIN
assets/figures/orbitdb-identity.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

1
chapters/0.preamble/0.0.preamble.tex

@ -3,7 +3,6 @@
\input{chapters/0.preamble/0.2.abstract}
\newpage
% Acknowledgements
\input{chapters/0.preamble/0.3.acknowledgements}
\newpage

4
chapters/0.preamble/0.1.summary.tex

@ -1 +1,3 @@
Decentralized και τα σχετικά.
\chapter*{Σύνοψη}
\addcontentsline{toc}{chapter}{Σύνοψη}
Decentralized και τα σχετικά.

4
chapters/0.preamble/0.2.abstract.tex

@ -1 +1,3 @@
Don't forget the keywords.
\chapter*{Abstract}
\addcontentsline{toc}{chapter}{Abstract}
Don't forget the keywords.

2
chapters/0.preamble/0.3.acknowledgements.tex

@ -1 +1,3 @@
\chapter*{Ευχαριστίες}
\addcontentsline{toc}{chapter}{Ευχαριστίες}
Ευχαριστούμε η Αθήνα. Ευχαριστούμε η Ελλάδα.

4
chapters/2.theoretical-background/2.2.asymmetric-cryptography.tex

@ -11,7 +11,7 @@
\begin{figure}[H]
\centering
\includegraphics[width=15cm]{asymmetric-key-generation.png}
\includegraphics[width=15cm]{assets/figures/asymmetric-key-generation.png}
\caption{Παραγωγή ασύμμετρου ζεύγους κλειδιών}
\end{figure}
@ -30,7 +30,7 @@
\begin{figure}[H]
\centering
\includegraphics[width=15cm]{asymmetric-end-to-end-communication.png}
\includegraphics[width=15cm]{assets/figures/asymmetric-end-to-end-communication.png}
\caption{Κρυπτογράφηση απ' άκρη σ' άκρη}
\end{figure}

2
chapters/2.theoretical-background/2.6.ethereum.tex

@ -2,7 +2,7 @@
\begin{figure}[H]
\centering
\includegraphics[width=2cm]{ethereum-logo.png}
\includegraphics[width=2cm]{assets/figures/ethereum-logo.png}
\caption{Ethereum logo}
\end{figure}

4
chapters/2.theoretical-background/2.7.ipfs.tex

@ -2,7 +2,7 @@
\begin{figure}[H]
\centering
\includegraphics[width=2cm]{ipfs-logo.png}
\includegraphics[width=2cm]{assets/figures/ipfs-logo.png}
\caption{IPFS logo}
\end{figure}
@ -16,7 +16,7 @@
\item \textbf{Σύνδεση περιεχομένου μέσω κατευθυνόμενων άκυκλων γράφων (Directed Acyclic Graphs ή DAGs)}. Το IPFS αξιοποιεί DAGs (και συγκεκριμένα Merkle DAGs), μίας δομής δεδομένων της οποίας κάθε κόμβος έχει ως μοναδικό αναγνωριστικό το hash του περιεχομένου του (το CID).
\begin{figure}[H]
\centering
\includegraphics[width=15cm]{merkle-dag.png}
\includegraphics[width=15cm]{assets/figures/merkle-dag.png}
\caption{Merkle DAG\cite{2.7-merkle-dags-proto-school}}
\end{figure}
Στο παραπάνω Merkle DAG τα baf...i αποτελούν τα CID των αρχείων και των φακέλων. Το δένδρο δημιουργείται από κάτω προς τα πάνω, υπολογίζοντας κάθε φορά τα κατάλληλα hashes/CIDs. Σε περίπτωση που το περιεχόμενο ενός κόμβου αλλάξει, τότε αλλάζει τόσο το CID του, όσο και τα CIDs όλων των προγόνων του.

4
chapters/2.theoretical-background/2.8.orbit-db.tex

@ -2,7 +2,7 @@
\begin{figure}[H]
\centering
\includegraphics[width=2cm]{orbitdb-logo.png}
\includegraphics[width=2cm]{assets/figures/orbitdb-logo.png}
\caption{OrbitDB logo}
\end{figure}
@ -29,7 +29,7 @@
\begin{figure}[H]
\centering
\includegraphics[width=12cm]{orbitdb-identity.png}
\simplelisting[width=14cm]{orbit-db-identity.js}
\caption{OrbitDB Identity}
\end{figure}

10
custom-commands/custom-listings.tex

@ -0,0 +1,10 @@
\newtcbinputlisting{\simplelisting}[2][]{
listing file={assets/code/#2},
title={},
listing only,
boxrule=1pt,
minted language=javascript,
minted style=default,
minted options={breaklines, breaksymbol={}},
#1
}

7
custom-commands/custom-title.tex → custom-commands/custom-title-page.tex

@ -20,19 +20,20 @@
\renewcommand\maketitle{
{\raggedright
\begin{center}
\thispagestyle{empty}
% Make the logo
\makeatletter
\centering\includegraphics[height=5cm]{\@logo}
% Make the title
\vspace{3.44cm}
\vspace{3cm}
{\huge \@title}
% The authors, school and university name
\vspace{3.72cm}
\vspace{3cm}
{\Large \@author}
\vspace{3.94cm}
\vspace{3cm}
\begin{tabular}{rl}
\textit{Επιβλέπων} & \@supervisor

21
examples-page.tex

@ -1,21 +0,0 @@
This is a list:
\begin{itemize}
\item item 1
\item item 2
\item item 3
\end{itemize}
This is some vertical space
\vspace{2cm}
This is a numbered list:
\begin{enumerate}
\item asdf
\item fdas
\end{enumerate}
\footnote{Here is a footnote}
\texttt{This is monospace}
\newline
\newpage

28
packages.tex

@ -4,19 +4,31 @@
\usepackage[subpreambles=true]{standalone}
% Used for all the files inside thesis directory
\usepackage{subfiles}
% General styling settings
\usepackage{thesis-general}
\usepackage{subfiles} %TODO: possibly unused (remove?)
% Paper size and margins
\usepackage{geometry}
% --- Languages & Fonts ---
\usepackage{languages-fonts}
% --- Styling ---
\usepackage{hyperref} % Extensive support for hypertext
\usepackage{authblk} % Support for footnote style author/affiliation
\usepackage{enumitem} % For item lists
\usepackage{greek-enumerate} % Greek enumeration for ordered item lists
\usepackage{float} % For \begin{figure}[H]
\usepackage[font={footnotesize, it}]{caption} % For captions under figures
\usepackage{csquotes} %TODO: unused atm (remove?)
\usepackage{minted} % Source code highlighting (make sure to add -shell-escape flag!)
\usepackage{tcolorbox} % Colored boxes
\tcbuselibrary{minted} % Make tcolorbox work with minted
% --- Bibliography ---
\usepackage[backend=bibtex, sorting=none]{biblatex}
\usepackage{csquotes}
\usepackage{listings} % Typeset source code listings
% Custom commands
\input{custom-commands/custom-title}
% --- Custom commands ---
\input{custom-commands/custom-title-page}
\input{custom-commands/custom-lists}
\input{custom-commands/custom-listings}

12
thesis-general.sty

@ -1,12 +0,0 @@
\ProvidesPackage{thesis-general}
% --- Languages & Fonts ---
\usepackage{languages-fonts}
% --- Styling ---
\usepackage{hyperref} % Extensive support for hypertext
\usepackage{authblk} % Support for footnote style author/affiliation
\usepackage{enumitem} % For item lists
\usepackage{greek-enumerate} % Greek enumeration for ordered item lists
\usepackage{float} % For \begin{figure}[H]
\usepackage[font={footnotesize, it}]{caption} % For captions under figures

BIN
thesis.pdf

Binary file not shown.

8
thesis.tex

@ -1,4 +1,4 @@
\documentclass{report}
\documentclass[12pt]{report}
% Custom packages
\input{packages}
@ -9,18 +9,16 @@
% Paper size and margins
\geometry{a4paper, top=2.5cm, bottom=2.5cm, left=2.2cm,right=2.2cm}
%TODO: check if it works or remove
\graphicspath{{assets/figures}}
\input{thesis-details}
\input{title-page}
\begin{document}
% Makes the cover page
\maketitle
% TODO: delete this
\input{examples-page}
\input{chapters/0.preamble/0.0.preamble}
% start of thesis body

0
thesis-details.tex → title-page.tex

Loading…
Cancel
Save