summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/onrannual/onrannual.cls
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-03-17 18:41:31 +0000
committerKarl Berry <karl@freefriends.org>2010-03-17 18:41:31 +0000
commitc992955505f162050ccff0e5771810e2de61b458 (patch)
tree248fe81b1b6f335ba1408482716a66f9c0c45b23 /Master/texmf-dist/tex/latex/onrannual/onrannual.cls
parent20454e765624879bfe04a7d3fefc36809e170e82 (diff)
onrannual 1.1 (13mar10)
git-svn-id: svn://tug.org/texlive/trunk@17474 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/onrannual/onrannual.cls')
-rw-r--r--Master/texmf-dist/tex/latex/onrannual/onrannual.cls43
1 files changed, 36 insertions, 7 deletions
diff --git a/Master/texmf-dist/tex/latex/onrannual/onrannual.cls b/Master/texmf-dist/tex/latex/onrannual/onrannual.cls
index a2879f2ca7f..df4f27c4bf0 100644
--- a/Master/texmf-dist/tex/latex/onrannual/onrannual.cls
+++ b/Master/texmf-dist/tex/latex/onrannual/onrannual.cls
@@ -1,5 +1,5 @@
%% onrannual.cls
-%% Copyright 2009 Adam R. Maxwell
+%% Copyright 2009-2010 Adam R. Maxwell
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
@@ -21,9 +21,22 @@
% Developed and maintained by Adam R. Maxwell, adam.maxwell@pnl.gov
%
-\ProvidesClass{onrannual}[2009/11/17 v1.0 ONR annual report document class]
+\ProvidesClass{onrannual}[2010/03/13 v1.1 ONR annual report document class]
\NeedsTeXFormat{LaTeX2e}
+%
+% This class is a modification of the standard article class. The primary
+% documentation is the skeleton.tex file available at CTAN:
+%
+% http://mirror.ctan.org/macros/latex/contrib/onrannual/skeleton.tex
+%
+% Lacking that, note that the following three new commands are provided:
+%
+% \distribution{xxx} where xxx is the appropriate distribution statement A or B
+% \awardnumber{N00014-xxx} where the argument is your award number
+% \projecturl{\url{http:foo}} which is an optional project URL
+%
+
%% This technique was copied from latex.ltx, since I couldn't find any documented
%% way to use commands in the preamble.
\let\@awardnumber\@empty
@@ -36,6 +49,8 @@
\def\distribution#1{\def\@distribution{#1}}
% Times and Helvetica
+% XeTeX should be an alternative here, but it wasn't producing a bold title,
+% and I didn't want to spend time figuring out why.
\RequirePackage{mathptmx}
% Remaining packages require article to be loaded
@@ -53,6 +68,9 @@
% no paragraph indentation; everything has to be flushleft
\setlength{\parindent}{\z@}
+\fontsize{12}{14}
+\selectfont
+
% use a single line to separate paragraphs
\setlength{\parskip}{\baselineskip}
\RequirePackage{parskip}
@@ -67,14 +85,14 @@
% 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
+ {-10pt}% no skip above the heading
+ {7pt}% 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}
+\renewcommand\subsubsection{\subsection}
%% Copied \maketitle definition from article.cls. Most adjustments here are for spacing, but
%% also to avoid printing the date.
@@ -111,7 +129,7 @@
\vskip 2\baselineskip
\let \footnote \thanks
% title font is 14 pt bold
- {\Large\bfseries \@title}%
+ {\fontsize{14}{\f@baselineskip}\fontseries{b}\selectfont \@title}%
\vskip \baselineskip
\setlength{\affilsep}{\z@}%
{\begin{tabular}[t]{c}%
@@ -124,9 +142,20 @@
\par
\vskip 1.5em}
+% ONR wants active hyperlinks colored blue, based on email correspondence, so we'll load it last
+% after mucking about with sectioning
+\RequirePackage[colorlinks=true, pdfborder={0 0 0}, linkcolor=black, citecolor=black, urlcolor=blue, bookmarks=false]{hyperref}
+
%% now for anything that has to be set as late as possible
\AtBeginDocument{%
+ % this is really gruesome, since I don't understand how natbib changes the heading
+ \@ifpackageloaded{natbib}{%
+ \renewcommand\bibsection{%
+ \section{\refname\@mkboth{\MakeUppercase{\refname}}{\MakeUppercase{\refname}}\vspace{7pt}}%
+ }%
+ }{}%
+
% for some reason, they want it to look as if a typewriter was used...
\raggedright%