summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/biblatex-morenames
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-04-07 20:52:10 +0000
committerKarl Berry <karl@freefriends.org>2016-04-07 20:52:10 +0000
commit0db58e0ada1f7e2ca133f9ead01b3c9d64056175 (patch)
tree078b6d87be67bbdac1b073af79adf2e6b5bcd6e5 /Master/texmf-dist/tex/latex/biblatex-morenames
parent8c1fff3e03414232f2e8045614360b485b8f2dd4 (diff)
biblatex-morenames (7apr16)
git-svn-id: svn://tug.org/texlive/trunk@40325 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/biblatex-morenames')
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-morenames/morenames.bbx176
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-morenames/morenames.dbx38
2 files changed, 214 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex-morenames/morenames.bbx b/Master/texmf-dist/tex/latex/biblatex-morenames/morenames.bbx
new file mode 100644
index 00000000000..d9964672402
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/biblatex-morenames/morenames.bbx
@@ -0,0 +1,176 @@
+%% Copyright 2016-… Maïeul Rouquette
+%
+% 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 `maintained'.
+%
+% The Current Maintainer of this work is Maïeul Rouquette
+% This work consists of the files realauthor.dbx, realauthor.bbx
+\ProvidesFile{morenames.bbx}
+[2016/04/06 v1.0.0 biblatex bibliography style to have more name fields (MR)]
+
+
+%0. Preamble
+\ifdef{\biblatexmultipledm@bibstyle}
+ {\RequireBibliographyStyle{\biblatexmultipledm@bibstyle}}
+ {\RequireBibliographyStyle{verbose}}
+
+\RequirePackage{xpatch}
+\RequireBiber
+%1. Datainheritance
+\DeclareDataInheritance{mvcollection,mvreference,mvproceedings}{collection,reference,proceedings}{
+ \inherit{editor}{maineditor}
+}
+
+%2. New label names
+
+\DeclareLabelname[collection,proceedings,reference]{%
+ \field{shortauthor}
+ \field{author}
+ \field{maineditor}
+ \field{shorteditor}
+ \field{editor}
+ \field{translator}
+}
+
+\DeclareLabelname[inbook,bookinbook]{%
+ \field{shortauthor}
+ \field{author}
+ \field{ineditor}
+ \field{bookineditor}
+ \field{shorteditor}
+ \field{editor}
+ \field{translator}
+}
+
+
+%3. New bibmacro or bibmacro patching
+
+%3.1 Patching editor+others, in order to add the maineditor in @collection (original was defined in authortitle.bbx or authoryear.bbx)
+
+\xpatchbibmacro{editor+others}%
+ {\usebibmacro{bbx:editor}{editor+othersstrg}}% Original content
+ {%New content
+ \ifboolexpr{%
+ test \ifusemaineditor
+ and
+ not test {\ifnameundef{maineditor}}
+ }{%
+ \usebibmacro{bbx:dashcheck}
+ {\bibnamedash}
+ {\printnames{maineditor}%
+ \setunit{\addcomma\space}%
+ \usebibmacro{bbx:savehash}}%
+ \usebibmacro{maineditor+othersstrg}%
+ \clearname{maineditor}%
+ }
+ {\usebibmacro{bbx:editor}{editor+othersstrg}}
+ }
+
+% Inspired from editor+othersstrg macro
+
+\newbibmacro*{maineditor+othersstrg}{%
+ \iffieldundef{editortype}
+ {\ifboolexpr{
+ test {\ifnumgreater{\value{maineditor}}{1}}
+ or
+ test {\ifandothers{maineditor}}
+ }
+ {\def\abx@tempa{editors}}
+ {\def\abx@tempa{editor}}}
+ {\ifboolexpr{
+ test {\ifnumgreater{\value{maineditor}}{1}}
+ or
+ test {\ifandothers{maineditor}}
+ }
+ {\edef\abx@tempa{\thefield{editortype}s}}
+ {\edef\abx@tempa{\thefield{editortype}}}}%
+ \let\abx@tempb=\empty
+ \ifnamesequal{maineditor}{translator}
+ {\appto\abx@tempa{tr}%
+ \appto\abx@tempb{\clearname{translator}}}
+ {}%
+ \ifnamesequal{maineditor}{commentator}
+ {\appto\abx@tempa{co}%
+ \appto\abx@tempb{\clearname{commentator}}}
+ {\ifnamesequal{maineditor}{annotator}
+ {\appto\abx@tempa{an}%
+ \appto\abx@tempb{\clearname{annotator}}}
+ {}}%
+ \ifnamesequal{maineditor}{introduction}
+ {\appto\abx@tempa{in}%
+ \appto\abx@tempb{\clearname{introduction}}}
+ {\ifnamesequal{maineditor}{foreword}
+ {\appto\abx@tempa{fo}%
+ \appto\abx@tempb{\clearname{foreword}}}
+ {\ifnamesequal{maineditor}{afterword}
+ {\appto\abx@tempa{af}%
+ \appto\abx@tempb{\clearname{afterword}}}
+ {}}}%
+ \ifbibxstring{\abx@tempa}
+ {\printtext[editortype]{\bibstring{\abx@tempa}}\abx@tempb}
+ {\usebibmacro{editorstrg}}}
+
+% 3.2 Patching maintitle+title in order to add the maineditor in @incollection (original was defined in standard.bbx)
+%
+\newbibmacro*{bymaineditor+others}{%
+ \ifnameundef{maineditor}
+ {}
+ {\usebibmacro{byeditor+othersstrg}%
+ \setunit{\addspace}%
+ \printnames[byeditor]{maineditor}%
+ \clearname{maineditor}%
+ \newunit}
+}
+
+\xpatchbibmacro{maintitle+booktitle}
+ {\usebibmacro{maintitle}}% Original
+ {\usebibmacro{maintitle}%
+ \newunit%
+ \usebibmacro{bymaineditor+others}%
+ }
+ {}
+ {}
+
+% 3.3 Patching @inbook and @article drivers in order to add the ineditor
+
+\xpatchbibdriver{inbook}%
+ {\usebibmacro{byauthor}}
+ {\usebibmacro{byauthor}\newunit\usebibmacro{byineditor}}
+ {}
+ {}
+
+\xpatchbibdriver{article}%
+ {\usebibmacro{byauthor}}
+ {\usebibmacro{byauthor}\newunit\usebibmacro{byineditor}}
+ {}
+ {}
+
+\DeclareNameAlias{bookineditor}[byeditor]{ineditor}
+
+\newbibmacro*{byineditor}{%
+ \ifnameundef{ineditor}
+ {\usebibmacro{bybookineditor}}
+ {\usebibmacro{bytypestrg}{ineditor}{editor}%
+ \setunit{\addspace}%
+ \printnames[byeditor]{ineditor}%
+ \newunit}%
+ }
+\newbibmacro*{bybookineditor}{%
+ \ifnameundef{bookineditor}
+ {}
+ {\usebibmacro{bytypestrg}{bookineditor}{editor}%
+ \setunit{\addspace}%
+ \printnames[byeditor]{bookineditor}%
+ \newunit}%
+ }
+
+
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/biblatex-morenames/morenames.dbx b/Master/texmf-dist/tex/latex/biblatex-morenames/morenames.dbx
new file mode 100644
index 00000000000..970680af3b7
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/biblatex-morenames/morenames.dbx
@@ -0,0 +1,38 @@
+%% Copyright 2016-… Maïeul Rouquette
+%
+% 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 `maintained'.
+%
+% The Current Maintainer of this work is Maïeul Rouquette
+% This work consists of the files realauthor.dbx, realauthor.bbx
+\ProvidesFile{morenames.dbx}
+[2016/04/06 v1.0.0 biblatex bibliography style to have more name fields (MR)]
+
+%1. New fields
+\DeclareDatamodelFields[type=list,datatype=name]{
+ maineditor,
+ ineditor,
+ bookineditor,
+}
+
+%2. For existing entry type
+\DeclareDatamodelEntryfields[collection,incollection,proceedings,inproceedings,reference,inreference]{
+ maineditor
+}
+\DeclareDatamodelEntryfields[inbook,article]{
+ ineditor
+}
+\DeclareDatamodelEntryfields[bookinbook]{
+ bookineditor
+}
+
+
+
+\endinput \ No newline at end of file