-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathteamnote.sty
78 lines (54 loc) · 2.12 KB
/
teamnote.sty
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
\ProvidesPackage{teamnote}
\usepackage[left=1cm,right=1cm,top=2cm,bottom=1cm,a4paper]{geometry}
\usepackage{fancyhdr}
\usepackage{lastpage}
\usepackage{minted}
\usepackage{color}
\usepackage{indentfirst}
\setlength{\columnseprule}{0.4pt}
\pagenumbering{arabic}
\setminted{breaklines=true, tabsize = 2, breaksymbolleft=}
\usemintedstyle{perldoc}
\newcommand{\revised}{Should be \textcolor{red}{\textbf{revised}}.}
\newcommand{\tested}{Should be \textcolor{red}{\textbf{tested}}.}
\newcommand{\added}{Should be \textcolor{red}{\textbf{added}}.}
\newcommand{\WIP}{\textcolor{red}{\textbf{WIP}}}
\newcommand{\schoolname}{}
\newcommand{\teamname}{}
\newcommand{\authorname}{}
\newcommand{\maketitlepage}{\maketitle
\tableofcontents
\thispagestyle{fancy}
}
\DeclareRobustCommand{\teamnote}[3]{
\renewcommand{\schoolname}{#1}
\renewcommand{\teamname}{#2}
\renewcommand{\authorname}{#3}
}
\pagestyle{fancy}
\lhead{\schoolname{} -- \teamname}
\rhead{Page \thepage{} of
\ifthenelse{\pageref{LastPage} < 26}{\pageref{LastPage}}{\textcolor{red}{\textbf{\pageref{LastPage}}}}}
\fancyfoot{}
\title{Team Note of \teamname}
\author{\authorname}
\date{Compiled on \today}
\newboolean{BangShowUsage}
\setboolean{BangShowUsage}{false}
\newcommand{\ShowUsage}{\setboolean{BangShowUsage}{false}}
\newcommand{\HideUsage}{\setboolean{BangShowUsage}{true}}
\newboolean{BangShowComplexity}
\setboolean{BangShowComplexity}{false}
\newcommand{\ShowComplexity}{\setboolean{BangShowComplexity}{false}}
\newcommand{\HideComplexity}{\setboolean{BangShowComplexity}{true}}
\newboolean{BangShowAuthor}
\setboolean{BangShowAuthor}{false}
\newcommand{\ShowAuthor}{\setboolean{BangShowAuthor}{false}}
\newcommand{\HideAuthor}{\setboolean{BangShowAuthor}{true}}
\newcommand{\Algorithm}[6]{
\subsection{#1}
\ifthenelse{\equal{#2}{} \OR \boolean{BangShowUsage}}{}{\textbf{Usage:} #2}
\ifthenelse{\equal{#3}{} \OR \boolean{BangShowComplexity}}{}{\textbf{Time Complexity:} #3}
\ifthenelse{\equal{#6}{} \OR \boolean{BangShowAuthor}}{}{\textbf{Author:} #6}
\ifthenelse{\equal{#5}{}}{}{\ifthenelse{\equal{#4}{}}{\inputminted[]{cpp}{#5}}{\inputminted[]{#4}{#5}}}
}