]> git.lyx.org Git - lyx.git/blob - lib/citeengines/jurabib.citeengine
Extend cite engine style documentation
[lyx.git] / lib / citeengines / jurabib.citeengine
1 # \DeclareLyXCiteEngine[jurabib.sty]{Jurabib (BibTeX)}
2 # DescriptionBegin
3 #   Jurabib supports a range of author-year styles primarily suitable for law studies
4 #   and the Humanities. It includes localizations for English, German, French, Dutch,
5 #   Spanish and Italian.
6 # DescriptionEnd
7 # Excludes: basic | natbib | biblatex
8
9 # Author: Julien Rioux <jrioux@lyx.org>
10
11 Format 62
12
13 Requires jurabib
14
15 # The framework (biblatex|bibtex)
16 CiteFramework bibtex
17
18 # Cite style variants (default|authoryear|natbib)
19 # We provide only authoryear citations
20 CiteEngineType authoryear
21
22 # Default style file
23 DefaultBiblio  jurabib
24
25
26 # The syntax of the cite command definitions below is:
27 # LyXName|alias*<!_stardesc!_stardesctooltip>[][]=latexcmd
28
29 # * LyXName:  The LyX name as output in the LyX file. For
30 #             portability reasons, we try to use the same
31 #             name for same-formatted commands in the
32 #             different engines (thus many names stem from
33 #             natbib).
34 # * Alias:    A (comma-separated) list of commands that fall
35 #             back to the given LyX name in the current engine.
36 #             This is a bit like "ObsoletedBy" in the layouts.
37 # * latexcmd: The actual LaTeX command that is output.
38 #
39 # Alias and latexcmd are optional. If no latexcmd is given, the
40 # LyXName will be output to LaTeX.
41 #
42 # Note further:
43 #
44 # * Capitalization indicates that the command also has a capitalized
45 #   form (\Latexcmd vs. \latexcmd). These usually enforce upcasing of
46 #   name prefixes (von Goethe => Von Goethe).
47 # * Brackets [] indicate the number of optional arguments (0, 1, 2).
48 # * The star * indicates there is a starred version of the command
49 #   (\latexcmd* vs. \latexcmd). By default, the starred version means:
50 #   Expand the author list even if the maxnames setting would cause
51 #   BibTeX/Biber to shorten it with "et al.".
52 #   If the star has a different meaning for a command, it can be
53 #   specified in angle brackets: <!_stardesc!_stardesctooltip>.
54 #   Maximal two translatable macro keywords, marked by the prefix '!_',
55 #   can be given. The first points to the string that replaces the
56 #   "Full aut&hor list" checkbox label in the Citation dialog, the
57 #   second one an optional tooltip for this checkbox. Note that these
58 #   two macros have to be defined in the CiteFormat section (see below),
59 #   dropping the '!' from the prefix (see below), e.g.:
60 #   _stardesc Starred command label
61 #   _stardesctooltip Tooltip for the starred command checkbox.
62
63
64
65 # FIXME: support for these jurabib styles (fileformat)
66 # citefield []{}
67 # footcite [][]
68 # footcitetitle [][]
69 # footcitet [][]
70 # footcitep [][]
71 # footcitealt [][]
72 # footcitealp [][]
73 # footciteauthor [][]
74 # footciteyear [][]
75 # footciteyearpar [][]
76 # footfullcite [][]
77
78 #
79 # CITE COMMAND DEFINITIONS
80 #
81 CiteEngine authoryear
82         # \cite* is not implemented: use \cite instead, it's the same
83         cite [][]
84         citetitle [][]
85         citet [][]
86         citep [][]
87         citealt [][]
88         citealp [][]
89         citeauthor [][]
90         citeyear [][]
91         citeyearpar [][]
92         fullcite [][]
93         nocite
94 End
95
96 #
97 # CITE FORMAT
98 #
99
100 # The following defines how the commands are represented in the GUI
101 # (inset button and citation dialog) as well as in XHTML, docbook and
102 # plain text output.
103 #
104 CiteFormat authoryear
105         #
106         # MACROS
107         #
108         # 1. Translatable bits (need to be marked by _ prefix)
109         #
110         _notcited not cited
111         _addtobib Add to bibliography only.
112         _fullcite bibliography entry
113         _bibentry Bibliography entry.
114         _before before
115         _shorttitle short title
116
117         #
118         # 2. Macros re-used in the style definitions
119         #
120         !open (
121         !sep ;
122         !close )
123
124         # A link that lets us jump to the bibliography entry in LyXHTML
125         # %clean:key% will be substituted by the cite key to give a unique id
126         !startlink {!<a href='#LyXCite-%clean:key%'>!}
127         !endlink {!</a>!}
128
129         # "ShortAuthor" or "??"
130         !shortauthor {%shortauthor%[[%shortauthor%]][[??]]}
131         # "... ShortTitle" (button) / "... ShortTitle <short title>" (dialog)
132         !shorttitle {%shorttitle%[[ %shorttitle%]][[{%dialog%[[ <%_shorttitle%>]]}]]}
133         # "prenote "
134         !textbefore {%textbefore%[[%textbefore% ]]}
135         # "/prenote" (button) / "/prenote/<before>" (dialog)
136         !textbefore2 {%textbefore%[[/%textbefore%]][[{%dialog%[[/<%_before%>]]}]]}
137         # ", postnote"
138         !textafter {%textafter%[[, %textafter%]]}
139         # " postnote"
140         !textafter2 {%textafter%[[ %textafter%]]}
141         # Add a year if it exists (else "??") and possibly a modifier (as in 2017a)
142         !year {%year%[[%year%]][[??]]}{%modifier%[[%modifier%]]}
143
144         # "ShortAuthor/prenote postnote..."
145         !cite %!startlink%%!shortauthor%%!endlink%%!textbefore2%%!textafter2%%!nextcite%
146         # "ShortAuthor/prenote ShortTitle postnote..."
147         !citetitle %!startlink%%!shortauthor%%!endlink%%!textbefore2%%!shorttitle%%!textafter2%%!nextcitetitle%
148         # "prenote ShortAuthor (Year, postnote)..."
149         !citet %!textbefore%%!startlink%%!shortauthor%%!endlink% %!open%%!year%%!textafter%%!close%%!nextcitet%
150         # "(prenote ShortAuthor, Year, postnote)"
151         !citep %!open%%!citealp%%!close%
152         # "prenote ShortAuthor Year, postnote..."
153         !citealt %!textbefore%%!startlink%%!shortauthor% %!year%%!endlink%%!textafter%%!nextcitealt%
154         # "prenote ShortAuthor, Year, postnote..."
155         !citealp %!textbefore%%!startlink%%!shortauthor%, %!year%%!endlink%%!textafter%%!nextcitealp%
156         # "prenote ShortAuthor, postnote..."
157         !citeauthor %!textbefore%%!startlink%%!shortauthor%%!endlink%%!textafter%%!nextauthor%
158         # "prenote Year, postnote..."
159         !citeyear %!textbefore%%!startlink%%!year%%!endlink%%!textafter%%!nextyear%
160         # "prenote (Year), postnote..."
161         !citeyearpar %!textbefore%%!open%%!startlink%%!year%%!endlink%%!close%%!textafter%%!nextyearpar%
162         # "prenote in: Key, postnote..."
163         !fullcite {%textbefore%[[%textbefore% in: ]]}%bibentry%{%textafter%[[ %textafter%]]}%!nextfullcite%
164
165         # "...; ShortAuthor postnote..."
166         !nextcite {%next%[[%!sep% %!startlink%%!shortauthor%%!endlink%%!textafter2%%!nextcite%]]}
167         # "...; ShortAuthor ShortTitle postnote..."
168         !nextcitetitle {%next%[[%!sep% %!startlink%%!shortauthor%%!endlink%%!shorttitle%%!textafter2%%!nextcitetitle%]]}
169         # "...; prenote ShortAuthor (Year, postnote)..."
170         !nextcitet {%next%[[%!sep% %!citet%]]}
171         # "...; prenote ShortAuthor Year, postnote..."
172         !nextcitealt {%next%[[%!sep% %!citealt%]]}
173         # "...; prenote ShortAuthor, Year, postnote..."
174         !nextcitealp {%next%[[%!sep% %!citealp%]]}
175         # "...; prenote ShortAuthor, postnote..."
176         !nextauthor {%next%[[%!sep% %!citeauthor%]]}
177         # "...; prenote Year, postnote..."
178         !nextyear {%next%[[%!sep% %!citeyear%]]}
179         # "...; prenote (Year), postnote..."
180         !nextyearpar {%next%[[%!sep% %!citeyearpar%]]}
181         # "...; Key, postnote..."
182         !nextfullcite {%next%[[%!sep% %bibentry%%textafter%%!nextfullcite%]]}
183         # "...; Key..."
184         !nextkey {%next%[[%!sep% %key%%!nextkey%]]}
185
186         #
187         # ACTUAL STYLE DEFINITIONS
188         #
189
190         # "ShortAuthor/prenote postnote; NextShortAuthor postnote..."
191         cite %!cite%
192         # "ShortAuthor/prenote ShortTitle postnote; NextShortAuthor ShortTitle postnote..."
193         citetitle %!citetitle%
194         # "prenote ShortAuthor (Year, postnote); prenote NextShortAuthor (Year, postnote)..."
195         citet %!citet%
196         # "(prenote ShortAuthor, Year, postnote)"
197         citep %!citep%
198         # "prenote ShortAuthor Year, postnote; prenote NextShortAuthor Year, postnote..."
199         citealt %!citealt%
200         # "prenote ShortAuthor, Year, postnote.; prenote NextShortAuthor, Year, postnote..."
201         citealp %!citealp%
202         # "prenote ShortAuthor, postnote; prenote NextShortAuthor, postnote..."
203         citeauthor %!citeauthor%
204         # "prenote Year, postnote; prenote Year, postnote..."
205         citeyear %!citeyear%
206         # "prenote (Year), postnote; prenote (Year), postnote..."
207         citeyearpar %!citeyearpar%
208         # "Bibliography entry." (dialog) / "Key; Key ... (full cite)" (button)
209         fullcite {%dialog%[[%_bibentry%]][[{%label%[[%!fullcite%]][[%key%%!nextkey% (%_fullcite%)]]}]]}
210         # "Add to bibliography only." (dialog) / "Key; Key ... (not cited)" (button)
211         nocite {%dialog%[[%_addtobib%]][[%key%%!nextkey% (%_notcited%)]]}
212 End