115 lines
3.2 KiB
TeX
115 lines
3.2 KiB
TeX
|
|
\ProvidesPackage{teamnote}
|
|
|
|
\usepackage[left=1cm,right=1cm,top=2cm,bottom=1cm,a4paper]{geometry}
|
|
\usepackage{fancyhdr}
|
|
\usepackage{lastpage}
|
|
\usepackage{minted}
|
|
\usepackage{color}
|
|
\usepackage{indentfirst}
|
|
\usepackage{amssymb}
|
|
\usepackage{amsmath}
|
|
\usepackage{import}
|
|
\usepackage{caption}
|
|
\usepackage[table,xcdraw]{xcolor}
|
|
\usepackage[T1]{fontenc}
|
|
\usepackage{setspace}
|
|
|
|
\setstretch{1} % No line-spacing
|
|
|
|
\renewcommand{\@listI}{% No spacing on list
|
|
\leftmargin=25pt
|
|
\rightmargin=0pt
|
|
\labelsep=5pt
|
|
\labelwidth=20pt
|
|
\itemindent=0pt
|
|
\listparindent=0pt
|
|
\topsep=0pt plus 2pt minus 4pt
|
|
\partopsep=0pt plus 1pt minus 1pt
|
|
\parsep=0pt plus 1pt
|
|
\itemsep=\parsep}
|
|
|
|
\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{Working in progress.}}}
|
|
|
|
\newcommand{\schoolname}{Some University}
|
|
\newcommand{\teamname}{Some Teamname}
|
|
\newcommand{\authorname}{Some Members}
|
|
\newcommand{\contestname}{Some Contest}
|
|
|
|
\newcommand{\maketitlepage}{\maketitle
|
|
|
|
\tableofcontents
|
|
|
|
\thispagestyle{fancy}
|
|
|
|
}
|
|
\DeclareRobustCommand{\teamnote}[4]{
|
|
\renewcommand{\schoolname}{#1}
|
|
\renewcommand{\teamname}{#2}
|
|
\renewcommand{\authorname}{#3}
|
|
\renewcommand{\contestname}{#4}
|
|
}
|
|
\pagestyle{fancy}
|
|
% \lhead{\schoolname{} -- \teamname}
|
|
% \rhead{Page \thepage{} of
|
|
\rhead{\schoolname{} -- \teamname -- \contestname}
|
|
\lhead{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}}}
|
|
}
|
|
|
|
\newcommand{\SubAlgorithm}[6]{
|
|
\subsubsection{#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}}}
|
|
}
|