From c48ccf7d508e674e10d9771d333993da3a957589 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 7 Mar 2016 23:27:17 +0000 Subject: biblatex 3.3 (7mar16) git-svn-id: svn://tug.org/texlive/trunk@39966 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/biblatex/blx-dm.def | 27 ++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) (limited to 'Master/texmf-dist/tex/latex/biblatex/blx-dm.def') diff --git a/Master/texmf-dist/tex/latex/biblatex/blx-dm.def b/Master/texmf-dist/tex/latex/biblatex/blx-dm.def index 864c5cec58b..d5e65b6fbdb 100644 --- a/Master/texmf-dist/tex/latex/biblatex/blx-dm.def +++ b/Master/texmf-dist/tex/latex/biblatex/blx-dm.def @@ -3,13 +3,17 @@ \newbool{dmskipout}% \newbool{dmlabelfield}% -\listadd\blx@globalopts{datamodel}% for passing to the .bcf - % Data model .bcf output macros \xdef\blx@xml@datamodel#1{% ~~\blx@nl #1% ~~\blx@nl} +\xdef\blx@xml@datamodel@constants#1{% + ~~~~\blx@nl + #1% + ~~~~\blx@nl} +\xdef\blx@xml@datamodel@constant#1#2#3{% + ~~~~~~#3\blx@nl} \xdef\blx@xml@datamodel@entrytypes#1{% ~~~~\blx@nl #1% @@ -61,6 +65,7 @@ \xdef\blx@xml@datamodel@constraintfieldsub#1{% ~~~~~~~~~~#1\blx@nl} + % Data model specification macros \newrobustcmd*{\ResetDatamodelEntrytypes}{% \global\cslet{blx@bcf@datamodel@entrytypes}\@empty @@ -203,6 +208,20 @@ \booltrue{dmlabelfield}} {}} +\newrobustcmd*{\DeclareDatamodelConstant}[3][]{% + \begingroup + \let\blx@tempa\@empty + \ifblank{#1} + {\def\blx@tempa{string}} + {\setkeys{blx@datamodel@constant}{#1}}% + \xappto\blx@bcf@datamodel@constants{\blx@xml@datamodel@constant{\blx@tempa}{#2}{#3}}% + \csxdef{blx@datamodel@constant@#2}{#3}% + \csxdef{blx@datamodel@constanttype@#2}{\blx@tempa}% + \endgroup} + +\define@key{blx@datamodel@constant}{type}{% + \def\blx@tempa{#1}} + \newrobustcmd*{\DeclareDatamodelEntryfields}[2][]{% \begingroup \let\blx@tempa\@empty @@ -300,6 +319,9 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Data model specification +\DeclareDatamodelConstant[type=list]{gender}{sf,sm,sn,pf,pm,pn,pp} +\DeclareDatamodelConstant[type=list]{nameparts}{prefix,family,suffix,given} +\DeclareDatamodelConstant[type=list]{optiondatatypes}{boolean,integer,string,xml} \DeclareDatamodelEntrytypes{ article, @@ -1571,7 +1593,6 @@ \DeclareDatamodelConstraints[inproceedings]{ \constraint[type=mandatory]{ \constraintfield{author} - \constraintfield{editor} \constraintfield{title} \constraintfield{booktitle} } -- cgit v1.2.3