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
109 CiteFormat authoryear
113 # 1. Translatable bits (need to be marked by _ prefix)
114 # Note that preceding and trailing spaces matter.
117 _addtobib Add to bibliography only.
120 _fullcite bibliography entry
121 _bibentry Bibliography entry.
123 _shorttitle short title
124 # The following are handled by BiblioInfo
131 # 2. Macros re-used in the style definitions
139 # A link that lets us jump to the bibliography entry in LyXHTML
140 # %clean:key% will be substituted by the cite key to give a unique id
141 !startlink {!<a href='#LyXCite-%clean:key%'>!}
144 # "ShortAuthor", "Author" or "??"
145 !shortauthor {%shortauthor%[[%shortauthor%]][[{%abbrvciteauthor%[[%abbrvciteauthor%]][[??]]}]]}
147 !shorttitle {%shorttitle%[[ %shorttitle%]][[{%dialog%[[ <%_shorttitle%>]][[%!makejurashorttitle%]]}]]}
149 !maketitle {%title%[[ %title%]][[ ??]]}
150 # "Journal Volume [Year]"
151 !jurashorttitle {%journal%[[ %journal%]]}{%volume%[[ %volume%]]}{%year%[[ %!obracket%%year%%!cbracket%]]}
152 # Handle short title fallback
153 !makejurashorttitle {%ifentrytype:article%[[%!jurashorttitle%]][[{%ifentrytype:periodical%[[%!jurashorttitle%]][[ %!maketitle%]]}]]}
155 !textbefore {%textbefore%[[%textbefore% ]]}
156 # "/prenote" (button) / "/prenote/<before>" (dialog)
157 !textbefore2 {%textbefore%[[/%textbefore%]][[{%dialog%[[/<%_before%>]]}]]}
159 !textafter {%textafter%[[, %textafter%]]}
161 !textafter2 {%textafter%[[ %textafter%]]}
162 # Add a year if it exists (else "??") and possibly a modifier (as in 2017a)
163 !year {%year%[[%year%]][[??]]}{%modifier%[[%modifier%]]}
165 # "ShortAuthor/prenote postnote..."
166 !cite %!startlink%%!shortauthor%%!endlink%%!textbefore2%%!textafter2%%!nextcite%
167 # "ShortAuthor/prenote ShortTitle postnote..."
168 !citetitle %!startlink%%!shortauthor%%!endlink%%!textbefore2%%!shorttitle%%!textafter2%%!nextcitetitle%
169 # "prenote ShortAuthor (Year, postnote)..."
170 !citet %!textbefore%%!startlink%%!shortauthor%%!endlink% %!open%%!year%%!textafter%%!close%%!nextcitet%
171 # "(prenote ShortAuthor, Year, postnote)"
172 !citep %!open%%!citealp%%!close%
173 # "prenote ShortAuthor Year, postnote..."
174 !citealt %!textbefore%%!startlink%%!shortauthor% %!year%%!endlink%%!textafter%%!nextcitealt%
175 # "prenote ShortAuthor, Year, postnote..."
176 !citealp %!textbefore%%!startlink%%!shortauthor%, %!year%%!endlink%%!textafter%%!nextcitealp%
177 # "prenote ShortAuthor, postnote..."
178 !citeauthor %!textbefore%%!startlink%%!shortauthor%%!endlink%%!textafter%%!nextauthor%
179 # "prenote Year, postnote..."
180 !citeyear %!textbefore%%!startlink%%!year%%!endlink%%!textafter%%!nextyear%
181 # "prenote (Year), postnote..."
182 !citeyearpar %!textbefore%%!open%%!startlink%%!year%%!endlink%%!close%%!textafter%%!nextyearpar%
183 # "prenote in: Key, postnote..."
184 !fullcite {%textbefore%[[%textbefore% in: ]]}%bibentry%{%textafter%[[ %textafter%]]}%!nextfullcite%
186 # "...; ShortAuthor postnote..."
187 !nextcite {%next%[[%!sep% %!startlink%%!shortauthor%%!endlink%%!textafter2%%!nextcite%]]}
188 # "...; ShortAuthor ShortTitle postnote..."
189 !nextcitetitle {%next%[[%!sep% %!startlink%%!shortauthor%%!endlink%%!shorttitle%%!textafter2%%!nextcitetitle%]]}
190 # "...; prenote ShortAuthor (Year, postnote)..."
191 !nextcitet {%next%[[%!sep% %!citet%]]}
192 # "...; prenote ShortAuthor Year, postnote..."
193 !nextcitealt {%next%[[%!sep% %!citealt%]]}
194 # "...; prenote ShortAuthor, Year, postnote..."
195 !nextcitealp {%next%[[%!sep% %!citealp%]]}
196 # "...; prenote ShortAuthor, postnote..."
197 !nextauthor {%next%[[%!sep% %!citeauthor%]]}
198 # "...; prenote Year, postnote..."
199 !nextyear {%next%[[%!sep% %!citeyear%]]}
200 # "...; prenote (Year), postnote..."
201 !nextyearpar {%next%[[%!sep% %!citeyearpar%]]}
202 # "...; Key, postnote..."
203 !nextfullcite {%next%[[%!sep% %bibentry%%textafter%%!nextfullcite%]]}
205 !nextkey {%next%[[%!sep% %key%%!nextkey%]]}
208 # ACTUAL STYLE DEFINITIONS
211 # "ShortAuthor/prenote postnote; NextShortAuthor postnote..."
213 # "ShortAuthor/prenote ShortTitle postnote; NextShortAuthor ShortTitle postnote..."
214 citetitle %!citetitle%
215 # "prenote ShortAuthor (Year, postnote); prenote NextShortAuthor (Year, postnote)..."
217 # "(prenote ShortAuthor, Year, postnote)"
219 # "prenote ShortAuthor Year, postnote; prenote NextShortAuthor Year, postnote..."
221 # "prenote ShortAuthor, Year, postnote.; prenote NextShortAuthor, Year, postnote..."
223 # "prenote ShortAuthor, postnote; prenote NextShortAuthor, postnote..."
224 citeauthor %!citeauthor%
225 # "prenote Year, postnote; prenote Year, postnote..."
227 # "prenote (Year), postnote; prenote (Year), postnote..."
228 citeyearpar %!citeyearpar%
229 # "Bibliography entry." (dialog) / "Key; Key ... (full cite)" (button)
230 fullcite {%dialog%[[%_bibentry%]][[{%label%[[%!fullcite%]][[%key%%!nextkey% (%_fullcite%)]]}]]}
231 # "Add to bibliography only." (dialog) / "Key; Key ... (not cited)" (button)
232 nocite {%dialog%[[%_addtobib%]][[%key%%!nextkey% (%_notcited%)]]}
233 # Output only the key
234 keyonly {%dialog%[[%_keyonly%]][[%_key%: %key%%!nextkey%]]}