summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/stellenbosch/usbib.sty
blob: 994875881adf6c7c1ccc1dbff4c153860294a763 (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
\NeedsTeXFormat{LaTeX2e}[1995/06/01]
\ProvidesPackage{usbib}[2003/02/29 0.1 (DNJ Els)]
\RequirePackageWithOptions{natbib}

\@ifundefined{AorE}{
   \edef\AFRstr{\string afrikaans}
   \DeclareRobustCommand{\AorE}[2]{%
      \ifx\AFRstr\languagename #1\else #2\fi}
  }{}


\newcommand\BIBand{\textit{\&}}

\@namedef{bibstyle@usmeg-a}{%
   \bibpunct{(}{)}{;}{a}{,}{,}%
   \gdef\BIBand{%
      \ifinbibliography
         \AorE{en}{and}%
      \else
         \ifNAT@swa
           \AorE{en}{and}%
         \else
           \textit{\&}%
         \fi
      \fi}}
      
\@namedef{bibstyle@usmeg-n}{%
   \bibpunct{[}{]}{;}{n}{,}{,}%
   \gdef\BIBand{%
      \ifinbibliography
         \AorE{en}{and}%
      \else
         \textit{\&}%
      \fi}}

\newcommand\bibstyle@ussagus{%
   \bibpunct[:]{(}{)}{;}{a}{,}{,}%
   \gdef\BIBand{\textit{\&}}}


\setlength{\bibhang}{1em}

{\@listi 
 \global\bibsep\itemsep 
 \global\advance\bibsep by\parsep}

\newcommand{\citenamefont}[1]{#1}
\newcommand{\bibnamefont}[1]{#1}
\newcommand{\bibfnamefont}[1]{#1}


\renewcommand\bibstyle[1]{%
   \lowercase{\edef\tempa{#1}}% 
   \@ifundefined{bibstyle@\tempa}{\relax}
   {\csname bibstyle@\tempa\endcsname}}
\AtBeginDocument{\global\let\bibstyle=\@gobble}



\newif\ifinbibliography
\inbibliographyfalse

\renewenvironment{thebibliography}[1]{%
   \inbibliographytrue%
   \bibsection%
   \parindent\z@%
   \bibpreamble\bibfont%
   \list{\@biblabel{\arabic{NAT@ctr}}}{%
      \@bibsetup{#1}%
      \setcounter{NAT@ctr}{0}}%
   \ifNAT@openbib
      \renewcommand\newblock{\par}
   \else
      \renewcommand\newblock{\hskip .11em \@plus.33em \@minus.07em}%
   \fi
   \sloppy\clubpenalty4000\widowpenalty4000
   \sfcode`\.=1000\relax
   \let\citeN\cite \let\shortcite\cite
   \let\citeasnoun\cite
   }{%
   \def\@noitemerr{%
      \PackageWarning{natbib}
                     {Empty `thebibliography' environment}}%
   \endlist\vskip-\lastskip}

\endinput