summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/onrannual
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-02-15 00:58:10 +0000
committerKarl Berry <karl@freefriends.org>2010-02-15 00:58:10 +0000
commit02fa553f15b66b9455047c1fa31e71e174e66077 (patch)
treefd2069d4805b50d408b9d7b5d669a7c61bcba921 /Master/texmf-dist/tex/latex/onrannual
parentadf08a68b3e6d7d88c1953a1f5cb99a80b32b08c (diff)
new latex package onrannual 1.0 (13feb10)
git-svn-id: svn://tug.org/texlive/trunk@17016 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/onrannual')
-rw-r--r--Master/texmf-dist/tex/latex/onrannual/onrannual.cls135
1 files changed, 135 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/onrannual/onrannual.cls b/Master/texmf-dist/tex/latex/onrannual/onrannual.cls
new file mode 100644
index 00000000000..a2879f2ca7f
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/onrannual/onrannual.cls
@@ -0,0 +1,135 @@
+%% onrannual.cls
+%% Copyright 2009 Adam R. Maxwell
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is A. R. Maxwell.
+%
+% This work consists of the file onrannual.cls.
+
+%
+% Document class for ONR Ocean Battlespace Sensing annual reports, following format
+% from http://www.onr.navy.mil/sci_tech/32/reports/annual/ as of Sept 2009.
+% Developed and maintained by Adam R. Maxwell, adam.maxwell@pnl.gov
+%
+
+\ProvidesClass{onrannual}[2009/11/17 v1.0 ONR annual report document class]
+\NeedsTeXFormat{LaTeX2e}
+
+%% This technique was copied from latex.ltx, since I couldn't find any documented
+%% way to use commands in the preamble.
+\let\@awardnumber\@empty
+\def\awardnumber#1{\def\@awardnumber{#1}}
+
+\let\@projecturl\@empty
+\def\projecturl#1{\def\@projecturl{#1}}
+
+\let\@distribution\@empty
+\def\distribution#1{\def\@distribution{#1}}
+
+% Times and Helvetica
+\RequirePackage{mathptmx}
+
+% Remaining packages require article to be loaded
+\LoadClass[12pt]{article}
+
+% margins given in style guide; different from Word template...
+\RequirePackage[margin=0.8in, bottom=1.0in]{geometry}
+
+% block format for author/address
+\RequirePackage[blocks]{authblk}
+
+% get rid of section numbers
+\setcounter{secnumdepth}{-2}
+
+% no paragraph indentation; everything has to be flushleft
+\setlength{\parindent}{\z@}
+
+% use a single line to separate paragraphs
+\setlength{\parskip}{\baselineskip}
+\RequirePackage{parskip}
+
+% change font and justification for captions
+\RequirePackage{caption}
+\captionsetup{font={bf,it}, justification=centering}
+
+% reference list name for bibliography command
+\renewcommand{\refname}{REFERENCES}
+
+% This is sort of nasty; we have to adjust skip around the headings, as well
+% as the font size, since the parskip package won't fix them.
+\renewcommand\section{\@startsection {section}{1}{\z@}%
+ {-1pt}% no skip above the heading
+ {0.01\baselineskip}% if positive, is the skip below; else is the skip to right of run-in
+ {\normalfont\bfseries\MakeUppercase}} % bold, normal size, uppercase
+
+%% ONR reports don't allow for a subsection or subsubsection, conceptually, so redefine
+%% to print an error message instead of allowing headings that look stupid.
+\renewcommand\subsection{\PackageError{onrannual}{Subsections not available for ONR reports}{ONR reports do not include sub or lower sectioning.}}
+\renewcommand\subsubsection{\subsection}
+
+%% Copied \maketitle definition from article.cls. Most adjustments here are for spacing, but
+%% also to avoid printing the date.
+\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.
+ \@maketitle
+ \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
+}
+\def\@maketitle{%
+ \setlength\parskip{\z@}%
+ \newpage
+ \begin{center}%
+ {\footnotesize\textit{\@distribution}}
+ \vskip 2\baselineskip
+ \let \footnote \thanks
+ % title font is 14 pt bold
+ {\Large\bfseries \@title}%
+ \vskip \baselineskip
+ \setlength{\affilsep}{\z@}%
+ {\begin{tabular}[t]{c}%
+ \@author
+ \end{tabular}\par}%
+ \vskip \baselineskip
+ Award Number: \@awardnumber \par
+ \@projecturl
+ \end{center}%
+ \par
+ \vskip 1.5em}
+
+%% now for anything that has to be set as late as possible
+\AtBeginDocument{%
+
+ % for some reason, they want it to look as if a typewriter was used...
+ \raggedright%
+
+ % don't use Courier for URLs; this works for hyperref also
+ \@ifpackageloaded{url}{\urlstyle{rm}}{}%
+}