-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathhasel.sty
executable file
·100 lines (88 loc) · 2.84 KB
/
hasel.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
%% HASEL main style file
%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{hasel}[2022/02/14 v1.0 HASEL styles]
\usepackage[english]{babel}
\usepackage{cite}
\usepackage{color}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage[utf8]{inputenc}
\usepackage{listings}
\usepackage{xspace}
%% colors (Eclipse-like colors for listings)
\definecolor{stringcolor}{RGB}{5,60,220}
\definecolor{keywordcolor}{RGB}{127,0,85}
\definecolor{javadoccolor}{RGB}{63,95,191}
\definecolor{commentcolor}{RGB}{0,127,0}
\definecolor{doccolor}{RGB}{63,95,191}
%% fonts
\renewcommand{\rmdefault}{ppl}
\renewcommand{\sfdefault}{phv}
\renewcommand{\ttdefault}{pcr}
\newcommand{\phvbold}{\sffamily\bfseries}
%% captions for figures, listings, and tables
\long\def\@makecaption#1#2{%
\vskip\abovecaptionskip
\sbox\@tempboxa{{\phvbold{\small #1}}: \sffamily{\small #2}}%
\ifdim \wd\@tempboxa >\hsize
{\phvbold{\small #1}}: {\sffamily{\small #2}}\par
\else
\global \@minipagefalse
\hb@xt@\hsize{\box\@tempboxa\hfil}%
\fi
\vskip\belowcaptionskip%
}
%% General figure command
% use: \fig[width]{file}{caption}{label}
\newcommand\fig[4][0cm]{%
\begin{figure}[htb]
\ifdim #1=0cm
\includegraphics{#2}
\else
\includegraphics[width=#1]{#2}
\fi
\caption{\label{#4}#3}
\end{figure}%
}
%% smaller bullet for itemized lists
\renewcommand\labelitemi{\tiny\raisebox{1.5pt}{$\m@th\bullet$}}
%% configuration and helpers for listings
\lstset{language=Java}
\lstset{columns=fullflexible}
\lstset{basicstyle=\ttfamily\small}
\lstset{keywordstyle=\color{keywordcolor}\bfseries}
\lstset{commentstyle=\color{commentcolor}}
\lstset{morecomment=[s][\color{doccolor}]{/**}{*/}}
\lstset{stringstyle=\color{stringcolor}}
\lstset{tabsize=4}
\lstset{showstringspaces=false}
\lstset{lineskip=1.5pt}
\lstset{captionpos=b}
\lstset{moredelim=[is][\bfseries]{|}{|}}
\newcommand\lst{\lstinline}
%% useful commands
\newcommand{\note}[2]{%
\fbox{\bfseries\sffamily\scriptsize#1}
{\sf\small$\triangleright$\textit{#2}$\triangleleft$}
}
\newcommand{\todo}[1]{\note{TODO}{#1}}
\newcommand{\ncite}[1]{\note{CITE}{#1}}
%% some abbrevations
\newcommand{\lstref}[1]{Listing~\ref{#1}\xspace}
\newcommand{\algref}[1]{Algorithm~\ref{#1}\xspace}
\newcommand{\chpref}[1]{Chapter~\ref{#1}\xspace}
\newcommand{\appref}[1]{Appendix~\ref{#1}\xspace}
\newcommand{\secref}[1]{Section~\ref{#1}\xspace}
\newcommand{\figref}[1]{Figure~\ref{#1}\xspace}
\newcommand{\tabref}[1]{Table~\ref{#1}\xspace}
\newcommand{\ie}{\emph{i.e.},\xspace}
\newcommand{\eg}{\emph{e.g.},\xspace}
\newcommand{\etal}{\emph{et al.}\xspace}
\newcommand{\changedistiller}{\textsc{Change\-Distiller}\xspace}
\newcommand{\zbinder}{\textsc{ZBinder}\xspace}
\newcommand{\evolizer}{\textsc{Evolizer}\xspace}
\newcommand{\famix}{\textsc{Famix}\xspace}
\newcommand{\code}[1]{\texttt{\small #1}}
\newcommand{\codecap}[1]{\texttt{\footnotesize #1}}
\endinput