summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/archaeologie/archaeologie.bbx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/archaeologie/archaeologie.bbx')
-rw-r--r--Master/texmf-dist/tex/latex/archaeologie/archaeologie.bbx70
1 files changed, 53 insertions, 17 deletions
diff --git a/Master/texmf-dist/tex/latex/archaeologie/archaeologie.bbx b/Master/texmf-dist/tex/latex/archaeologie/archaeologie.bbx
index 424b15c0604..9c92f144cb4 100644
--- a/Master/texmf-dist/tex/latex/archaeologie/archaeologie.bbx
+++ b/Master/texmf-dist/tex/latex/archaeologie/archaeologie.bbx
@@ -11,7 +11,7 @@
% version 2005/12/01 or later.
\ProvidesFile{archaeologie.bbx}%
- [2016/03/12 v1.41 archaeologie --%
+ [2016/03/17 v1.42 archaeologie --%
biblatex fuer Archaeologen, Historiker und Philologen, bbx-Datei]
\RequireBibliographyStyle{standard}
\AtBeginDocument{%
@@ -44,26 +44,35 @@ maxbibnames=999,%
\newbool{bbx:noabbrevs}% keineabkuerzung
\newbool{bbx:translation}% uebersetzung
\newbool{bbx:publisher}% verlag
+\newbool{bbx:initials}%
\newbool{bbx:counter}%
+
\newbool{cbx:antik}%
\newbool{cbx:frgantik}%
\newbool{cbx:corpus}%
\newbool{cbx:lastnames}% nurnachname
-\newbool{cbx:fullnames}% vollername
+\newbool{cbx:fullnames}% vollername
-\DeclareBibliographyOption{strings}[true]{%
-\IfFileExists{dai-abkuerzungen.bib}{\addbibresource{dai-abkuerzungen.bib}}{\addbibresource[location=remote]{https://www.ctan.org/tex-archive/macros/latex/contrib/biblatex-contrib/archaeologie/dai-abkuerzungen.bib}}}
-%\addbibresource{antike-corpora.bib} % Version 2.0
+
+\newlength{\labwidthsameline}
+\setlength{\labwidthsameline}{4em}
+\DeclareBibliographyOption{strings}[true]{%
+\addbibresource{archaeologie-abbrv.bib}
+%\addbibresource{archaeologie-corpora.bib}
+}
+
%% \DeclareBibliographyOption %%
\DeclareBibliographyOption{edby}[true]{\csuse{bool#1}{bbx:edby}}
+\DeclareBibliographyOption{initials}[true]{\csuse{bool#1}{bbx:initials}}
+
\DeclareBibliographyOption{width}[]{%
\csuse{booltrue}{bbx:width}
- \newcommand{\width}{#1}}
+ \setlength{\labwidthsameline}{#1}}
\DeclareBibliographyOption{yearseries}[true]{\csuse{bool#1}{bbx:yearseries}}
\DeclareBibliographyOption{counter}[true]{\csuse{bool#1}{bbx:counter}}
-\DeclareBibliographyOption{bibfullname}[true]{\ExecuteBibliographyOptions{firstinits=false}}
+\DeclareBibliographyOption{bibfullname}[true]{\ExecuteBibliographyOptions{giveninits=false}}
\DeclareBibliographyOption{inreferences}[true]{\csuse{bool#1}{bbx:inreferences}
\ExecuteBibliographyOptions[inreference]{skipbib=true}}
\DeclareBibliographyOption{noabbrevs}[true]{\csuse{bool#1}{bbx:noabbrevs}}
@@ -83,7 +92,7 @@ maxbibnames=999,%
}
\DeclareBibliographyOption{scshape}[true]{%
\ifstrequal{#1}{true}%
- {\AtEveryCite{\renewcommand*{\mkbibnamelast}[1]{\textsc{##1}}}}%
+ {\AtEveryCite{\renewcommand*{\mkbibnamefamily}[1]{\textsc{##1}}}}%
{}}
%% \DeclareEntryOption %%
@@ -152,7 +161,6 @@ maxbibnames=999,%
\newcommand*{\jourvoldelim}{\addnbspace}
-
\DeclareBibliographyAlias{collection}{book}
\DeclareBibliographyAlias{reference}{book}
\DeclareBibliographyAlias{institution}{school}
@@ -213,7 +221,36 @@ maxbibnames=999,%
\clearfield{origtitle}
}%
}
-
+
+
+\AtBeginDocument{%
+\ifbool{bbx:initials}{%
+\DeclareStyleSourcemap{%% %http://tex.stackexchange.com/a/295486/98739
+ \maps[datatype=bibtex]{%
+ \map{%
+ % Author field
+ \step[fieldsource=author,%
+ match={\regexp{\b(Chr|Ch|Th|Ph|[B-DF-HJ-NP-TV-XZ](l|r))(\S*,)}},%
+ replace={\regexp{\{$1\}$3}}]% Protect last names (first last)
+ \step[fieldsource=author,%
+ match={\regexp{([^,]\s)\b(Chr|Ch|Th|Ph|[B-DF-HJ-NP-TV-XZ](l|r))}},%
+ replace={\regexp{$1\{$2\}}}]% Protect last names (last, first)
+ \step[fieldsource=author,%
+ match={\regexp{\b(Chr|Ch|Th|Ph|[B-DF-HJ-NP-TV-XZ](l|r))([^\}])}},%
+ replace={\regexp{\{\\relax\{\}$1\}$3}}]% Insert \relax after abbreviating
+ % Editor field
+ \step[fieldsource=editor,%
+ match={\regexp{\b(Chr|Ch|Th|Ph|[B-DF-HJ-NP-TV-XZ](l|r))(\S*,)}},%
+ replace={\regexp{\{$1\}$3}}]% Protect last names (first last)
+ \step[fieldsource=editor,%
+ match={\regexp{([^,]\s)\b(Chr|Ch|Th|Ph|[B-DF-HJ-NP-TV-XZ](l|r))}},%
+ replace={\regexp{$1\{$2\}}}]% Protect last names (last, first)
+ \step[fieldsource=editor,%
+ match={\regexp{\b(Chr|Ch|Th|Ph|[B-DF-HJ-NP-TV-XZ](l|r))([^\}])}},%
+ replace={\regexp{\{\\relax\{\}$1\}$3}}]% Insert \relax after abbreviating
+}}}
+}{}
+}
%%%%%%%%%%%%%bibmacro%%%%%%%%%%%
@@ -912,26 +949,25 @@ maxbibnames=999,%
\newbibmacro{labelwidthbib}{%
\begingroup%
\DeclareFieldFormat{bibhyperref}{##1}%
- \csuse{blx@hook@cite}%
+ \csuse{blx@hook@cite}%
\csuse{blx@hook@citekey}%
\defcounter{maxnames}{\blx@maxcitenames}%
\usebibmacro{cite}%
\endgroup%
}
-
\newbibmacro{kicklabel}{%
\sbox\arch@labelbox{\usebibmacro{labelwidthbib}}%
\global\togglefalse{blx@insert}%
- \ifdim\shorthandwidth<.9\wd\arch@labelbox\leavevmode\newline\fi%
- }
+ \ifdim.9\wd\arch@labelbox>\labwidthsameline\leavevmode\newline\fi%
+}
+
\defbibenvironment{bibliography}%
{\list%
{\usebibmacro{labelwidthbib}}%
- {\setlength{\labelwidth}{%
- \ifbool{bbx:width}{\width}{\shorthandwidth}}%
- \setlength{\leftmargin}{\labelwidth}%
+ {\setlength{\labelwidth}{\labwidthsameline}
+ \setlength{\leftmargin}{\labelwidth}%
\setlength{\labelsep}{\biblabelsep}%
\addtolength{\leftmargin}{\labelsep}%
\setlength{\itemsep}{\bibitemsep}%