-
Notifications
You must be signed in to change notification settings - Fork 1
/
disy.sty
173 lines (154 loc) · 4.74 KB
/
disy.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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
%
% Copyright 2017, Data61
% Commonwealth Scientific and Industrial Research Organisation (CSIRO)
% ABN 41 687 119 230.
%
% This software may be distributed and modified according to the terms of
% the BSD 2-Clause license. Note that NO WARRANTY is provided.
% See "LICENSE_BSD2.txt" for details.
%
% @TAG(DATA61_BSD)
%
% disy.sty
%
% Document style for reports by the UNSW Distributed Systems and
% Operating Systems (DiSy) group.
%
% Uses Andrew O'Brien's fancy title page...
%
% Written 2000-08-12 by Gernot Heiser <[email protected]>
%
% $Id: disy.sty,v 1.2 2009-02-04 03:13:15 ikuz Exp $
% OPTIONS:
% color: use colour logos
% cmyk: will generate cmyk colours rather than rgb colours
% this may prove more reliable on some printers
% but is inclined to look odd on monitors
% nicta: use NICTA logo besides UNSW
% nictaonly: use NICTA logo but no UNSW
%
% COMMANDS:
% \AuthorEmail Author's email address (default: disy@cse)
\ProvidesPackage{disy}
\RequirePackage{graphicx}
\RequirePackage{url}
\RequirePackage{color}
\DeclareOption{color}{\Colortrue}
\DeclareOption{colour}{\Colortrue}
\DeclareOption{cmyk}{\CMYKtrue}
\DeclareOption{nicta}{\NICTAtrue}
\DeclareOption{nictaonly}{\NICTAtrue\UNSWfalse}
\newif\ifColor \Colorfalse
\newif\ifNICTA \NICTAfalse
\newif\ifCMYK \CMYKfalse
\newif\ifUNSW \UNSWtrue % for historic reasons
\ProcessOptions
\ifColor
\ifCMYK
\definecolor{nictablue}{cmyk}{1.0,0.18,0.0,0.51}
\definecolor{nictagreen}{cmyk}{1.0,0.0,0.69,0.43}
\else
\definecolor{nictablue}{rgb}{.000,.348,.508}
\definecolor{nictagreen}{rgb}{.020,.426,.328}
\fi
\else
\definecolor{nictablue}{cmyk}{0,0,0,1} % black
\definecolor{nictagreen}{cmyk}{0,0,0,1} % black
\fi
\newif\ifHave@HyperRef\Have@HyperReffalse
\AtBeginDocument{\@ifpackageloaded{hyperref}{\Have@HyperReftrue}{}}
\newcommand{\AuthorEmail}[1]{\def\AuthorEmailString{#1}}
\newcommand{\CrestFileName}{\ifColor unicrest-colour\else unicrest-screen\fi}
\AuthorEmail{[email protected]}
\newlength{\centeroffset}
\setlength{\centeroffset}{-0.5\oddsidemargin}
\addtolength{\centeroffset}{0.5\evensidemargin}
\def\maketitle{
% to suppress overfull bars in ``draft'' mode:
\newlength{\saveOverfullRule}
\setlength{\saveOverfullRule}{\overfullrule}
\setlength\overfullrule{0pt}
\thispagestyle{empty}
\vspace*{\stretch{1}}
\noindent\hspace*{\centeroffset}
\begin{minipage}{\textwidth}\flushright%
\urlstyle{sf}%
\raisebox{34mm}[0pt][0pt]{%
\newcommand{\LogoW}{21mm}%
\newlength{\ERTOSw}%
%\setlength{\ERTOSw}{\textwidth}%
%\addtolength{\ERTOSw}{-\LogoW}\addtolength{\ERTOSw}{-2em}%
\settowidth{\ERTOSw}{{\sf\large https://ts.data61.csiro.au/projects/TS/}}%
%\settowidth{\ERTOSw}{{\sf\large Operating Systems Group}}%
\newcommand{\NICTAlogo}{\includegraphics[width=\LogoW]{figs/\LogoFileName}}%
\noindent\sf%
\begin{minipage}[b]{\textwidth}\sf\large%
\hspace*{-10mm}%
\ifNICTA%
\color{nictablue}%
\begin{minipage}[b]{\ERTOSw}\urlstyle{sf}%
Data61 Trustworthy Systems\\
\url{https://ts.data61.csiro.au/projects/TS/}\\~
\end{minipage}
\else~
\fi%
\end{minipage}%
\hspace*{-4mm}%
}%
%
\flushright
{\Huge\bfseries
\@title\\}
\vspace*{\stretch{2}}
\noindent\rule[-1ex]{\textwidth}{5pt}\\[2.5ex]
{\Large \bfseries \@author}\\
\ifUNSW
\vspace{2ex}
\else
\urlstyle{sf}
\ifHave@HyperRef
\url{\AuthorEmailString}\\[2ex]
\else
\AuthorEmailString\\[2ex]
\fi
\fi
{\sf \hfill{\Large \@date}}\\[2ex]
\end{minipage}
\vspace{\stretch{1}}
\noindent\hspace*{\centeroffset}\begin{minipage}{\textwidth}
\flushright
\end{minipage}
\vspace{\stretch{2}}
\vfill
\begin{minipage}{\textwidth}
\flushright
{\noindent\sf%
\ifUNSW
\newcommand{\DiSyCrest}
{\includegraphics[height=25mm,clip]{imgs/\CrestFileName}}%
\newlength{\DiSyCrestwdth}\settowidth{~\DiSyCrestwdth}{\DiSyCrest}%
\newlength{\DiSyFtwdth}%
\setlength{\DiSyFtwdth}{\textwidth}%
\addtolength{\DiSyFtwdth}{-\DiSyCrestwdth}%
\addtolength{\DiSyFtwdth}{-1em}%
\begin{minipage}[b]{0.7\textwidth}\flushright
\urlstyle{sf}
\ifHave@HyperRef
\url{\AuthorEmailString}\\
\else
\AuthorEmailString\\
\fi
\url{http://www.cse.unsw.edu.au/~disy/}\\
Operating Systems and Distributed Systems Group\\
School of Computer Science and Engineering\\
The University of New South Wales\\
UNSW Sydney 2052, Australia%\vspace*{0.6ex}%
\end{minipage}%
\hspace{1em}\DiSyCrest%
\fi
}
\end{minipage}
\clearpage
% reset overfull rule
\setlength{\overfullrule}{\saveOverfullRule}
}%\maketitle