-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathconfig.tex
108 lines (87 loc) · 3.27 KB
/
config.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
\documentclass[12pt,a4paper]{article}
\usepackage[english,italian]{babel}
\usepackage[utf8]{inputenc}
\usepackage{hyperref}
\hypersetup{
bookmarks=true, % show bookmarks bar?
% unicode=false, % non-Latin characters in Acrobat’s bookmarks
% pdftoolbar=true, % show Acrobat’s toolbar?
pdfmenubar=true, % show Acrobat’s menu?
% pdffitwindow=false, % window fit to page when opened
pdfstartview={FitH}, % fits the width of the page to the window
pdftitle={Note di Algoritmi}, % title
pdfauthor={Timoty Granziero}, % author
% pdfsubject={}, % subject of the document
% pdfcreator={Creator}, % creator of the document
% pdfproducer={Producer}, % producer of the document
% pdfkeywords={keyword1, key2, key3}, % list of keywords
% pdfnewwindow=true, % links in new PDF window
colorlinks=true, % false: boxed links; true: colored links
linkcolor=black, % color of internal links (change box color with linkbordercolor)
% citecolor=green, % color of links to bibliography
% filecolor=magenta, % color of file links
urlcolor=cyan % color of external links
}
\usepackage{graphicx} %img/media
\usepackage{xcolor} %colors
\usepackage{enumitem} %lists
\usepackage[perpage]{footmisc} %footnote, starting at 1 every page
\usepackage{mathtools,stmaryrd} %math package
\usepackage{amssymb} % N, R ... symbols
\usepackage{totpages} % Per totale pagine
% per frecce in tutte le direzioni, comando \arrow{0}, \arrow{1}, etc..
\makeatletter
\newcommand{\fixed@sra}{$\vrule height 2\fontdimen22\textfont2 width 0pt\rightarrow$}
\newcommand{\arrow}[1]{%
\mathrel{\text{\rotatebox[origin=c]{\numexpr#1*45}{\fixed@sra}}}
}
\makeatother
\usepackage{cancel}
\usepackage{appendix}
\let\emph\relax % there's no \RedeclareTextFontCommand
\DeclareTextFontCommand{\emph}{\bfseries} %emph to textbf
%floor and ceil
\DeclarePairedDelimiter\ceil{\lceil}{\rceil}
\DeclarePairedDelimiter\floor{\lfloor}{\rfloor}
%abs and norm
\DeclarePairedDelimiter\abs{\lvert}{\rvert}%
\DeclarePairedDelimiter\norm{\lVert}{\rVert}%
% Swap the definition of \abs* and \norm*, so that \abs
% and \norm resizes the size of the brackets, and the
% starred version does not.
\makeatletter
\let\oldabs\abs
\def\abs{\@ifstar{\oldabs}{\oldabs*}}
%
\let\oldnorm\norm
\def\norm{\@ifstar{\oldnorm}{\oldnorm*}}
\makeatother
\usepackage{clrscode3e} % algorithms pseudocode
\RequirePackage{graphics} % needed for \scalebox command
\usepackage{tikz-qtree} %trees
\newcommand{\authorName}{Timoty Granziero}
%prevent page break
\newenvironment{preventpagebreak}
{\par\nobreak\vfil\penalty0\vfilneg
\vtop\bgroup}
{\par\xdef\tpd{\the\prevdepth}\egroup
\prevdepth=\tpd}
%liste
\renewcommand{\labelitemi}{$\circ$}
\renewcommand{\labelitemii}{$\cdot$}
\renewcommand{\labelitemiii}{$\diamond$}
\renewcommand{\labelitemiv}{$\ast$}
\author{\authorName}
\date{\today}
\title{Appunti di Algoritmi}
\usepackage{fancyhdr} %header e footer
%header/footer setup
\fancyhf{}
\fancyhead[R]{\small\scshape\nouppercase{\leftmark}}
\fancyhead[L]{\small\scshape\nouppercase{\rightmark}}
%\fancyhead[L,R]{\small\thepage}
\lhead{\nouppercase{\rightmark}}
\rhead{\nouppercase{\leftmark}}
\cfoot{\thepage}
%\lfoot{\authorName}
\pagestyle{fancy}