summaryrefslogtreecommitdiff
path: root/6033dp1.cls
blob: cb39191509179919ae7b1d67e2ac90f6fee07564 (plain)
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
174
175
%%
%% This is file `6033dp1.cls',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% 6033dp1.dtx  (with options: `class')
%% 
%% This is a generated file.
%% 
%% Copyright (C) 2010 by David Benjamin
%% Copyright (C) 2012 by Benjamin Barenblat
%% 
%% This file may be distributed and/or modified under the conditions of the
%% LaTeX Project Public License, either version 1.2 of this license or (at your
%% option) any later version.
%% 
%% This file is distributed in the hope that it will be useful, but WITHOUT ANY
%% WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
%% FOR A PARTICULAR PURPOSE.  See the LaTeX Project Public License for more
%% details.
%% 
%% The latest version of the LaTeX Project Public License is in
%% 
%%     http://www.latex-project.org/lppl.txt
%% 
%% and version 1.2 or later is part of all distributions of LaTeX version
%% 1999/12/01 or later.
%% 
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesClass{6033dp1}
    [2012/04/14 v1.0.1 MIT 6.033 design project]
\newif\ifdp@titlepage
\DeclareOption{titlepage}{\dp@titlepagetrue}
\DeclareOption{notitlepage}{\dp@titlepagefalse}
\DeclareOption{twocolumn}{\ClassError{6033dp1}%
  {Two-column layout is not permitted}{}}
\DeclareOption{10pt}{\ClassError{6033dp1}%
  {10-point font is not permitted}{}}
\newif\ifdp@strict
\DeclareOption{strict}{\dp@stricttrue}
\DeclareOption{nostrict}{\dp@strictfalse}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
\ExecuteOptions{titlepage,nostrict}
\ProcessOptions\relax
\PassOptionsToClass{11pt}{article}
\LoadClass{article}
\newcommand*{\recitation}[1]{\gdef\@recitation{#1}}
\ifdp@titlepage
  \renewcommand{\maketitle}{\begin{titlepage}%
      \let\footnotesize\small
      \let\footnoterule\relax
      \let \footnote \thanks
      \null\vfil
      \begin{center}%
        {\bfseries\large\@title}%
      \end{center}
      \vfil
      \null\hspace{0.67\textwidth}%
        \parbox{0.33\textwidth}{\raggedright%
          \@author\\
          \ifx\@recitation\undefined\else{\@recitation\\}\fi
          \@date}
      \vfil
      \@thanks
    \end{titlepage}%
    \setcounter{footnote}{0}%
    \global\let\thanks\relax
    \global\let\maketitle\relax
    \global\let\@thanks\@empty
    \global\let\@author\@empty
    \global\let\@recitation\@empty
    \global\let\@date\@empty
    \global\let\@title\@empty
    \global\let\title\relax
    \global\let\author\relax
    \global\let\recitation\relax
    \global\let\date\relax
    \global\let\and\relax}
\else
  \renewcommand{\maketitle}{\par
  \begingroup
    \renewcommand\thefootnote{\@fnsymbol\c@footnote}%
    \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}%
    \long\def\@makefntext##1{\parindent 1em\noindent
            \hb@xt@1.8em{%
                \hss\@textsuperscript{\normalfont\@thefnmark}}##1}%
    \newpage
    \global\@topnum\z@   % Prevents figures from going at top of page.
    \null
    \vskip 2em
    \begin{center}
      {\LARGE\bfseries\@title}
      \vskip 1.5em
      {\Large\lineskip .5em%
        \begin{tabular}[t]{c}%
          \@author
          \ifx\@recitation\undefined
          \else
          \\\@recitation
          \fi
        \end{tabular}\par}%
      \vskip 1em%
      {\large \@date}%
    \end{center}
    \thispagestyle{plain}\@thanks
  \endgroup
  \setcounter{footnote}{0}%
  \global\let\thanks\relax
  \global\let\maketitle\relax
  \global\let\@maketitle\relax
  \global\let\@thanks\@empty
  \global\let\@author\@empty
  \global\let\@date\@empty
  \global\let\@title\@empty
  \global\let\title\relax
  \global\let\author\relax
  \global\let\date\relax
  \global\let\and\relax
  }
\fi
\raggedright
\RequirePackage{parskip}
\RequirePackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\rfoot{\thepage}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\RequirePackage{titlesec}
\titlespacing*{\section}{0pt}{0.5em}{-0.5em}
\titlespacing*{\subsection}{0pt}{0.5em}{-0.5em}
\titlespacing*{\subsubsection}{0pt}{0.5em}{-0.5em}
\def\@seccntformat#1{\@ifundefined{#1@cntformat}%
  {\csname the#1\endcsname\quad}
  {\csname #1@cntformat\endcsname}
}
\def\section@cntformat{\thesection.0\quad}
\global\let\paragraph\undefined
\global\let\subparagraph\undefined
\global\let\subsubparagraph\undefined
\RequirePackage[font={small,bf},labelsep=period,%
  justification=RaggedRight,%
  singlelinecheck=false]{caption}
\usepackage[T1]{fontenc}
\renewcommand{\thetable}{\Roman{table}}
\newcommand{\thead}[1]{\textbf{\textsc{#1}}}
\let\Table\table
\renewcommand{\table}[1][1]{\Table[#1]%
  \renewcommand\thefootnote{\fnsymbol{footnote}}}
\RequirePackage{tabularx}
\newenvironment{fulltabular}[1]{%
  \tabularx{\textwidth}{#1}}{%
  \endtabularx}
\RequirePackage{listings}
\lstset{basicstyle=\bfseries\ttfamily\small}
\renewcommand{\footnote}{\ClassError{6033dp1}%
  {Footnotes are not permitted}{}}
\ifdp@strict
  \RequirePackage{txfonts}
  \RequirePackage[scaled]{helvet}
  \RequirePackage{courier}
  \setcounter{secnumdepth}{0}
  \let\Itemize\itemize
  \renewcommand{\itemize}{\Itemize\setlength{\itemsep}{-0.67em}}
  \RequirePackage[normalem]{ulem}
  \RequirePackage[dvipdfm]{hyperref}
  \hypersetup{colorlinks,linkcolor=black,urlcolor=blue}
  \def\UrlFont{\rmfamily}
  \def\UrlLeft{\uline\bgroup}
  \def\UrlRight{\egroup}
\fi
\endinput
%%
%% End of file `6033dp1.cls'.