diff options
author | Karl Berry <karl@freefriends.org> | 2015-05-08 22:36:52 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2015-05-08 22:36:52 +0000 |
commit | 5dc3418fd91c83782dce77f0b65549e14f118f51 (patch) | |
tree | 9b4ec94c1bb0be9831fd3b887de69df098d46211 /Master/texmf-dist/tex/context/base/publ-imp-cite.mkvi | |
parent | b810c0301dd20283addb956384210b7926eef35d (diff) |
context
git-svn-id: svn://tug.org/texlive/trunk@37284 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/publ-imp-cite.mkvi')
-rw-r--r-- | Master/texmf-dist/tex/context/base/publ-imp-cite.mkvi | 188 |
1 files changed, 84 insertions, 104 deletions
diff --git a/Master/texmf-dist/tex/context/base/publ-imp-cite.mkvi b/Master/texmf-dist/tex/context/base/publ-imp-cite.mkvi index dfc16c795ee..6b09eaf01b1 100644 --- a/Master/texmf-dist/tex/context/base/publ-imp-cite.mkvi +++ b/Master/texmf-dist/tex/context/base/publ-imp-cite.mkvi @@ -50,8 +50,9 @@ \startsetups btx:cite:unknown \begingroup + \tttf \btxcitereference - unknown: \currentbtxfirst + \currentbtxfirst \endgroup \stopsetups @@ -65,109 +66,84 @@ {\tt <\currentbtxreference>} \stopsetups +\starttexdefinition btx:cite:concat + \btxparameter{\c!separator:\number\currentbtxconcat} +\stoptexdefinition + +% when we have an author-year combination, the first and seconds is not +% fields data but something more complex (that itself calls for a setup) + % \startsetups btx:cite:normal +% \texdefinition{\s!btx:\s!cite:concat} +% \currentbtxlefttext % \ifx\currentbtxfirst\empty % \fastsetup{\s!btx:\s!cite:\s!empty} -% \else\ifx\currentbtxsecond\empty -% \btxcitereference -% \currentbtxfirst -% \ifx\currentbtxthird\empty \else -% \currentbtxthird -% \fi % \else -% \btxcitereference -% \currentbtxfirst -% \btxparameter\v!inbetween -% \currentbtxsecond -% \ifx\currentbtxthird\empty \else -% \currentbtxthird +% \texdefinition {\s!btx:\s!cite:inject} { +% \btxcitereference +% \btxusecommand [\currentbtxspecification:cite:\currentbtxcitealternative] { +% \currentbtxfirst +% } +% } +% \ifx\currentbtxsecond\empty +% \btxflushsuffix +% \else +% \btxparameter\c!inbetween +% \texdefinition {\s!btx:\s!cite:inject} { +% \btxusecommand [\currentbtxspecification:cite:\currentbtxcitealternative] { +% \currentbtxsecond +% } +% } +% % quite likely an error +% \btxflushsuffix % \fi -% \fi\fi +% \fi +% \currentbtxrighttext % \stopsetups -%\startsetups btx:cite:range -% \ifx\currentbtxfirst\empty -% \fastsetup{\s!btx:\s!cite:\s!empty} -% \else\ifx\currentbtxsecond\empty -% \btxcitereference -% \currentbtxfirst -% \ifx\currentbtxthird\empty \else -% \currentbtxthird -% \fi -% \else -% \btxcitereference -% \currentbtxfirst -% \btxparameter\c!range -% \currentbtxsecond -% \ifx\currentbtxthird\empty \else -% \currentbtxthird -% \fi -% \fi\fi -%\stopsetups - -\starttexdefinition btx:cite:concat - \btxparameter{\c!separator:\number\currentbtxconcat} -\stoptexdefinition - \startsetups btx:cite:normal \texdefinition{\s!btx:\s!cite:concat} \currentbtxlefttext \ifx\currentbtxfirst\empty \fastsetup{\s!btx:\s!cite:\s!empty} - \else + \else\ifx\currentbtxsecond\empty \texdefinition {\s!btx:\s!cite:inject} { \btxcitereference - \btxusecommand[\currentbtxspecification:cite:\currentbtxcitealternative] { + \btxusecommand [\currentbtxspecification:cite:\currentbtxcitealternative] { \currentbtxfirst + \btxflushsuffix } } - \ifx\currentbtxsecond\empty \else - \btxparameter\v!inbetween - \texdefinition {\s!btx:\s!cite:inject} { - \btxusecommand[\currentbtxspecification:cite:\currentbtxcitealternative] { - \currentbtxsecond - } - } - \fi - \ifx\currentbtxthird\empty \else - \texdefinition {\s!btx:\s!cite:inject} { - \btxusecommand[\currentbtxspecification:cite:\currentbtxcitealternative] { - \currentbtxthird - } - } - \fi - \fi - \currentbtxrighttext -\stopsetups - -\startsetups btx:cite:author - \texdefinition{\s!btx:\s!cite:concat} - \btxparameter\c!left - \currentbtxlefttext - \ifx\currentbtxfirst\empty - \fastsetup{\s!btx:\s!cite:\s!empty} \else + % \texdefinition {\s!btx:\s!cite:inject} { + % \btxcitereference + % \btxusecommand [\currentbtxspecification:cite:\currentbtxcitealternative] { + % \currentbtxfirst + % } + % } + % \btxparameter\c!inbetween + % \texdefinition {\s!btx:\s!cite:inject} { + % \btxusecommand [\currentbtxspecification:cite:\currentbtxcitealternative] { + % \currentbtxsecond + % } + % } + % \btxflushsuffix + % + % probably better: \texdefinition {\s!btx:\s!cite:inject} { \btxcitereference - \currentbtxfirst - } - \fi - \ifx\currentbtxsecond\empty \else - \relax % keeps a following space - \btxparameter\v!inbetween - \texdefinition {\s!btx:\s!cite:inject} { - \currentbtxsecond - } - \fi - \ifx\currentbtxthird\empty \else - \texdefinition {\s!btx:\s!cite:inject} { - \currentbtxthird + \btxusecommand [\currentbtxspecification:cite:\currentbtxcitealternative] { + \currentbtxfirst + \btxparameter\c!inbetween + \currentbtxsecond + \btxflushsuffix + } } - \fi + \fi\fi \currentbtxrighttext - \btxparameter\c!right \stopsetups + \startsetups btx:cite:range \texdefinition{\s!btx:\s!cite:concat} \currentbtxlefttext @@ -176,21 +152,21 @@ \else \texdefinition {\s!btx:\s!cite:inject} { \btxcitereference - \btxusecommand[\currentbtxspecification:cite:\currentbtxcitealternative] { + \btxusecommand [\currentbtxspecification:cite:\currentbtxcitealternative] { \currentbtxfirst \ifx\currentbtxsecond\empty \else \btxparameter\c!range \currentbtxsecond \fi - \ifx\currentbtxthird\empty \else - \currentbtxthird - \fi + \btxflushsuffix } } \fi \currentbtxrighttext \stopsetups +% somehow related to keywords: + \startsetups btx:cite:listelement \texdefinition{\s!btx:\s!cite:concat} \currentbtxlefttext @@ -218,23 +194,30 @@ % AB: not so sure about that. Why define them in default rather than here? +\startsetups \s!btx:\s!cite:author + \fastsetup{\s!btx:\s!cite:normal} +\stopsetups \startsetups \s!btx:\s!cite:authoryear - \fastsetup{\s!btx:\s!cite:author} + \fastsetup{\s!btx:\s!cite:normal} \stopsetups \startsetups \s!btx:\s!cite:authoryears - \fastsetup{\s!btx:\s!cite:authoryear} + \fastsetup{\s!btx:\s!cite:normal} \stopsetups \startsetups \s!btx:\s!cite:authornum - \fastsetup{\s!btx:\s!cite:authoryear} + \fastsetup{\s!btx:\s!cite:normal} \stopsetups \startsetups \s!btx:\s!cite:authorref - \ifx{\\s!btxparameter\c!alternative}{authoryear} + % what a crap ... no one will ever understand this module .. it makes no + % sense to have these tests, just let users set the right variant .. + \doifelse{\btxparameter\c!alternative} {authoryear} { \fastsetup{\s!btx:\s!cite:authoryears} - \else\ifx{\btxparameter\c!alternative}{num} - \fastsetup{\s!btx:\s!cite:authornum} - \else - \fastsetup{\s!btx:\s!cite:author} - \fi\fi + } { + \doifelse {\btxparameter\c!alternative} {num} { + \fastsetup{\s!btx:\s!cite:authornum} + } { + \fastsetup{\s!btx:\s!cite:author} + } + } \stopsetups \startsetups \s!btx:\s!cite:num \fastsetup{\s!btx:\s!cite:range} @@ -248,9 +231,6 @@ \startsetups \s!btx:\s!cite:year \fastsetup{\s!btx:\s!cite:range} \stopsetups -\startsetups \s!btx:\s!cite:short - \fastsetup{\s!btx:\s!cite:range} -\stopsetups \startsetups \s!btx:\s!cite:author:num \fastsetup{\s!btx:\s!cite:range} \stopsetups @@ -258,20 +238,19 @@ \fastsetup{\s!btx:\s!cite:range} \stopsetups \startsetups \s!btx:\s!cite:author:years - \fastsetup{\s!btx:\s!cite:concat}%?? in range already? \fastsetup{\s!btx:\s!cite:range} \stopsetups -\startsetups \s!btx:\s!cite:serial +\startsetups \s!btx:\s!cite:index \fastsetup{\s!btx:\s!cite:range} \stopsetups -\startsetups \s!btx:\s!cite:tag +\startsetups \s!btx:\s!cite:category \fastsetup{\s!btx:\s!cite:normal} \stopsetups -\startsetups \s!btx:\s!cite:key +\startsetups \s!btx:\s!cite:short \fastsetup{\s!btx:\s!cite:normal} \stopsetups -\startsetups \s!btx:\s!cite:category +\startsetups \s!btx:\s!cite:tag \fastsetup{\s!btx:\s!cite:normal} \stopsetups @@ -280,15 +259,16 @@ \startsetups \s!btx:\s!cite:keywords \fastsetup{\s!btx:\s!cite:list} \stopsetups -\startsetups \s!btx:\s!cite:type - \fastsetup{\s!btx:\s!cite:normal} -\stopsetups \startsetups \s!btx:\s!cite:title \fastsetup{\s!btx:\s!cite:normal} \stopsetups \startsetups \s!btx:\s!cite:pages \fastsetup{\s!btx:\s!cite:range} \stopsetups + +% is the next one used? +% Yes, bibtex is a mess and one can have pages or sometimes page + \startsetups \s!btx:\s!cite:page \fastsetup{\s!btx:\s!cite:normal} \stopsetups |