summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/stellenbosch/tex/ussummary.sty
blob: 3cdc916530327ca898cb1946c24c81932d154629 (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
%%
%% This is file `ussummary.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% ussummary.dtx  (with options: `pkg')
%% 
%% -------------------------------------------------------------------
%%         University of Stellenbosch Thesis Extras Packages
%%                Summary Page for Mech Eng Reports
%% -------------------------------------------------------------------
%% 
%% Author: Danie Els
%% 
%%         Copyright (C) 2005-2006 Danie Els
%%         All rights reserved.
%% 
%% 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
%% 2003/12/01 or later.
%% 
%% This work has the LPPL maintenance status "maintained".
%% This Current Maintainer of this work is Danie Els (dnjels@sun.ac.za)
%% -------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{ussummary}[2006/03/08
                            v1.0a
                            Stellenbosh Mech Eng Summary page (DNJ ELS)]
\RequirePackage{calc}
\RequirePackage{array}
\RequirePackage{longtable}
\RequirePackage{colortbl}
 %\AtBeginDocument{%
 %   \providecommand*{\CT@cell@color}{\relax}}
\providecommand*{\phantomsection}{}
\@ifundefined{US@AFRstr}%
   {\edef\US@AFRstr{\string afrikaans}}%
   {}
\providecommand{\AorE}[2]{%
   \ifx\US@AFRstr\languagename #1\else #2\fi}
\newcommand*{\USS@HeadFnt}{\sffamily\bfseries}
\newcommand*{\SumHeadFnt}[1]{\def\USS@HeadFnt{#1}}
\newlength{\USS@tdima}
\newlength{\USS@tdimb}
\newenvironment{USS@AdjustWidth}[2]{%
   \begin{list}{}{%
      \setlength{\topsep}{0pt}%
      \setlength{\partopsep}{0pt}%
      \setlength{\leftmargin}{#1}%
      \setlength{\rightmargin}{#2}%
      \setlength{\listparindent}{\parindent}%
      \setlength{\itemindent}{\parindent}%
      \setlength{\parsep}{\parskip}%
      }%
   \item[]}{\end{list}}
\newenvironment{USS@SetMargins}[2]%
  {\setlength{\USS@tdima}{-1in-\hoffset-\oddsidemargin}%
   \setlength{\USS@tdimb}{-\USS@tdima}%
   \addtolength{\USS@tdima}{#1}%
   \addtolength{\USS@tdimb}{-\paperwidth+\textwidth+#2}%
   \begin{USS@AdjustWidth}{\USS@tdima}{\USS@tdimb}}%
  {\end{USS@AdjustWidth}}
\newenvironment{Summary}[2][\USS@default]
   {\def\USS@default{#2}%
    \clearpage
    \setlength{\USS@tdima}{15mm - 1in-\voffset-\topmargin-\headheight-\headsep-\topskip}%
    \vspace*{\USS@tdima}%
    \thispagestyle{plain}%
    \phantomsection
    \@ifundefined{chapter}
       {\addcontentsline{toc}{section}{#1}}%
       {\addcontentsline{toc}{chapter}{#1}}%
    \markboth{#2}{#2}%
    \begin{USS@SetMargins}{25mm}{25mm}
       {\centering\large\USS@HeadFnt\MakeUppercase{#2}\par}
       \bigskip}
   {\end{USS@SetMargins}}
\newenvironment{SumTable}
   {\setlength\LTleft{\leftmargin}%
    \setlength\LTright{\fill}%
    \renewcommand{\arraystretch}{1.25}%
    \small
    \begin{longtable}{|p{\linewidth-2\tabcolsep-.8pt}|}}%
   {\end{longtable}}
\newcommand{\SumHead}[1]{%<-- Heading for summary
    \multicolumn{1}
       {|>{\USS@HeadFnt\columncolor[gray]{.8}}c|}%
       {#1}}
\newcommand\SumSignatures{%
    \noindent
    \begin{minipage}[t]{3cm}
        \hrulefill\\
        \centering\AorE{Student}{Student}
    \end{minipage}
    \hfill
    \begin{minipage}[t]{3cm}
        \hrulefill\\
        \centering\AorE{Datum}{Date}
    \end{minipage}
    \hfill
    \begin{minipage}[t]{3cm}
        \hrulefill\\
        \centering\AorE{Dosent}{Lecturer}
    \end{minipage}
    \par}
\endinput
%%
%% End of file `ussummary.sty'.