Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions book/halbook.tex
Original file line number Diff line number Diff line change
Expand Up @@ -472,15 +472,21 @@

\floatname{algorithm}{\textcolor{\algorithmiccolor}{\algorithmicfont Algorithm}}

\makeatletter
\@addtoreset{algorithm}{chapter}% algorithm counter resets every chapter
\makeatother

\renewcommand{\thealgorithm}{\arabic{chapter}.\arabic{algorithm}}

\newcommand{\newalgorithm}[3]{%
\begin{algorithm}[t]
\label{alg:#1}
\caption{#2}
\begin{small}
\begin{algorithmic}[1]
#3
\end{algorithmic}
\end{small}
\caption{#2}
\label{alg:#1}
\end{algorithm}}

\newcommand{\categ}[1]{\textsc{\textcolor{darkgrey}{#1}}}
Expand Down