1 # \DeclareLyXCiteEngine[jurabib.sty]{Jurabib (BibTeX)}
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,
7 # Excludes: basic | natbib | biblatex
9 # Author: Julien Rioux <jrioux@lyx.org>
15 # The framework (biblatex|bibtex)
18 # Cite style variants (default|authoryear|natbib)
19 # We provide only authoryear citations
20 CiteEngineType authoryear
25 # Maximum number of names before "et al." chimes in
29 # The syntax of the cite command definitions below is:
30 # LyXName|alias*<!_stardesc!_stardesctooltip>[][]=latexcmd
32 # * LyXName: The LyX name as output in the LyX file. For
33 # portability reasons, we try to use the same
34 # name for same-formatted commands in the
35 # different engines (thus many names stem from
37 # * Alias: A (comma-separated) list of commands that fall
38 # back to the given LyX name in the current engine.
39 # This is a bit like "ObsoletedBy" in the layouts.
40 # * latexcmd: The actual LaTeX command that is output.
42 # Alias and latexcmd are optional. If no latexcmd is given, the
43 # LyXName will be output to LaTeX.
47 # * Capitalization indicates that the command also has a capitalized
48 # form (\Latexcmd vs. \latexcmd). These usually enforce upcasing of
49 # name prefixes (von Goethe => Von Goethe).
50 # * Brackets [] indicate the number of optional arguments (0, 1, 2).
51 # * The star * indicates there is a starred version of the command
52 # (\latexcmd* vs. \latexcmd). By default, the starred version means:
53 # Expand the author list even if the maxnames setting would cause
54 # BibTeX/Biber to shorten it with "et al.".
55 # If the star has a different meaning for a command, it can be
56 # specified in angle brackets: <!_stardesc!_stardesctooltip>.
57 # Maximal two translatable macro keywords, marked by the prefix '!_',
58 # can be given. The first points to the string that replaces the
59 # "Full aut&hor list" checkbox label in the Citation dialog, the
60 # second one an optional tooltip for this checkbox. Note that these
61 # two macros have to be defined in the CiteFormat section (see below),
62 # dropping the '!' from the prefix (see below), e.g.:
63 # _stardesc Starred command label
64 # _stardesctooltip Tooltip for the starred command checkbox.
68 # FIXME: support for these jurabib styles (fileformat)
78 # footciteyearpar [][]
82 # CITE COMMAND DEFINITIONS
85 # \cite* is not implemented: use \cite instead, it's the same
103 # The following defines how the commands are represented in the GUI
104 # (inset button and citation dialog) as well as in XHTML, docbook and
107 CiteFormat authoryear
111 # 1. Translatable bits (need to be marked by _ prefix)
112 # Note that preceding and trailing spaces matter.
115 _addtobib Add to bibliography only.
116 _fullcite bibliography entry
117 _bibentry Bibliography entry.
119 _shorttitle short title
120 # The following are handled by BiblioInfo
127 # 2. Macros re-used in the style definitions
133 # A link that lets us jump to the bibliography entry in LyXHTML
134 # %clean:key% will be substituted by the cite key to give a unique id
135 !startlink {!<a href='#LyXCite-%clean:key%'>!}
138 # "ShortAuthor" or "??"
139 !shortauthor {%shortauthor%[[%shortauthor%]][[??]]}
140 # "... ShortTitle" (button) / "... ShortTitle <short title>" (dialog)
141 !shorttitle {%shorttitle%[[ %shorttitle%]][[{%dialog%[[ <%_shorttitle%>]]}]]}
143 !textbefore {%textbefore%[[%textbefore% ]]}
144 # "/prenote" (button) / "/prenote/<before>" (dialog)
145 !textbefore2 {%textbefore%[[/%textbefore%]][[{%dialog%[[/<%_before%>]]}]]}
147 !textafter {%textafter%[[, %textafter%]]}
149 !textafter2 {%textafter%[[ %textafter%]]}
150 # Add a year if it exists (else "??") and possibly a modifier (as in 2017a)
151 !year {%year%[[%year%]][[??]]}{%modifier%[[%modifier%]]}
153 # "ShortAuthor/prenote postnote..."
154 !cite %!startlink%%!shortauthor%%!endlink%%!textbefore2%%!textafter2%%!nextcite%
155 # "ShortAuthor/prenote ShortTitle postnote..."
156 !citetitle %!startlink%%!shortauthor%%!endlink%%!textbefore2%%!shorttitle%%!textafter2%%!nextcitetitle%
157 # "prenote ShortAuthor (Year, postnote)..."
158 !citet %!textbefore%%!startlink%%!shortauthor%%!endlink% %!open%%!year%%!textafter%%!close%%!nextcitet%
159 # "(prenote ShortAuthor, Year, postnote)"
160 !citep %!open%%!citealp%%!close%
161 # "prenote ShortAuthor Year, postnote..."
162 !citealt %!textbefore%%!startlink%%!shortauthor% %!year%%!endlink%%!textafter%%!nextcitealt%
163 # "prenote ShortAuthor, Year, postnote..."
164 !citealp %!textbefore%%!startlink%%!shortauthor%, %!year%%!endlink%%!textafter%%!nextcitealp%
165 # "prenote ShortAuthor, postnote..."
166 !citeauthor %!textbefore%%!startlink%%!shortauthor%%!endlink%%!textafter%%!nextauthor%
167 # "prenote Year, postnote..."
168 !citeyear %!textbefore%%!startlink%%!year%%!endlink%%!textafter%%!nextyear%
169 # "prenote (Year), postnote..."
170 !citeyearpar %!textbefore%%!open%%!startlink%%!year%%!endlink%%!close%%!textafter%%!nextyearpar%
171 # "prenote in: Key, postnote..."
172 !fullcite {%textbefore%[[%textbefore% in: ]]}%bibentry%{%textafter%[[ %textafter%]]}%!nextfullcite%
174 # "...; ShortAuthor postnote..."
175 !nextcite {%next%[[%!sep% %!startlink%%!shortauthor%%!endlink%%!textafter2%%!nextcite%]]}
176 # "...; ShortAuthor ShortTitle postnote..."
177 !nextcitetitle {%next%[[%!sep% %!startlink%%!shortauthor%%!endlink%%!shorttitle%%!textafter2%%!nextcitetitle%]]}
178 # "...; prenote ShortAuthor (Year, postnote)..."
179 !nextcitet {%next%[[%!sep% %!citet%]]}
180 # "...; prenote ShortAuthor Year, postnote..."
181 !nextcitealt {%next%[[%!sep% %!citealt%]]}
182 # "...; prenote ShortAuthor, Year, postnote..."
183 !nextcitealp {%next%[[%!sep% %!citealp%]]}
184 # "...; prenote ShortAuthor, postnote..."
185 !nextauthor {%next%[[%!sep% %!citeauthor%]]}
186 # "...; prenote Year, postnote..."
187 !nextyear {%next%[[%!sep% %!citeyear%]]}
188 # "...; prenote (Year), postnote..."
189 !nextyearpar {%next%[[%!sep% %!citeyearpar%]]}
190 # "...; Key, postnote..."
191 !nextfullcite {%next%[[%!sep% %bibentry%%textafter%%!nextfullcite%]]}
193 !nextkey {%next%[[%!sep% %key%%!nextkey%]]}
196 # ACTUAL STYLE DEFINITIONS
199 # "ShortAuthor/prenote postnote; NextShortAuthor postnote..."
201 # "ShortAuthor/prenote ShortTitle postnote; NextShortAuthor ShortTitle postnote..."
202 citetitle %!citetitle%
203 # "prenote ShortAuthor (Year, postnote); prenote NextShortAuthor (Year, postnote)..."
205 # "(prenote ShortAuthor, Year, postnote)"
207 # "prenote ShortAuthor Year, postnote; prenote NextShortAuthor Year, postnote..."
209 # "prenote ShortAuthor, Year, postnote.; prenote NextShortAuthor, Year, postnote..."
211 # "prenote ShortAuthor, postnote; prenote NextShortAuthor, postnote..."
212 citeauthor %!citeauthor%
213 # "prenote Year, postnote; prenote Year, postnote..."
215 # "prenote (Year), postnote; prenote (Year), postnote..."
216 citeyearpar %!citeyearpar%
217 # "Bibliography entry." (dialog) / "Key; Key ... (full cite)" (button)
218 fullcite {%dialog%[[%_bibentry%]][[{%label%[[%!fullcite%]][[%key%%!nextkey% (%_fullcite%)]]}]]}
219 # "Add to bibliography only." (dialog) / "Key; Key ... (not cited)" (button)
220 nocite {%dialog%[[%_addtobib%]][[%key%%!nextkey% (%_notcited%)]]}