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
135 # A link that lets us jump to the bibliography entry in LyXHTML
136 # %clean:key% will be substituted by the cite key to give a unique id
137 !startlink {!<a href='#LyXCite-%clean:key%'>!}
140 # "ShortAuthor", "Author" or "??"
141 !shortauthor {%shortauthor%[[%shortauthor%]][[{%abbrvauthor%[[%abbrvauthor%]][[??]]}]]}
143 !shorttitle {%shorttitle%[[ %shorttitle%]][[{%dialog%[[ <%_shorttitle%>]][[%!makejurashorttitle%]]}]]}
145 !maketitle {%title%[[ %title%]][[ ??]]}
146 # "Journal Volume [Year]"
147 !jurashorttitle {%journal%[[ %journal%]]}{%volume%[[ %volume%]]}{%year%[[ %!obracket%%year%%!cbracket%]]}
148 # Handle short title fallback
149 !makejurashorttitle {%ifentrytype:article%[[%!jurashorttitle%]][[{%ifentrytype:periodical%[[%!jurashorttitle%]][[ %!maketitle%]]}]]}
151 !textbefore {%textbefore%[[%textbefore% ]]}
152 # "/prenote" (button) / "/prenote/<before>" (dialog)
153 !textbefore2 {%textbefore%[[/%textbefore%]][[{%dialog%[[/<%_before%>]]}]]}
155 !textafter {%textafter%[[, %textafter%]]}
157 !textafter2 {%textafter%[[ %textafter%]]}
158 # Add a year if it exists (else "??") and possibly a modifier (as in 2017a)
159 !year {%year%[[%year%]][[??]]}{%modifier%[[%modifier%]]}
161 # "ShortAuthor/prenote postnote..."
162 !cite %!startlink%%!shortauthor%%!endlink%%!textbefore2%%!textafter2%%!nextcite%
163 # "ShortAuthor/prenote ShortTitle postnote..."
164 !citetitle %!startlink%%!shortauthor%%!endlink%%!textbefore2%%!shorttitle%%!textafter2%%!nextcitetitle%
165 # "prenote ShortAuthor (Year, postnote)..."
166 !citet %!textbefore%%!startlink%%!shortauthor%%!endlink% %!open%%!year%%!textafter%%!close%%!nextcitet%
167 # "(prenote ShortAuthor, Year, postnote)"
168 !citep %!open%%!citealp%%!close%
169 # "prenote ShortAuthor Year, postnote..."
170 !citealt %!textbefore%%!startlink%%!shortauthor% %!year%%!endlink%%!textafter%%!nextcitealt%
171 # "prenote ShortAuthor, Year, postnote..."
172 !citealp %!textbefore%%!startlink%%!shortauthor%, %!year%%!endlink%%!textafter%%!nextcitealp%
173 # "prenote ShortAuthor, postnote..."
174 !citeauthor %!textbefore%%!startlink%%!shortauthor%%!endlink%%!textafter%%!nextauthor%
175 # "prenote Year, postnote..."
176 !citeyear %!textbefore%%!startlink%%!year%%!endlink%%!textafter%%!nextyear%
177 # "prenote (Year), postnote..."
178 !citeyearpar %!textbefore%%!open%%!startlink%%!year%%!endlink%%!close%%!textafter%%!nextyearpar%
179 # "prenote in: Key, postnote..."
180 !fullcite {%textbefore%[[%textbefore% in: ]]}%bibentry%{%textafter%[[ %textafter%]]}%!nextfullcite%
182 # "...; ShortAuthor postnote..."
183 !nextcite {%next%[[%!sep% %!startlink%%!shortauthor%%!endlink%%!textafter2%%!nextcite%]]}
184 # "...; ShortAuthor ShortTitle postnote..."
185 !nextcitetitle {%next%[[%!sep% %!startlink%%!shortauthor%%!endlink%%!shorttitle%%!textafter2%%!nextcitetitle%]]}
186 # "...; prenote ShortAuthor (Year, postnote)..."
187 !nextcitet {%next%[[%!sep% %!citet%]]}
188 # "...; prenote ShortAuthor Year, postnote..."
189 !nextcitealt {%next%[[%!sep% %!citealt%]]}
190 # "...; prenote ShortAuthor, Year, postnote..."
191 !nextcitealp {%next%[[%!sep% %!citealp%]]}
192 # "...; prenote ShortAuthor, postnote..."
193 !nextauthor {%next%[[%!sep% %!citeauthor%]]}
194 # "...; prenote Year, postnote..."
195 !nextyear {%next%[[%!sep% %!citeyear%]]}
196 # "...; prenote (Year), postnote..."
197 !nextyearpar {%next%[[%!sep% %!citeyearpar%]]}
198 # "...; Key, postnote..."
199 !nextfullcite {%next%[[%!sep% %bibentry%%textafter%%!nextfullcite%]]}
201 !nextkey {%next%[[%!sep% %key%%!nextkey%]]}
204 # ACTUAL STYLE DEFINITIONS
207 # "ShortAuthor/prenote postnote; NextShortAuthor postnote..."
209 # "ShortAuthor/prenote ShortTitle postnote; NextShortAuthor ShortTitle postnote..."
210 citetitle %!citetitle%
211 # "prenote ShortAuthor (Year, postnote); prenote NextShortAuthor (Year, postnote)..."
213 # "(prenote ShortAuthor, Year, postnote)"
215 # "prenote ShortAuthor Year, postnote; prenote NextShortAuthor Year, postnote..."
217 # "prenote ShortAuthor, Year, postnote.; prenote NextShortAuthor, Year, postnote..."
219 # "prenote ShortAuthor, postnote; prenote NextShortAuthor, postnote..."
220 citeauthor %!citeauthor%
221 # "prenote Year, postnote; prenote Year, postnote..."
223 # "prenote (Year), postnote; prenote (Year), postnote..."
224 citeyearpar %!citeyearpar%
225 # "Bibliography entry." (dialog) / "Key; Key ... (full cite)" (button)
226 fullcite {%dialog%[[%_bibentry%]][[{%label%[[%!fullcite%]][[%key%%!nextkey% (%_fullcite%)]]}]]}
227 # "Add to bibliography only." (dialog) / "Key; Key ... (not cited)" (button)
228 nocite {%dialog%[[%_addtobib%]][[%key%%!nextkey% (%_notcited%)]]}