summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/stellenbosch-2/tex/stb-bib.sty
blob: bd6ae959a8523ee3e360993d17712a340c2178e1 (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
%% This is file `stb-bib.sty',
%%
%% Copyright (C) 2023 Stellenbosch University
%% All rights reserved.
%%
%% -------------------------------------------------------------------
%% Stellenbosch University BibTeX style file
%% -------------------------------------------------------------------
%% 
%% Author:     Danie Els
%% Maintained: Danie Els (dnjels@sun.ac.za)
%% 
%% This work may be distributed and modified, and must be credited
%% under the conditions of the latest version of the Creative Commons
%% License (CC BY 4.0). The latest version of this license is in:
%% 
%%    https://creativecommons.org/licenses/by/4.0/
%% 
%% -------------------------------------------------------------------

\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{stb-bib}[2023/01/16 1.0 (DNJ Els)]
\RequirePackageWithOptions{natbib}

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

\newcommand*\InBibliographyTemp{thebibliography}%
\newcommand*\InBibliography{%
    \ifx\InBibliographyTemp\@currenvir\relax
        \expandafter\@firstoftwo
    \else
        \expandafter\@secondoftwo
    \fi}

\newcommand\BIBand{\AorE{en}{and}}

\@namedef{bibstyle@stb-bib-eng-a}{%
    \bibpunct{(}{)}{;}{a}{,}{,}%
    \gdef\BIBand{\InBibliography%
        {\AorE{en}{and}}%
        {\AorE{en}{and}}}}

\@namedef{bibstyle@stb-bib-eng-n}{%
    \bibpunct{[}{]}{;}{n}{,}{,}%
    \gdef\BIBand{\InBibliography%
        {\AorE{en}{and}}%
        {\AorE{en}{and}}}}

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

\endinput