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,
8 # Author: Julien Rioux <jrioux@lyx.org>
14 # The framework (biblatex|bibtex)
17 # Cite style variants (default|authoryear|natbib)
18 # We provide only authoryear citations
19 CiteEngineType authoryear
24 # Maximum number of names before "et al." chimes in
28 # The syntax of the cite command definitions below is:
29 # LyXName|alias*<!_stardesc!_stardesctooltip>[][]=latexcmd
31 # * LyXName: The LyX name as output in the LyX file. For
32 # portability reasons, we try to use the same
33 # name for same-formatted commands in the
34 # different engines (thus many names stem from
36 # * Alias: A (comma-separated) list of commands that fall
37 # back to the given LyX name in the current engine.
38 # This is a bit like "ObsoletedBy" in the layouts.
39 # * latexcmd: The actual LaTeX command that is output.
41 # Alias and latexcmd are optional. If no latexcmd is given, the
42 # LyXName will be output to LaTeX.
46 # * The LyXName "keyonly" has a special meaning: only the citation key,
47 # without any latex command, is output.
48 # * Capitalization indicates that the command also has a capitalized
49 # form (\Latexcmd vs. \latexcmd). These usually enforce upcasing of
50 # name prefixes (von Goethe => Von Goethe).
51 # * Brackets [] indicate the number of optional arguments (0, 1, 2).
52 # * The star * indicates there is a starred version of the command
53 # (\latexcmd* vs. \latexcmd). By default, the starred version means:
54 # Expand the author list even if the maxnames setting would cause
55 # BibTeX/Biber to shorten it with "et al.".
56 # If the star has a different meaning for a command, it can be
57 # specified in angle brackets: <!_stardesc!_stardesctooltip>.
58 # Maximal two translatable macro keywords, marked by the prefix '!_',
59 # can be given. The first points to the string that replaces the
60 # "Full aut&hor list" checkbox label in the Citation dialog, the
61 # second one an optional tooltip for this checkbox. Note that these
62 # two macros have to be defined in the CiteFormat section (see below),
63 # dropping the '!' from the prefix (see below), e.g.:
64 # _stardesc Starred command label
65 # _stardesctooltip Tooltip for the starred command checkbox.
69 # FIXME: support for these jurabib styles (fileformat)
79 # footciteyearpar [][]
83 # CITE COMMAND DEFINITIONS
86 # \cite* is not implemented: use \cite instead, it's the same
105 # The following defines how the commands are represented in the GUI
106 # (inset button and citation dialog) as well as in XHTML, docbook and
110 # Input standard format definitions for the bibliography
111 Input stdciteformats.inc
113 CiteFormat authoryear
117 # 1. Translatable bits (need to be marked by _ prefix, if translated to the GUI language,
118 # or B_, if translated to the buffer language)
119 # Note that preceding and trailing spaces matter.
122 _addtobib Add to bibliography only.
125 _fullcite bibliography entry
126 _bibentry Bibliography entry.
128 _shorttitle short title
129 # The following are handled by BiblioInfo
136 # 2. Macros re-used in the style definitions
144 # A link that lets us jump to the bibliography entry in LyXHTML
145 # %clean:key% will be substituted by the cite key to give a unique id
146 !startlink {!<a href='#LyXCite-%clean:key%'>!}
149 # "ShortAuthor", "Author" or "??"
150 !shortauthor {%shortauthor%[[%shortauthor%]][[{%abbrvciteauthor%[[%abbrvciteauthor%]][[??]]}]]}
152 !shorttitle {%shorttitle%[[ %shorttitle%]][[{%dialog%[[ <%_shorttitle%>]][[%!makejurashorttitle%]]}]]}
154 !maketitle {%title%[[ %title%]][[ ??]]}
155 # "Journal Volume [Year]"
156 !jurashorttitle {%journal%[[ %journal%]]}{%volume%[[ %volume%]]}{%year%[[ %!obracket%%year%%!cbracket%]]}
157 # Handle short title fallback
158 !makejurashorttitle {%ifentrytype:article%[[%!jurashorttitle%]][[{%ifentrytype:periodical%[[%!jurashorttitle%]][[ %!maketitle%]]}]]}
160 !textbefore {%textbefore%[[%textbefore% ]]}
161 # "/prenote" (button) / "/prenote/<before>" (dialog)
162 !textbefore2 {%textbefore%[[/%textbefore%]][[{%dialog%[[/<%_before%>]]}]]}
164 !textafter {%textafter%[[, %textafter%]]}
166 !textafter2 {%textafter%[[ %textafter%]]}
167 # Add a year if it exists (else "??") and possibly a modifier (as in 2017a)
168 !year {%year%[[%year%]][[??]]}{%modifier%[[%modifier%]]}
170 # "ShortAuthor/prenote postnote..."
171 !cite %!startlink%%!shortauthor%%!endlink%%!textbefore2%%!textafter2%%!nextcite%
172 # "ShortAuthor/prenote ShortTitle postnote..."
173 !citetitle %!startlink%%!shortauthor%%!endlink%%!textbefore2%%!shorttitle%%!textafter2%%!nextcitetitle%
174 # "prenote ShortAuthor (Year, postnote)..."
175 !citet %!textbefore%%!startlink%%!shortauthor%%!endlink% %!open%%!year%%!textafter%%!close%%!nextcitet%
176 # "(prenote ShortAuthor, Year, postnote)"
177 !citep %!open%%!citealp%%!close%
178 # "prenote ShortAuthor Year, postnote..."
179 !citealt %!textbefore%%!startlink%%!shortauthor% %!year%%!endlink%%!textafter%%!nextcitealt%
180 # "prenote ShortAuthor, Year, postnote..."
181 !citealp %!textbefore%%!startlink%%!shortauthor%, %!year%%!endlink%%!textafter%%!nextcitealp%
182 # "prenote ShortAuthor, postnote..."
183 !citeauthor %!textbefore%%!startlink%%!shortauthor%%!endlink%%!textafter%%!nextauthor%
184 # "prenote Year, postnote..."
185 !citeyear %!textbefore%%!startlink%%!year%%!endlink%%!textafter%%!nextyear%
186 # "prenote (Year), postnote..."
187 !citeyearpar %!textbefore%%!open%%!startlink%%!year%%!endlink%%!close%%!textafter%%!nextyearpar%
188 # "prenote in: Key, postnote..."
189 !fullcite {%textbefore%[[%textbefore% in: ]]}%bibentry%{%textafter%[[ %textafter%]]}%!nextfullcite%
191 # "...; ShortAuthor postnote..."
192 !nextcite {%next%[[%!sep% %!startlink%%!shortauthor%%!endlink%%!textafter2%%!nextcite%]]}
193 # "...; ShortAuthor ShortTitle postnote..."
194 !nextcitetitle {%next%[[%!sep% %!startlink%%!shortauthor%%!endlink%%!shorttitle%%!textafter2%%!nextcitetitle%]]}
195 # "...; prenote ShortAuthor (Year, postnote)..."
196 !nextcitet {%next%[[%!sep% %!citet%]]}
197 # "...; prenote ShortAuthor Year, postnote..."
198 !nextcitealt {%next%[[%!sep% %!citealt%]]}
199 # "...; prenote ShortAuthor, Year, postnote..."
200 !nextcitealp {%next%[[%!sep% %!citealp%]]}
201 # "...; prenote ShortAuthor, postnote..."
202 !nextauthor {%next%[[%!sep% %!citeauthor%]]}
203 # "...; prenote Year, postnote..."
204 !nextyear {%next%[[%!sep% %!citeyear%]]}
205 # "...; prenote (Year), postnote..."
206 !nextyearpar {%next%[[%!sep% %!citeyearpar%]]}
207 # "...; Key, postnote..."
208 !nextfullcite {%next%[[%!sep% %bibentry%%textafter%%!nextfullcite%]]}
210 !nextkey {%next%[[%!sep% %key%%!nextkey%]]}
213 # ACTUAL STYLE DEFINITIONS
216 # "ShortAuthor/prenote postnote; NextShortAuthor postnote..."
218 # "ShortAuthor/prenote ShortTitle postnote; NextShortAuthor ShortTitle postnote..."
219 citetitle %!citetitle%
220 # "prenote ShortAuthor (Year, postnote); prenote NextShortAuthor (Year, postnote)..."
222 # "(prenote ShortAuthor, Year, postnote)"
224 # "prenote ShortAuthor Year, postnote; prenote NextShortAuthor Year, postnote..."
226 # "prenote ShortAuthor, Year, postnote.; prenote NextShortAuthor, Year, postnote..."
228 # "prenote ShortAuthor, postnote; prenote NextShortAuthor, postnote..."
229 citeauthor %!citeauthor%
230 # "prenote Year, postnote; prenote Year, postnote..."
232 # "prenote (Year), postnote; prenote (Year), postnote..."
233 citeyearpar %!citeyearpar%
234 # "Bibliography entry." (dialog) / "Key; Key ... (full cite)" (button)
235 fullcite {%dialog%[[%_bibentry%]][[{%label%[[%!fullcite%]][[%key%%!nextkey% (%_fullcite%)]]}]]}
236 # "Add to bibliography only." (dialog) / "Key; Key ... (not cited)" (button)
237 nocite {%dialog%[[%_addtobib%]][[%key%%!nextkey% (%_notcited%)]]}
238 # Output only the key
239 keyonly {%dialog%[[%_keyonly%]][[%_key%: %key%%!nextkey%]]}