Several enhancements for support of the JSC style
[texmacs.git] / src / TeXmacs / packages / customize / cite-author-year.ts
blob17bdbdf7494c278ef04346bf58fe7bf4de968e6a
1 <TeXmacs|1.0.7.5>
3 <style|source>
5 <\body>
6   <active*|<\src-title>
7     <src-package|cite-author-year|1.0>
9     <\src-purpose>
10       This package contains extended macros for citations and provides a
11       <TeXmacs> counterpart for the natbib package.
12     </src-purpose>
14     <src-copyright|2006|Joris van der Hoeven>
16     <\src-license>
17       This software falls under the <hlink|GNU general public license,
18       version 3 or later|$TEXMACS_PATH/LICENSE>. It comes WITHOUT ANY
19       WARRANTY WHATSOEVER. You should have received a copy of the license
20       which the software. If not, see <hlink|http://www.gnu.org/licenses/gpl-3.0.html|http://www.gnu.org/licenses/gpl-3.0.html>.
21     </src-license>
22   </src-title>>
24   <use-module|(text std-text-natbib)>
26   <\active*>
27     <\src-comment>
28       Helper macros
29     </src-comment>
30   </active*>
32   <assign|natbib-author|<macro|text|<extern|natbib-get|<arg|text>|author>>>
34   <assign|natbib-year|<macro|text|<extern|natbib-get|<arg|text>|year>>>
36   <assign|natbib-author*|<macro|text|<extern|natbib-get|<arg|text>|author*>>>
38   \;
40   <assign|cite-add|<macro|key|<write|bib|<arg|key>>>>
42   <assign|cite-data|<macro|key|<get-binding|<merge|bib-|<arg|key>>>>>
44   <assign|cite-link|<macro|key|text|<style-with|src-compact|none|<locus|<id|<hard-id|<arg|key>>>|<link|hyperlink|<id|<hard-id|<arg|key>>>|<url|<merge|#bib-|<arg|key>>>>|<arg|text>>>>>
46   <\active*>
47     <\src-comment>
48       Main commands for citations
49     </src-comment>
50   </active*>
52   <assign|render-cite|<macro|x|(<arg|x>)>>
54   <assign|cite-sep|<macro|; >>
56   \;
58   <assign|cite-author|<macro|x|<cite-add|<arg|x>><natbib-author|<cite-data|<arg|x>>>>>
60   <assign|cite-year|<macro|x|<cite-add|<arg|x>><natbib-year|<cite-data|<arg|x>>>>>
62   <assign|cite-author*|<macro|x|<cite-add|<arg|x>><natbib-author*|<cite-data|<arg|x>>>>>
64   <assign|cite-author-year|<macro|x|<cite-author|<arg|x>>,
65   <cite-year|<arg|x>>>>
67   <assign|cite-author*-year|<macro|x|<cite-author*|<arg|x>>,
68   <cite-year|<arg|x>>>>
70   <assign|cite-author-year*|<macro|x|<cite-author|<arg|x>>
71   <render-cite|<cite-year|<arg|x>>>>>
73   <assign|cite-author*-year*|<macro|x|<cite-author*|<arg|x>>
74   <render-cite|<cite-year|<arg|x>>>>>
76   \;
78   <assign|cite-author-link|<macro|x|<cite-link|<arg|x>|<cite-author|<arg|x>>>>>
80   <assign|cite-year-link|<macro|x|<cite-link|<arg|x>|<cite-year|<arg|x>>>>>
82   <assign|cite-author*-link|<macro|x|<cite-link|<arg|x>|<cite-author*|<arg|x>>>>>
84   \;
86   <assign|cite-raw-1|<macro|x|<cite-link|<arg|x>|<cite-author-year|<arg|x>>>>>
88   <assign|cite-raw+|<macro|x|<cite-sep><cite-raw-1|<arg|x>>>>
90   <assign|cite-raw|<xmacro|x|<cite-raw-1|<arg|x|0>><map-args|cite-raw+|concat|x|1>>>
92   <assign|cite-raw*-1|<macro|x|<cite-link|<arg|x>|<cite-author*-year|<arg|x>>>>>
94   <assign|cite-raw*+|<macro|x|<cite-sep><cite-raw*-1|<arg|x>>>>
96   <assign|cite-raw*|<xmacro|x|<cite-raw*-1|<arg|x|0>><map-args|cite-raw*+|concat|x|1>>>
98   \;
100   <assign|cite-textual-1|<macro|x|<cite-link|<arg|x>|<cite-author-year*|<arg|x>>>>>
102   <assign|cite-textual+|<macro|x|<cite-sep><cite-textual-1|<arg|x>>>>
104   <assign|cite-textual|<xmacro|x|<cite-textual-1|<arg|x|0>><map-args|cite-textual+|concat|x|1>>>
106   <assign|cite-textual*-1|<macro|x|<cite-link|<arg|x>|<cite-author*-year*|<arg|x>>>>>
108   <assign|cite-textual*+|<macro|x|<cite-sep><cite-textual*-1|<arg|x>>>>
110   <assign|cite-textual*|<xmacro|x|<cite-textual*-1|<arg|x|0>><map-args|cite-textual*+|concat|x|1>>>
112   \;
114   <assign|cite|<xmacro|x|<render-cite|<cite-raw-1|<arg|x|0>><map-args|cite-raw+|concat|x|1>>>>
116   <assign|cite*|<xmacro|x|<render-cite|<cite-raw-1|<arg|x|0>><map-args|cite-raw*+|concat|x|1>>>>
118   <assign|cite-parenthesized|<value|cite>>
120   <assign|cite-parenthesized*|<value|cite*>>
122   <assign|cite-detail|<macro|x|y|<render-cite-detail|<cite-raw-1|<arg|x>>|<arg|y>>>>
124   <assign|bibitem*|<macro|text|<style-with|src-compact|none|<render-bibitem|<natbib-author*|<arg|text>>,
125   <natbib-year|<arg|text>>><set-binding|<arg|text>>>>>
127   \;
128 </body>
130 <\initial>
131   <\collection>
132     <associate|preamble|true>
133   </collection>
134 </initial>