summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/biblatex/blx-dm.def
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-09-14 22:21:10 +0000
committerKarl Berry <karl@freefriends.org>2016-09-14 22:21:10 +0000
commit255f0a58d9bae0f193b4bd7d07885325f2fe8585 (patch)
tree1023130a997bd4b06c760600b892fcaa73fcaa30 /Master/texmf-dist/tex/latex/biblatex/blx-dm.def
parentada185c4b489c295d97a94e2a8095efa22bf711e (diff)
biblatex (14sep16)
git-svn-id: svn://tug.org/texlive/trunk@42063 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/biblatex/blx-dm.def')
-rw-r--r--Master/texmf-dist/tex/latex/biblatex/blx-dm.def54
1 files changed, 37 insertions, 17 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex/blx-dm.def b/Master/texmf-dist/tex/latex/biblatex/blx-dm.def
index 4312836dd97..829a5a811bd 100644
--- a/Master/texmf-dist/tex/latex/biblatex/blx-dm.def
+++ b/Master/texmf-dist/tex/latex/biblatex/blx-dm.def
@@ -104,6 +104,11 @@
{\appto\blx@tempa{ skip\string_output="true"}}
{}}
+% Valid dateparts
+\def\blx@notnulldateparts{year,month,day,hour,minute,second,timezone,season,endmonth,endday,endhour,endminute,endsecond,endtimezone,endseason}
+\def\blx@nullokdateparts{endyear}
+\edef\blx@dateparts{\blx@notnulldateparts,\blx@nullokdateparts}
+
\newrobustcmd*{\DeclareDatamodelFields}[2][]{%
\begingroup
\let\blx@dm@fieldtype\@empty
@@ -204,8 +209,7 @@
\xappto\blx@bcf@datamodel@fields{%
\blx@xml@datamodel@field{\blx@tempa}{##1}}%
-
- % Dateparts are special - auto-create for all date fields
+ % Dateparts are special - auto-create for all date fields
\ifcsstring{blx@dm@datatype}{date}
{\begingroup
\let\blx@tempa\@empty% reset setkeys buffer due to manual calls below
@@ -219,14 +223,19 @@
{}
{\listcsgadd{blx@datamodel@fields}{##1}}%
\StrCut{##1}{date}\blx@datetype\blx@tempnull
- % *endyear
- \xifinlistcs{\blx@datetype endyear}{blx@datamodel@fields}
- {}
- {\listcsxadd{blx@datamodel@fields}{\blx@datetype endyear}}%
- \setkeys{blx@datamodel@field}{type=field,datatype=datepart,nullok}%
- \xappto\blx@bcf@datamodel@fields{%
- \blx@xml@datamodel@field{\blx@tempa}{\blx@datetype endyear}}%
- % *year, *month, *day, *endmonth, *endday
+ % dateparts which are ok to be null (by default *endyear)
+ \def\do####1{%
+ \let\blx@tempa\@empty% reset setkeys buffer due to loop calls
+ \xifinlistcs{\blx@datetype ####1}{blx@datamodel@fields}
+ {}
+ {\listcsxadd{blx@datamodel@fields}{\blx@datetype ####1}}%
+ \setkeys{blx@datamodel@field}{type=field,datatype=datepart,nullok}%
+ \xappto\blx@bcf@datamodel@fields{%
+ \blx@xml@datamodel@field{\blx@tempa}{\blx@datetype ####1}}}%
+ \expandafter\docsvlist\expandafter{\blx@nullokdateparts}%
+ % dateparts which are not ok to be null by default:
+ % *year, *(end)month, *(end)day, *(end)hour, *(end)minute, *(end)second, *(end)timezone
+ % *(end)season
\def\do####1{%
\let\blx@tempa\@empty% reset setkeys buffer due to loop calls
\xifinlistcs{\blx@datetype ####1}{blx@datamodel@fields}
@@ -235,7 +244,7 @@
\setkeys{blx@datamodel@field}{type=field,datatype=datepart}%
\xappto\blx@bcf@datamodel@fields{%
\blx@xml@datamodel@field{\blx@tempa}{\blx@datetype ####1}}}%
- \docsvlist{year,month,day,endmonth,endday}%
+ \expandafter\docsvlist\expandafter{\blx@notnulldateparts}%
\endgroup}
{}}%
\docsvlist{#2}
@@ -377,7 +386,7 @@
% 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]{nameparts}{family,given,prefix,suffix}
\DeclareDatamodelConstant[type=list]{optiondatatypes}{boolean,integer,string,xml}
\DeclareDatamodelEntrytypes{
@@ -432,6 +441,11 @@
\DeclareDatamodelEntrytypes[skipout]{xdata}
+\DeclareDatamodelFields[type=field, datatype=integer]{
+ number,
+ volume,
+ volumes}
+
\DeclareDatamodelFields[type=field, datatype=literal]{
abstract,
addendum,
@@ -471,7 +485,6 @@
maintitleaddon,
nameaddon,
note,
- number,
origtitle,
pagetotal,
part,
@@ -490,9 +503,7 @@
usere,
userf,
venue,
- version,
- volume,
- volumes}
+ version}
\DeclareDatamodelFields[type=field, datatype=literal, label=true]{
shorthand,
@@ -500,10 +511,11 @@
shortseries,
shorttitle}
+\DeclareDatamodelFields[type=field, datatype=integer, skipout]{sortyear}
+
\DeclareDatamodelFields[type=field, datatype=literal, skipout]{
sorttitle,
sortshorthand,
- sortyear,
sortkey,
presort}
@@ -1178,6 +1190,14 @@
pubstate,
subtitle,
titleaddon,
+ urlhour,
+ urlminute,
+ urlsecond,
+ urltimezone,
+ urlendhour,
+ urlendminute,
+ urlendsecond,
+ urlendtimezone,
urlday,
urlendday,
urlendmonth,