summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/udesoftec/udesoftec-biblatex.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/udesoftec/udesoftec-biblatex.sty')
-rw-r--r--Master/texmf-dist/tex/latex/udesoftec/udesoftec-biblatex.sty576
1 files changed, 576 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/udesoftec/udesoftec-biblatex.sty b/Master/texmf-dist/tex/latex/udesoftec/udesoftec-biblatex.sty
new file mode 100644
index 00000000000..27301a49ce9
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/udesoftec/udesoftec-biblatex.sty
@@ -0,0 +1,576 @@
+% !Mode:: "TeX:UTF-8"
+%% udesoftec-biblatex.sty
+%% Copyright 2015 J. Peter M. Schuler
+%% 2015/08/27 v1.5.1 udesoftec
+%
+% 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 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status `author-maintained'.
+%
+% The current maintainer of this work is J. Peter M. Schuler
+% j.peter.m.schuler@uni-due.de
+%
+% This work consists of the files
+% * udesoftec.cls
+% * udesoftec.bst
+% * udesoftec-bibcommon.sty
+% * udesoftec-biblatex.sty
+% * udesoftec-bst.sty
+% * udesoftec-extra.sty
+%
+% As this work is based on years of mostly undocumented improvement,
+% it includes parts, for which sources can't be identified anymore. Public postings
+% in the LaTeX community were used as an input and if source is known, it is
+% mentioned below. If anybody identifies parts of his/her own code,
+% feel free to contact the maintainer in order to get listed.
+%
+% Special thanks to all contributors and for the help of the tex-live team,
+% e.g. Axel K.; Norbert P.; Petra R.; Rainer S.; Reinhard K.; Robin F.
+%
+% For further information refer to:
+% http://mirrors.ctan.org/macros/latex/contrib/udesoftec/README
+% and
+% http://mirrors.ctan.org/macros/latex/contrib/udesoftec/udesoftec-doc.pdf
+
+\NeedsTeXFormat{LaTeX2e}%
+\ProvidesPackage{udesoftec-biblatex}[2015/08/27 v1.5.1 udesoftec-biblatex.sty udesoftec bibstyle configuration for biblatex]%
+
+%
+% \newif\ifprimaryDocumentLanguageGerman
+% \DeclareOption{de} {\primaryDocumentLanguageGermantrue}
+% \DeclareOption{en} {\primaryDocumentLanguageGermanfalse}
+
+\newif\ifdocumentIsFinal
+\documentIsFinalfalse
+\DeclareOption{final} {\documentIsFinaltrue}
+
+\DeclareOption*{\PackageWarning{udesoftec-biblatex}{Unknown option \CurrentOption}}
+
+\ProcessOptions\relax
+%%%%%%%%%%%%%%%%%%%%%%%%
+
+\RequirePackage{udesoftec-bibcommon}
+\RequirePackage{csquotes}
+\RequirePackage{regexpatch}
+
+\usepackage[
+ backend=biber,
+ style=authoryear,
+ natbib=true, %full cite command fallback
+ dashed=false,
+ %sortcites=true,
+ sorting=nyt,
+ maxcitenames=2,
+ maxalphanames=2,
+ firstinits=true,
+ terseinits=true,
+ uniquename=init,
+ uniquelist=false,
+ urldate=long,
+ maxbibnames=99]{biblatex}
+\ExecuteBibliographyOptions{labeldate,sorting=nyt,pagetracker}
+
+\setlength{\bibhang} {2em} %hanging indentation for list of references
+\setlength{\bibitemsep} {.25em}
+\setlength{\bibnamesep} {.25em}
+\setlength{\bibinitsep} {.25em}
+% Change order to last name then first name abbreviate without a full stop at the end. This should be at the end!
+
+
+%@Jörg You could use the starred version \DeclareFieldFormat* to clear
+% type-specific formats. But IMO it's more consistent to format @incollection titles like @article titles. I've edited my example accordingly.
+%
+\DeclareFieldFormat*{title}{\bblFontTitle{#1}}
+\renewcommand*{\mkbibacro}[1]{#1}
+\DeclareFieldFormat{isbn}{\mkbibacro{ISBN}\addcolon{}#1}
+\DeclareFieldFormat{isrn}{\mkbibacro{ISRN}\addcolon{}#1}
+\DeclareFieldFormat{issn}{\mkbibacro{ISSN}\addcolon{}#1}
+\DeclareFieldFormat{doi}{\bbldoi{#1}}
+
+
+\renewcommand*{\mkbibnameprefix}[1]{\bblFontAuthorInText{#1}}
+\renewcommand*{\mkbibnamelast}[1]{\bblFontAuthorInText{#1}}
+
+\renewcommand*{\labelnamepunct}{\bblAuthorTitleSep}
+\renewcommand*{\revsdnamedelim}{\bblAuthorsSep}
+\renewcommand*{\multinamedelim}{\bblAuthorsSep}
+\renewcommand*{\finalnamedelim}{ \bblFontAuthorInText{\bblAuthorsSepInText}}
+
+\renewcommand*{\multilistdelim}{\bblAuthorsSep}
+\renewcommand*{\finallistdelim}{\bblAuthorsSep}
+
+\renewcommand*{\andothersdelim}{\space}
+\renewcommand*{\nameyeardelim}{\space}
+
+
+\renewcommand*{\finentrypunct}{}
+
+
+\DeclareFieldFormat{booktitle}{\bblFontInBookTitle{#1}\isdot}
+\DeclareFieldFormat{journaltitle}{\bblFontJournalTitle{#1}\isdot}
+\DeclareFieldFormat{issuetitle}{\bblFontInBookTitle{#1}\isdot}
+\DeclareFieldFormat{maintitle}{\bblFontInBookTitle{#1}\isdot}
+
+\AtBeginBibliography{%
+% \renewcommand*{\revsdnamedelim}{CCCCCCCCCCCC}
+ \renewcommand*{\finalnamedelim}{\bblAuthorsSep}
+ \renewcommand*{\mkbibnameprefix}[1]{#1}
+ \renewcommand*{\mkbibnamefirst}[1]{#1}
+ \renewcommand*{\mkbibnamelast}[1]{#1}
+ \renewcommand*{\mkbibnameaffix}[1]{#1}
+ \renewcommand*{\multinamedelim}{\bblAuthorsSep}
+ \renewcommand*{\finalnamedelim}{\bblAuthorsSep}%
+}
+
+
+\renewbibmacro*{name:last-first}[5]{%
+ \usebibmacro{name:delim}{#1}%
+ \ifblank{#3}{}{\bibnamedelimd\mkbibnameprefix{#3}\isdot}%
+ \mkbibnamelast{#1}\isdot%
+ \ifblank{#4}{}{\bibnamedelimd\mkbibnameaffix{#4}\isdot}%
+ \ifblank{#2}{}{\bibnamedelimd\mkbibnamefirst{#2}}%
+}
+\DeclareNameFormat{last-first}{%
+ \usebibmacro{name:last-first}{#1}{#4}{#5}{#7}%
+}
+
+\DeclareNameFormat{default}{%
+ \usebibmacro{name:last-first}{#1}{#4}{#5}{#7}%
+}
+
+\DeclareNameAlias{sortname}{last-first} %alle Autoren in der Biblografie gleich
+
+
+\DefineBibliographyStrings{ngerman}{%
+ andothers = {\bblFontAuthorInText{\bbletal}}, % we don't use et al in bbl
+ editor = {\bbled},%
+ editors = {\bbleds},%
+ urlseen = {\bbllastaccesswas}%
+}
+
+\DefineBibliographyStrings{english}{%
+ andothers = {\bblFontAuthorInText{\bbletal}}, % we don't use et al in bbl
+ editor = {\bbled},%
+ editors = {\bbleds},%
+ urlseen = {\bbllastaccesswas}%
+% page = {{Seite}{S\adddot}},
+% pages = {{Seiten}{S\adddot}},
+}
+
+\DefineBibliographyStrings{british}{%
+ andothers = {\bblFontAuthorInText{\bbletal}}, % we don't use et al in bbl
+ editor = {\bbled},%
+ editors = {\bbleds},%
+ urlseen = {\bbllastaccesswas}%
+% page = {{Seite}{S\adddot}},
+% pages = {{Seiten}{S\adddot}},
+}
+
+
+
+\AtEveryBibitem{\clearlist{language}}
+\AtEveryBibitem{\clearfield{pagetotal}}
+
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+\newbibmacro*{byeditor+suffix}{%
+ \ifnameundef{editor}
+ {}
+ {%\usebibmacro{byeditor+othersstrg}%
+ %\setunit{\addspace}%
+ \printnames[byeditor]{editor}%
+ \clearname{editor}%
+ \usebibmacro{editorstrg}%
+ \newunit}%
+ \usebibmacro{byeditorx}%
+ \usebibmacro{bytranslator+others}%
+ }
+
+% \DeclareSourcemap{
+% \maps[datatype = bibtex]{
+% \map{%% 2. Abbreviate an entry such as Adam J[ohn] Smith to Smith, Adam J.
+% \step[fieldsource = doi,
+% match = \regexp{\[[\_]]+\]},
+% replace = .]
+% }
+% }
+% }
+%
+
+ % suppress URL and ISBN if doi present
+\settoggle{bbx:isbn}{false} %deactivate normal isbn output
+\renewbibmacro*{doi+eprint+url}{%
+ \iffieldundef{doi}
+ {
+ \printfield{isbn}
+ \printfield{issn}
+ \usebibmacro{url+urldate}
+ }
+ {
+ \printfield{doi}
+ \newunit\newblock
+ \iftoggle{bbx:eprint}
+ {\usebibmacro{eprint}}
+ {}%
+ }
+ }
+
+
+
+
+
+
+
+\providebibmacro*{date+extrayear}{}
+
+\def\bbx@opt@mergedate@true{\bbx@opt@mergedate@compact}
+
+% merge date/issue with date label
+\def\bbx@opt@mergedate@maximum{%
+ \renewbibmacro*{date+extrayear}{%
+ \iffieldundef{\thefield{datelabelsource}year}
+ {}
+ {\printtext[parens]{%
+ \printfield{issue}%
+ \setunit*{\addspace}%
+ \iffieldsequal{year}{\thefield{datelabelsource}year}
+ {\printdateextralabel}%
+ {\printfield{labelyear}%
+ \printfield{extrayear}}}}}%
+ \renewbibmacro*{date}{}%
+ \renewbibmacro*{issue+date}{}}
+
+% merge date with date label
+\def\bbx@opt@mergedate@compact{%
+ \renewbibmacro*{date+extrayear}{%
+ \iffieldundef{\thefield{datelabelsource}year}
+ {}
+ {\printtext[parens]{%
+ \iffieldsequal{year}{\thefield{datelabelsource}year}
+ {\printdateextralabel}%
+ {\printfield{labelyear}%
+ \printfield{extrayear}}}}}%
+ \renewbibmacro*{date}{}%
+ \renewbibmacro*{issue+date}{%
+ \iffieldundef{issue}
+ {}
+ {\printtext[parens]{\printfield{issue}}}%
+ \newunit}}
+
+% merge year-only date with date label
+\def\bbx@opt@mergedate@basic{%
+ \renewbibmacro*{date+extrayear}{%
+ \iffieldundef{\thefield{datelabelsource}year}
+ {}
+ {\printtext[parens]{%
+ \printfield{\thefield{datelabelsource}year}%
+ \printfield{extrayear}}}}%
+ \renewbibmacro*{date}{%
+ \iffieldundef{month}
+ {}
+ {\printdate}}%
+ \renewbibmacro*{issue+date}{%
+ \ifboolexpr{
+ test {\iffieldundef{issue}}
+ and
+ test {\iffieldundef{month}}
+ }
+ {}
+ {\printtext[parens]{%
+ \printfield{issue}%
+ \setunit*{\addspace}%
+ \printdate}}%
+ \newunit}}
+
+% merge year-only date with year-only date label
+\def\bbx@opt@mergedate@minimum{%
+ \renewbibmacro*{date+extrayear}{%
+ \iffieldundef{\thefield{datelabelsource}year}
+ {}
+ {\printtext[parens]{%
+ \printfield{\thefield{datelabelsource}year}%
+ \printfield{extrayear}}}}%
+ \renewbibmacro*{date}{%
+ \ifboolexpr{
+ test {\iffieldundef{month}}
+ and
+ test {\iffieldundef{extrayear}}
+ }
+ {}
+ {\printdate}}%
+ \renewbibmacro*{issue+date}{%
+ \ifboolexpr{
+ test {\iffieldundef{issue}}
+ and
+ test {\iffieldundef{month}}
+ and
+ test {\iffieldundef{extrayear}}
+ }
+ {}
+ {\printtext[parens]{%
+ \printfield{issue}%
+ \setunit*{\addspace}%
+ \printdate}}%
+ \newunit}}
+
+% don't merge date/issue with date label
+\def\bbx@opt@mergedate@false{%
+ \renewbibmacro*{date+extrayear}{%
+ \iffieldundef{\thefield{datelabelsource}year}
+ {}
+ {\printtext[parens]{%
+ \printfield{\thefield{datelabelsource}year}%
+ \printfield{extrayear}}}}%
+ \renewbibmacro*{date}{\printdate}%
+ \renewbibmacro*{issue+date}{%
+ \printtext[parens]{%
+ \printfield{issue}%
+ \setunit*{\addspace}%
+ \printdate}%
+ \newunit}}
+
+% n.b. the default datelabel=year overrides merging of months and days
+\ExecuteBibliographyOptions{labeldate,sorting=nyt,pagetracker}
+\renewbibmacro*{author}{%
+ \ifboolexpr{
+ test \ifuseauthor
+ and
+ not test {\ifnameundef{author}}
+ }
+ {\bblFontAuthorInList{\usebibmacro{bbx:dashcheck}
+ {\bibnamedash}
+ {\usebibmacro{bbx:savehash}%
+ \printnames{author}%
+ \iffieldundef{authortype}
+ {\setunit{\addspace}}
+ {\setunit{\addcomma\space}}}%
+ \iffieldundef{authortype}
+ {}
+ {\usebibmacro{authorstrg}%
+ \setunit{\addspace}}}}%
+ {\global\undef\bbx@lasthash
+ \usebibmacro{labeltitle}%
+ \setunit*{\addspace}}%
+\bblFontYearInList{\usebibmacro{date+extrayear}}}
+
+\renewbibmacro*{editor}{%
+ \usebibmacro{bbx:editor}{editorstrg}}
+\renewbibmacro*{editor+others}{%
+ \usebibmacro{bbx:editor}{editor+othersstrg}}
+
+
+%remove punctuation before (eds) and make bold
+\renewbibmacro*{bbx:editor}[1]{%
+ \ifboolexpr{
+ test \ifuseeditor
+ and
+ not test {\ifnameundef{editor}}
+ }
+ {\bblFontAuthorInList{\usebibmacro{bbx:dashcheck}
+ {\bibnamedash}
+ {\printnames{editor}%
+ \setunit{\bblEdPrefix}%
+ \usebibmacro{bbx:savehash}}%
+ \usebibmacro{#1}%
+ \clearname{editor}%
+ \setunit{\addspace}}}%
+ {\global\undef\bbx@lasthash
+ \usebibmacro{labeltitle}%
+ \setunit*{\addspace}}%
+\bblFontYearInList{\usebibmacro{date+extrayear}}}
+ % erst publisher, dann location
+ \renewbibmacro*{publisher+location+date}{%
+ \printlist{publisher}%
+ \setunit*{\addcomma\space}%
+ \printlist[][1-1]{location}%nur erste Location
+ \setunit*{\addcomma\space}%
+ \usebibmacro{date}%
+ \newunit}
+
+% location ohne schnickscnack
+\DeclareListFormat{location}{#1}
+%Todo: Bundesland/Land entfernen
+
+
+\renewbibmacro*{event+venue+date}{%
+ \printfield{eventtitle}%
+ \iffieldundef{eventtitleaddon}%
+ {}%
+ {%
+ \newunit%
+ \printfield{eventtitleaddon}%
+ }
+ \ifboolexpr{
+ test {\iffieldundef{venue}}
+ and
+ test {\iffieldundef{eventyear}}
+ }
+ {}
+ {\setunit*{\addspace}%
+ \printtext[parens]{%
+ \printfield{venue}%
+ \setunit*{\addcomma\space}%
+ \printeventdate}}%
+ \newunit}
+
+
+
+% remove double editors from proceedings
+
+\DeclareBibliographyDriver{proceedings}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \usebibmacro{editor+others}%
+ \setunit{\labelnamepunct}\newblock
+ \usebibmacro{maintitle+title}%
+ \newunit
+ \printlist{language}%
+ \newunit\newblock
+ \usebibmacro{event+venue+date}%
+ \newunit\newblock
+ \iffieldundef{maintitle}
+ {\printfield{volume}%
+ \printfield{part}}
+ {}%
+ \newunit
+ \printfield{volumes}%
+ \newunit\newblock
+ \usebibmacro{series+number}%
+ \newunit\newblock
+ \printfield{note}%
+ \newunit\newblock
+ \printlist{organization}%
+ \newunit
+ \usebibmacro{publisher+location+date}%
+ \newunit\newblock
+ \usebibmacro{chapter+pages}%
+ \newunit
+ \printfield{pagetotal}%
+ \newunit\newblock
+ \iftoggle{bbx:isbn}
+ {\printfield{isbn}}
+ {}%
+ \newunit\newblock
+ \usebibmacro{doi+eprint+url}%
+ \newunit\newblock
+ \usebibmacro{addendum+pubstate}%
+ \setunit{\bibpagerefpunct}\newblock
+ \usebibmacro{pageref}%
+ \newunit\newblock
+ \iftoggle{bbx:related}
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}}
+ {}%
+ \usebibmacro{finentry}}
+
+
+
+
+
+
+
+
+\DeclareBibliographyDriver{inproceedings}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \usebibmacro{author/translator+others}%
+ \setunit{\labelnamepunct}\newblock
+ \usebibmacro{title}%
+ \newunit
+ \printlist{language}%
+ \newunit\newblock
+ \usebibmacro{byauthor}%
+ \newunit\newblock
+ \usebibmacro{in:}%
+ \usebibmacro{byeditor+suffix}%
+ \usebibmacro{maintitle+booktitle}%
+ \newunit\newblock
+ \usebibmacro{event+venue+date}%
+ \newunit\newblock
+ \newunit\newblock
+ \iffieldundef{maintitle}
+ {\printfield{volume}%
+ \printfield{part}}
+ {}%
+ \newunit
+ \printfield{volumes}%
+ \newunit\newblock
+ \usebibmacro{series+number}%
+ \newunit\newblock
+ \printfield{note}%
+ \newunit\newblock
+% \printlist{organization}%
+% \newunit
+ \usebibmacro{publisher+location+date}%
+ \newunit\newblock
+ \usebibmacro{chapter+pages}%
+ \newunit\newblock
+ \iftoggle{bbx:isbn}
+ {\printfield{isbn}}
+ {}%
+ \newunit\newblock
+ \usebibmacro{doi+eprint+url}%
+ \newunit\newblock
+ \usebibmacro{addendum+pubstate}%
+ \setunit{\bibpagerefpunct}\newblock
+ \usebibmacro{pageref}%
+ \newunit\newblock
+ \iftoggle{bbx:related}
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}}
+ {}%
+ \usebibmacro{finentry}}
+
+%%%%%%%%%%%%
+% link whole cite including name
+% http://tex.stackexchange.com/questions/15951/hyperlink-name-with-biblatex-authoryear-biblatex-1-4b
+%%%%%%%%%%%%
+\DeclareFieldFormat{citehyperref}{%
+ \DeclareFieldAlias{bibhyperref}{noformat}% Avoid nested links
+ \bibhyperref{#1}}
+
+\DeclareFieldFormat{textcitehyperref}{%
+ \DeclareFieldAlias{bibhyperref}{noformat}% Avoid nested links
+ \bibhyperref{%
+ #1%
+ \ifbool{cbx:parens}
+ {\bibcloseparen\global\boolfalse{cbx:parens}}
+ {}}}
+
+\savebibmacro{cite}
+\savebibmacro{textcite}
+
+\renewbibmacro*{cite}{%
+ \printtext[citehyperref]{%
+ \restorebibmacro{cite}%
+ \usebibmacro{cite}}}
+
+\renewbibmacro*{textcite}{%
+ \ifboolexpr{
+ ( not test {\iffieldundef{prenote}} and
+ test {\ifnumequal{\value{citecount}}{1}} )
+ or
+ ( not test {\iffieldundef{postnote}} and
+ test {\ifnumequal{\value{citecount}}{\value{citetotal}}} )
+ }
+ {\DeclareFieldAlias{textcitehyperref}{noformat}}
+ {}%
+ \printtext[textcitehyperref]{%
+ \restorebibmacro{textcite}%
+ \usebibmacro{textcite}}}
+
+\AtEveryCitekey{%
+\clearfield{shorthand}%
+}
+%%%%%%%%%%%%%%%%%%%%%%%%%
+\endinput% \ No newline at end of file