diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f5a214..33c63d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,12 @@ # Changelog + - 1.7.0 (2023.05.18) + 1. fix order of packages `inputenc` and `microtype` + 2. replace package `url` with `xurl` + 3. add package `booktabs` + 4. add list of accented slovak characters for `lstlisting` + 5. add style `code-listing` for code listings + 6. fix referencing unknown language + - 1.6.3 (2023.04.17) 1. more thorough make clean 2. fix slovak labels (Výpis, Algoritmus) diff --git a/FEIstyle.cls b/FEIstyle.cls index 39fba18..6baa2ba 100644 --- a/FEIstyle.cls +++ b/FEIstyle.cls @@ -1,5 +1,5 @@ \NeedsTeXFormat{LaTeX2e} -\ProvidesClass{FEIstyle}[2023/04/17 v. 1.6.3 Thesis template - FEI STUBA] +\ProvidesClass{FEIstyle}[2023/05/18 v. 1.7.0 Thesis template - FEI STUBA] % parse arguments \DeclareOption{dizp}{\def\typPraceSkr{dizp} @@ -59,20 +59,19 @@ \usepackage[overload]{textcase} \usepackage[acronym,nopostdot,nogroupskip,nonumberlist]{glossaries} +\usepackage{microtype} +\usepackage[utf8]{inputenc} % we should use ISO 690 & 690-2 http://www.fei.stuba.sk/sk/kniznica-fei/vzory-bibliografickych-odkazov-a-citovanie.html?page_id=1756 % package for biblatex https://github.com/michal-h21/biblatex-iso690 \usepackage[backend=biber,style=iso-numeric,autolang=other,bibencoding=utf8,seconds=true]{biblatex} \ifnum\FEIenglish=0 - \usepackage[slovak]{babel} + \usepackage[english,slovak]{babel} \else \usepackage[english]{babel} \fi -\usepackage[utf8]{inputenc} - \usepackage[style=slovak]{csquotes} -\usepackage{microtype} \usepackage[T1]{fontenc} \usepackage[immediate]{silence} @@ -98,17 +97,82 @@ \usepackage{changepage} \usepackage{scrextend} \usepackage{xstring} -\usepackage{url} +\usepackage{xurl} \usepackage{enumitem} \usepackage{caption} \usepackage{subcaption} \usepackage[bookmarksopen,colorlinks,plainpages=false,urlcolor=blue,hypertexnames=false,unicode]{hyperref} \usepackage{algorithm} \usepackage{algorithmic} +\usepackage{booktabs} % \usepackage{showframe} % debugging overflows % \cftsetpnumwidth{1.8em} % set the dots width in loX (f,t,l,a...) https://tex.stackexchange.com/q/369283/106389 +% https://stackoverflow.com/a/74266238 +\lstset{ + extendedchars=true, + literate= + {á}{{\'a}}1 + {ä}{{\"a}}1 + {č}{{\v{c}}}1 + {ď}{{\v{d}}}1 + {é}{{\'e}}1 + {í}{{\'i}}1 + {ĺ}{{\'l}}1 + {ľ}{{\v{l}}}1 + {ň}{{\v{n}}}1 + {ó}{{\'o}}1 + {ô}{{\^o}}1 + {ŕ}{{\'{r}}}1 + {š}{{\v{s}}}1 + {ť}{{\v{t}}}1 + {ú}{{\'u}}1 + {ý}{{\'y}}1 + {ž}{{\v{z}}}1 + {Á}{{\'A}}1 + {Ä}{{\""A}}1 + {Č}{{\v{C}}}1 + {Ď}{{\v{C}}}1 + {É}{{\'E}}1 + {Í}{{\'I}}1 + {Ĺ}{{\'L}}1 + {Ľ}{{\v{L}}}1 + {Ň}{{\v{N}}}1 + {Ó}{{\'O}}1 + {Ô}{{\^O}}1 + {Ŕ}{{\'{R}}}1 + {Š}{{\v{S}}}1 + {Ť}{{\v{T}}}1 + {Ú}{{\'U}}1 + {Ý}{{\'Y}}1 + {Ž}{{\v{Z}}}1 +} + +% https://www.overleaf.com/learn/latex/Code_listing +\definecolor{codegreen}{rgb}{0,0.6,0} +\definecolor{codegray}{rgb}{0.5,0.5,0.5} +\definecolor{codepurple}{rgb}{0.58,0,0.82} +\definecolor{backcolour}{rgb}{0.95,0.95,0.92} +\lstdefinestyle{code-listing}{ + backgroundcolor=\color{backcolour}, + commentstyle=\color{codegreen}, + keywordstyle=\color{magenta}, + numberstyle=\tiny\color{codegray}, + stringstyle=\color{codepurple}, + basicstyle=\ttfamily\footnotesize, + breakatwhitespace=false, + breaklines=true, + captionpos=b, + keepspaces=true, + numbers=none, + numbersep=5pt, + showspaces=false, + showstringspaces=false, + showtabs=false, + tabsize=2 +} + \newboolean{isThesis} \IfEqCase*{\isThesis}{ diff --git a/includes/core.tex b/includes/core.tex index e03774a..8b50739 100644 --- a/includes/core.tex +++ b/includes/core.tex @@ -10,7 +10,7 @@ \section{Možnosti anonymizácie} \subsection{Súkromné prehliadanie} \noindent Najpoužívanejšie internetové prehliadače súčasnosti majú v sebe zabudovanú funkcionalitu, ktorá dokáže čiastočne anonymizovať prístup na internet. Táto funkcionalita blokuje ukladanie navštívených stránok do histórie a nezaznamenáva súbory, ktoré sa stiahnu z~internetu. \acrshort{sw} a \acrlong{hw} sú skratky. -\begin{table}[!htbp] +\begin{table}[ht] \caption{Moduly a ich funkcie pri anonymizácii} \label{modulyVlastnosti} \begin{center} @@ -35,12 +35,20 @@ \subsection{Súkromné prehliadanie} Proxify it & & &X & X & & & & & & & & & & \\ \hline I'm not here & & & & X & & & & & & & & & & \\ \hline Get edition & &X &X &X &X&X & & & & & & & & \\ \hline -Anonymous browsing toolbar & & & X & X & & & & & & & & & & \\ \hline -Easy hide your IP and surf & & & X & X& & & & X & X & X & X & & & \\ \hline \end{tabular} \end{center} \end{table} +\begin{table}[ht] + \centering + \caption{Príklad tabuľky s použitím balíka \texttt{booktabs}} + \begin{tabular}{@{}ll@{}} \toprule + Veľkosť (B) & Typ správy \\ \midrule + 8 & Nejaký typ správy \\ \bottomrule + \end{tabular} + \label{tab:my_label} +\end{table} + \subsection{Anonymná sieť} \noindent Anonymná sieť je sieť serverov, medzi ktorými dáta prechádzajú šifrované. V anonymných sieťach dáta prechádzajú z počítača používateľa, odkiaľ bola požiadavka poslaná, cez viaceré proxy smerovače, z ktorých každý správu doplní o smerovanie a zašifruje vlastným kľúčom. Cesta od ... @@ -87,7 +95,8 @@ \subsection{Vzhľad} \begin{lstlisting}[ caption={Ukážka algoritmu}, label={lst:main-c}, - language=c + language=c, + style=code-listing ] /* Hello World program */