1
2
3
4
5
6
7
8
9
10
11
12
13
14\writestatus{loading}{ConTeXt Publication Macros XML inclusion}
15
16\registerctxluafile{publinc}{}
17
18
19
20\unprotect
21
22\definesymbol[btxattachment][{\infofont\darkred btx}]
23\definesymbol[btxcomment] [{\infofont\darkblue btx}]
24
25\protected\def\btx_add_blob#1#2
26 {\relax
27 \clf_btxentrytobuffer{\currentbtxdataset}{\currentbtxtag}{tempbtxexport}
28 #2
29 [\c!symbol=#1,
30 \c!space=\v!yes,
31 \c!buffer=tempbtxexport,
32 \c!name={\currentbtxtag.bib}]
33 \relax}
34
35\permanent\protected\def\btxattach
36 {\iftrialtypesetting\orelse\ifexporting\iflocation
37 \dostarttaggednodetail\t!ignore
38 \btx_add_blob{btxattachment}\attachment
39 \dostoptagged
40 \fi\fi}
41
42\permanent\protected\def\btxcomment
43 {\iftrialtypesetting\orelse\ifexporting\iflocation
44 \dostarttaggednodetail\t!ignore
45 \btx_add_blob{btxcomment}\comment
46 \dostoptagged
47 \fi\fi}
48
49
50
51\permanent\protected\def\btxaddsource
52 {\iftrialtypesetting\orelse\ifexporting\iflocation
53 \dostarttaggednodetail\t!ignore
54 \llap{
55 \btx_add_blob{btxattachment}\attachment
56 \quad
57 \btx_add_blob{btxcomment}\comment
58 \hskip\leftmargindistance
59 }
60 \dostoptagged
61 \fi\fi}
62
63
64
65\definenote [publicationnote]
66\setupnotation [publicationnote] [\c!style=\tt]
67
68\protected\def\publ_cite_set_meaning#1
69 {\setbox\b_btx_cmd\vbox\bgroup
70 \forgetall
71 \nohyphens
72 \let\currentlist\s!btx
73 \setuplist
74 [\s!btx]
75 [\c!before=,
76 \c!after=]
77 \setupbtx
78 [\c!specification=\v!default]
79 \setupbtxrendering
80 [\v!default]
81 [\c!numbering=\v!no]
82 \setupinteraction
83 [\c!state=\v!stop]
84 \let\btx_list_reference_inject_now\relax
85 \btxstartlistentry
86
87
88
89 \btxsettag{#1}
90 \btxsetnumber{0}
91
92 \btxhandlelistentry
93 \btxstoplistentry
94 \egroup}
95
96\protected\def\publ_cite_trace_blob_indeed
97 {\dontleavehmode
98 \hbox to \zeropoint \bgroup
99 \resetinteractioncontrastcolor
100 \resetinteractionstyle
101 \bgroup
102 \darkgray
103 \vrule \s!height .9\strutht \s!depth .9\strutdp \s!width \onepoint \relax
104 \hbox to \zeropoint \bgroup
105 \smallinfofont
106
107 \hbox to \zeropoint \s!yoffset .6\strutdp \bgroup
108 \currentbtxreference
109 \hss
110 \egroup
111 \egroup
112 \egroup
113 \normalexpanded{\btxentrytostring{publicationnote}{note}{\currentbtxreference}}
114 \hss
115 \egroup}
116
117\installtextracker
118 {publications.textblobs}
119 {\let\publ_cite_trace_blob\publ_cite_trace_blob_indeed}
120 {\let\publ_cite_trace_blob\relax}
121
122\protect \endinput
123 |