publ-tra.mkiv /size: 2799 b    last modification: 2020-07-01 14:35
1%D \module
2%D   [       file=publ-tra,
3%D        version=2013.12.24,
4%D          title=\CONTEXT\ Publication Support,
5%D       subtitle=Tracing,
6%D         author=Hans Hagen,
7%D           date=\currentdate,
8%D      copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
9%C
10%C This module is part of the \CONTEXT\ macro||package and is
11%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
12%C details.
13
14% todo: make this a runtime module
15% todo: use the module interface
16
17\writestatus{loading}{ConTeXt Publication Support / Tracing}
18
19\registerctxluafile{publ-tra}{}
20
21\unprotect
22
23\unexpanded\gdef\showbtxdatasetfields      {\dosingleempty\publ_show_dataset_fields}
24\unexpanded\gdef\showbtxdatasetcompleteness{\dosingleempty\publ_show_dataset_completeness}
25\unexpanded\gdef\showbtxdatasetauthors     {\dosingleempty\publ_show_dataset_authors}
26\unexpanded\gdef\showbtxhashedauthors      {\dosingleempty\publ_show_hashed_authors}
27\unexpanded\gdef\showbtxfields             {\dosingleempty\publ_show_fields}
28\unexpanded\gdef\showbtxtables             {\dosingleempty\publ_show_tables}
29
30\gdef\publ_show_dataset_whatever#1[#2]%
31  {\begingroup
32   \letdummyparameter\c!specification\currentbtxspecification
33   \setdummyparameter\c!dataset      {\currentbtxdataset}%
34   \letdummyparameter\c!field        \empty
35   \iffirstargument
36     \doifelseassignment{#2}
37       {\getdummyparameters[#2]}%
38       {\setdummyparameter\c!dataset{#2}}%
39   \else
40     \getdummyparameters[#2]%
41   \fi
42   \ctxcommand{#1{
43      dataset       = "\dummyparameter\c!dataset",
44      specification = "\dummyparameter\c!specification",
45      field         = "\dummyparameter\c!field",
46   }}%
47   \endgroup}
48
49\gdef\publ_show_dataset_fields      {\publ_show_dataset_whatever{showbtxdatasetfields}}
50\gdef\publ_show_dataset_completeness{\publ_show_dataset_whatever{showbtxdatasetcompleteness}}
51\gdef\publ_show_dataset_authors     {\publ_show_dataset_whatever{showbtxdatasetauthors}}
52
53\gdef\publ_show_fields[#1]%
54  {\begingroup
55   \setdummyparameter\c!rotation{90}%
56   \doifelseassignment{#1}%
57     {\letdummyparameter\c!specification\currentbtxspecification
58      \getdummyparameters[#1]}%
59     {\doifelsenothing{#1}%
60        {\letdummyparameter\c!specification\currentbtxspecification}%
61        {\setdummyparameter\c!specification{#1}}}%
62   \ctxcommand{showbtxfields{
63      rotation      = "\dummyparameter\c!rotation",
64      specification = "\dummyparameter\c!specification"
65   }}%
66   \endgroup}
67
68\gdef\publ_show_tables[#1]%
69  {\begingroup
70   \ctxcommand{showbtxtables{}}%
71   \endgroup}
72
73\gdef\publ_show_hashed_authors[#1]%
74  {\ctxcommand{showbtxhashedauthors{}}}
75
76\protect
77
78\continueifinputfile{publ-tra.mkiv}
79
80\starttext
81
82    \showbtxfields[rotation=85] \page
83    \showbtxfields[rotation=90] \page
84
85    \showbtxtables \page
86
87\stoptext
88