%% %% This is file `oxalph.bbx', %% generated with the docstrip utility. %% %% The original source files were: %% %% oxref.dtx (with options: `bbx,a') %% ---------------------------------------------------------------- %% biblatex-oxref --- Biblatex styles inspired by the Oxford Guide to Style %% Author: Alex Ball %% E-mail: a.j.ball@bath.ac.uk %% License: Released under the LaTeX Project Public License v1.3c or later %% See: http://www.latex-project.org/lppl.txt %% ---------------------------------------------------------------- %% \def\Version{2021/01/18 v2.2} \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesFile{oxalph.bbx} [\Version\space Alphabetic bibliography style inspired by the Oxford Guide to Style] \RequireBibliographyStyle{oxyear} \xpatchcmd{\bbx@opt@mergedate@maximum}{% \printdateextra }{% \printdate }{}{\wlog{WARNING: biblatex-oxref (oxalph) failed to patch bbx@opt@mergedate@maximum (print)}} \xpatchcmd{\bbx@opt@mergedate@maximum}{% \csuse{print\thefield{labeldatesource}dateextra}% }{% \csuse{print\thefield{labeldatesource}date}% }{}{\wlog{WARNING: biblatex-oxref (oxalph) failed to patch bbx@opt@mergedate@maximum (label)}} \xpatchcmd{\bbx@opt@mergedate@compact}{% \csuse{print\thefield{labeldatesource}dateextra}% }{% \csuse{print\thefield{labeldatesource}date}% }{}{\wlog{WARNING: biblatex-oxref (oxalph) failed to patch bbx@opt@mergedate@compact}} \xpatchbibmacro{labeldate}{% \printlabeldateextra }{% \printlabeldate }{}{\wlog{WARNING: biblatex-oxref (oxalph) failed to patch labeldate}} \ExecuteBibliographyOptions{mergedate} \ExecuteBibliographyOptions{labelalpha,sorting=anyt} \DeclareFieldFormat{labelalphawidth}{\mkbibbrackets{#1}} \DeclareFieldFormat{shorthandwidth}{\mkbibbrackets{#1}} \defbibenvironment{bibliography} {\list {\printtext[labelalphawidth]{% \printfield{labelprefix}% \printfield{labelalpha}% \printfield{extraalpha}}} {\setlength{\labelwidth}{\labelalphawidth}% \setlength{\leftmargin}{\labelwidth}% \setlength{\labelsep}{\biblabelsep}% \addtolength{\leftmargin}{\labelsep}% \setlength{\itemsep}{\bibitemsep}% \setlength{\parsep}{\bibparsep}}% \renewcommand*{\makelabel}[1]{##1\hss}} {\endlist} {\item} \defbibenvironment{shorthand} {\list {\printfield[shorthandwidth]{shorthand}} {\setlength{\labelwidth}{\shorthandwidth}% \setlength{\leftmargin}{\labelwidth}% \setlength{\labelsep}{\biblabelsep}% \addtolength{\leftmargin}{\labelsep}% \setlength{\itemsep}{\bibitemsep}% \setlength{\parsep}{\bibparsep}% \renewcommand*{\makelabel}[1]{##1\hss}}} {\endlist} {\item} \DeclareStyleSourcemap{% \maps[datatype=bibtex]{% \map[overwrite=false]{% \step[fieldsource=title, final] \step[fieldset=shortlabeltitle, origfieldval] \step[fieldsource=subtitle] \step[fieldset=shortlabeltitle, origfieldval, append=true] \step[fieldsource=shortlabeltitle, match=\regexp{[^\p{Lu}]}, replace=\regexp{}] }}} \DeclareLabelalphaTemplate{% \labelelement{ \field[final]{shorthand} \field{label} \field[strwidth=3,strside=left,ifnames=1]{labelname} \field[strwidth=1,strside=left]{labelname} \field[strwidth=3,strside=left]{shortlabeltitle} \field[strwidth=4,strside=left]{labeltitle} } \labelelement{ \field[strwidth=2,strside=right]{labelyear} } } %% %% Copyright (C) 2016–2021 Alex Ball %% %% End of file `oxalph.bbx'.