summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/hagenberg-thesis/latex/hgbbib.sty
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/hagenberg-thesis/latex/hgbbib.sty')
-rw-r--r--macros/latex/contrib/hagenberg-thesis/latex/hgbbib.sty53
1 files changed, 45 insertions, 8 deletions
diff --git a/macros/latex/contrib/hagenberg-thesis/latex/hgbbib.sty b/macros/latex/contrib/hagenberg-thesis/latex/hgbbib.sty
index 2cb82d3961..6ba24fc09d 100644
--- a/macros/latex/contrib/hagenberg-thesis/latex/hgbbib.sty
+++ b/macros/latex/contrib/hagenberg-thesis/latex/hgbbib.sty
@@ -5,7 +5,7 @@
%% GitHub: https://github.com/Digital-Media/HagenbergThesis
%% File encoding: ASCII
-\ProvidesPackage{hgbbib}[2019/05/11]
+\ProvidesPackage{hgbbib}[2020/10/29]%%AUTO
\usepackage{csquotes} % recommended for biblatex
@@ -23,21 +23,21 @@
%% titles of reference section + 3 categories of references:
\newcommand{\@bibtitle}{Quellenverzeichnis}
\newcommand{\@bibtitleLiteratur}{Literatur}
-\newcommand{\@bibtitleAvmedia}{Audiovisuelle Medien}
+\newcommand{\@bibtitleMedia}{Medien}
\newcommand{\@bibtitleOnline}{Online-Quellen}
\newcommand{\@bibtitleSoftware}{Software}
\ifthenelse{\equal{\hgb@MainLanguage}{english}}{%
\renewcommand{\@bibtitle}{References}
\renewcommand{\@bibtitleLiteratur}{Literature}
- \renewcommand{\@bibtitleAvmedia}{Audio-visual media}
+ \renewcommand{\@bibtitleMedia}{Media}
\renewcommand{\@bibtitleOnline}{Online sources}
\renewcommand{\@bibtitleSoftware}{Software}
}{}
%% categories for a split bibliography (order of declaration is important!)
\DeclareBibliographyCategory{literature}
-\DeclareBibliographyCategory{avmedia}
+\DeclareBibliographyCategory{media}
\DeclareBibliographyCategory{software}
\DeclareBibliographyCategory{online}
@@ -48,11 +48,11 @@
\addcontentsline{toc}{section}{\@bibtitleLiteratur}%
}
-\defbibheading{avmedia}{%
+\defbibheading{media}{%
\pagebreak[3]%
\phantomsection%
- \section*{\@bibtitleAvmedia}%
- \addcontentsline{toc}{section}{\@bibtitleAvmedia}%
+ \section*{\@bibtitleMedia}%
+ \addcontentsline{toc}{section}{\@bibtitleMedia}%
}
\defbibheading{online}{%
@@ -83,7 +83,7 @@
\ifentrytype{music}\OR
\ifentrytype{audio}\OR
\ifentrytype{image}}
- {\addtocategory{avmedia}{#1}}%
+ {\addtocategory{media}{#1}}%
{\ifthenelse{%
\ifentrytype{software}\OR
\ifentrytype{electronic}}
@@ -100,6 +100,43 @@
\addbibresource{#1}%
}
+% Declare a source map so the sorting in \cite commands works across the bib categories
+% The maps need to correspond to the entry types in the bib categories (which can't unfortunately used)
+\DeclareSourcemap{
+ \maps[datatype=bibtex]{
+ \map{ % All entry types except for media, software and online
+ \pernottype{movie}
+ \pernottype{video}
+ \pernottype{music}
+ \pernottype{audio}
+ \pernottype{image}
+ \pernottype{software}
+ \pernottype{electronic}
+ \pernottype{online}
+ \pernottype{www}
+ \step[fieldset=presort, fieldvalue = {A}]
+ }
+ \map{ % media entry types
+ \pertype{movie}
+ \pertype{video}
+ \pertype{music}
+ \pertype{audio}
+ \pertype{image}
+ \step[fieldset=presort, fieldvalue = {B}]
+ }
+ \map{ % software entry types
+ \pertype{software}
+ \pertype{electronic}
+ \step[fieldset=presort, fieldvalue = {C}]
+ }
+ \map{ % online entry types
+ \pertype{online}
+ \pertype{www}
+ \step[fieldset=presort, fieldvalue = {D}]
+ }
+ }
+}
+
%See http://www.jr-x.de/publikationen/latex/tipps/zeilenumbruch.html
\newenvironment{bibhyphenation}%
{\hyphenpenalty=2% (default 50)