diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/publ-imp-page.mkvi')
-rw-r--r-- | Master/texmf-dist/tex/context/base/publ-imp-page.mkvi | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/context/base/publ-imp-page.mkvi b/Master/texmf-dist/tex/context/base/publ-imp-page.mkvi new file mode 100644 index 00000000000..19673c829d8 --- /dev/null +++ b/Master/texmf-dist/tex/context/base/publ-imp-page.mkvi @@ -0,0 +1,78 @@ +%D \module +%D [ file=publ-imp-page, +%D version=2014.11.05, +%D title=\CONTEXT\ Publication Support, +%D subtitle=Page numbers, +%D author=Alan Braslau and Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +\unprotect + +\definebtx + [\s!page] % or just outer level + [\c!pagestate=\v!stop, + \c!pageleft=\btxleftparenthesis, % see below!! + \c!pageright=\btxrightparenthesis, + \c!pagesep={,\space}, + \c!lastpagesep={,\space\btxlabeltext{\currentbtxspecification:and}\space}, + \c!finalpagesep={\space\btxlabeltext{\currentbtxspecification:and}\space}, + \c!pageconnector=\endash] + +\definebtx + [\s!page:\s!list] + [\s!page] + [\c!command={\wordright}] + +\startsetups \s!btx:\s!page:concat + \ifcase\currentbtxoverflow + \ifcase\currentbtxconcat + \or % first + \or % second + \btxparameter\c!pagesep + \or % second of two + \btxparameter\c!lastpagesep + \or % last + \btxparameter\c!finalpagesep + \fi + \fi +\stopsetups + +% for the moment we have only one variant + +\startsetups [\s!btx:\s!page:\s!list] + \fastsetup{\s!btx:\s!page:concat} + % \ifx\currentbtxlastpage\empty + % p. + % \else + % pp. + % \fi + % \btxnbsp + \ifconditional\btxinteractive + \goto { + \currentbtxfirstpage + } [ + internal(\currentbtxfirstinternal) + ] + \ifx\currentbtxlastpage\empty \else + \btxparameter\c!pageconnector + \goto { + \currentbtxlastpage + } [ + internal(\currentbtxlastinternal) + ] + \fi + \else + \currentbtxfirstpage + \ifx\currentbtxlastpage\empty \else + \btxparameter\c!pageconnector + \currentbtxlastpage + \fi + \fi +\stopsetups + +\protect |