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 # * Capitalization indicates that the command also has a capitalized
47 # form (\Latexcmd vs. \latexcmd). These usually enforce upcasing of
48 # name prefixes (von Goethe => Von Goethe).
49 # * Brackets [] indicate the number of optional arguments (0, 1, 2).
50 # * The star * indicates there is a starred version of the command
51 # (\latexcmd* vs. \latexcmd). By default, the starred version means:
52 # Expand the author list even if the maxnames setting would cause
53 # BibTeX/Biber to shorten it with "et al.".
54 # If the star has a different meaning for a command, it can be
55 # specified in angle brackets: <!_stardesc!_stardesctooltip>.
56 # Maximal two translatable macro keywords, marked by the prefix '!_',
57 # can be given. The first points to the string that replaces the
58 # "Full aut&hor list" checkbox label in the Citation dialog, the
59 # second one an optional tooltip for this checkbox. Note that these
60 # two macros have to be defined in the CiteFormat section (see below),
61 # dropping the '!' from the prefix (see below), e.g.:
62 # _stardesc Starred command label
63 # _stardesctooltip Tooltip for the starred command checkbox.
67 # FIXME: support for these jurabib styles (fileformat)
77 # footciteyearpar [][]
81 # CITE COMMAND DEFINITIONS
84 # \cite* is not implemented: use \cite instead, it's the same
102 # The following defines how the commands are represented in the GUI
103 # (inset button and citation dialog) as well as in XHTML, docbook and
106 CiteFormat authoryear
110 # 1. Translatable bits (need to be marked by _ prefix)
111 # Note that preceding and trailing spaces matter.
114 _addtobib Add to bibliography only.
115 _fullcite bibliography entry
116 _bibentry Bibliography entry.
118 _shorttitle short title
119 # The following are handled by BiblioInfo
126 # 2. Macros re-used in the style definitions
134 # A link that lets us jump to the bibliography entry in LyXHTML
135 # %clean:key% will be substituted by the cite key to give a unique id
136 !startlink {!<a href='#LyXCite-%clean:key%'>!}
139 # "ShortAuthor", "Author" or "??"
140 !shortauthor {%shortauthor%[[%shortauthor%]][[{%abbrvciteauthor%[[%abbrvciteauthor%]][[??]]}]]}
142 !shorttitle {%shorttitle%[[ %shorttitle%]][[{%dialog%[[ <%_shorttitle%>]][[%!makejurashorttitle%]]}]]}
144 !maketitle {%title%[[ %title%]][[ ??]]}
145 # "Journal Volume [Year]"
146 !jurashorttitle {%journal%[[ %journal%]]}{%volume%[[ %volume%]]}{%year%[[ %!obracket%%year%%!cbracket%]]}
147 # Handle short title fallback
148 !makejurashorttitle {%ifentrytype:article%[[%!jurashorttitle%]][[{%ifentrytype:periodical%[[%!jurashorttitle%]][[ %!maketitle%]]}]]}
150 !textbefore {%textbefore%[[%textbefore% ]]}
151 # "/prenote" (button) / "/prenote/<before>" (dialog)
152 !textbefore2 {%textbefore%[[/%textbefore%]][[{%dialog%[[/<%_before%>]]}]]}
154 !textafter {%textafter%[[, %textafter%]]}
156 !textafter2 {%textafter%[[ %textafter%]]}
157 # Add a year if it exists (else "??") and possibly a modifier (as in 2017a)
158 !year {%year%[[%year%]][[??]]}{%modifier%[[%modifier%]]}
160 # "ShortAuthor/prenote postnote..."
161 !cite %!startlink%%!shortauthor%%!endlink%%!textbefore2%%!textafter2%%!nextcite%
162 # "ShortAuthor/prenote ShortTitle postnote..."
163 !citetitle %!startlink%%!shortauthor%%!endlink%%!textbefore2%%!shorttitle%%!textafter2%%!nextcitetitle%
164 # "prenote ShortAuthor (Year, postnote)..."
165 !citet %!textbefore%%!startlink%%!shortauthor%%!endlink% %!open%%!year%%!textafter%%!close%%!nextcitet%
166 # "(prenote ShortAuthor, Year, postnote)"
167 !citep %!open%%!citealp%%!close%
168 # "prenote ShortAuthor Year, postnote..."
169 !citealt %!textbefore%%!startlink%%!shortauthor% %!year%%!endlink%%!textafter%%!nextcitealt%
170 # "prenote ShortAuthor, Year, postnote..."
171 !citealp %!textbefore%%!startlink%%!shortauthor%, %!year%%!endlink%%!textafter%%!nextcitealp%
172 # "prenote ShortAuthor, postnote..."
173 !citeauthor %!textbefore%%!startlink%%!shortauthor%%!endlink%%!textafter%%!nextauthor%
174 # "prenote Year, postnote..."
175 !citeyear %!textbefore%%!startlink%%!year%%!endlink%%!textafter%%!nextyear%
176 # "prenote (Year), postnote..."
177 !citeyearpar %!textbefore%%!open%%!startlink%%!year%%!endlink%%!close%%!textafter%%!nextyearpar%
178 # "prenote in: Key, postnote..."
179 !fullcite {%textbefore%[[%textbefore% in: ]]}%bibentry%{%textafter%[[ %textafter%]]}%!nextfullcite%
181 # "...; ShortAuthor postnote..."
182 !nextcite {%next%[[%!sep% %!startlink%%!shortauthor%%!endlink%%!textafter2%%!nextcite%]]}
183 # "...; ShortAuthor ShortTitle postnote..."
184 !nextcitetitle {%next%[[%!sep% %!startlink%%!shortauthor%%!endlink%%!shorttitle%%!textafter2%%!nextcitetitle%]]}
185 # "...; prenote ShortAuthor (Year, postnote)..."
186 !nextcitet {%next%[[%!sep% %!citet%]]}
187 # "...; prenote ShortAuthor Year, postnote..."
188 !nextcitealt {%next%[[%!sep% %!citealt%]]}
189 # "...; prenote ShortAuthor, Year, postnote..."
190 !nextcitealp {%next%[[%!sep% %!citealp%]]}
191 # "...; prenote ShortAuthor, postnote..."
192 !nextauthor {%next%[[%!sep% %!citeauthor%]]}
193 # "...; prenote Year, postnote..."
194 !nextyear {%next%[[%!sep% %!citeyear%]]}
195 # "...; prenote (Year), postnote..."
196 !nextyearpar {%next%[[%!sep% %!citeyearpar%]]}
197 # "...; Key, postnote..."
198 !nextfullcite {%next%[[%!sep% %bibentry%%textafter%%!nextfullcite%]]}
200 !nextkey {%next%[[%!sep% %key%%!nextkey%]]}
203 # ACTUAL STYLE DEFINITIONS
206 # "ShortAuthor/prenote postnote; NextShortAuthor postnote..."
208 # "ShortAuthor/prenote ShortTitle postnote; NextShortAuthor ShortTitle postnote..."
209 citetitle %!citetitle%
210 # "prenote ShortAuthor (Year, postnote); prenote NextShortAuthor (Year, postnote)..."
212 # "(prenote ShortAuthor, Year, postnote)"
214 # "prenote ShortAuthor Year, postnote; prenote NextShortAuthor Year, postnote..."
216 # "prenote ShortAuthor, Year, postnote.; prenote NextShortAuthor, Year, postnote..."
218 # "prenote ShortAuthor, postnote; prenote NextShortAuthor, postnote..."
219 citeauthor %!citeauthor%
220 # "prenote Year, postnote; prenote Year, postnote..."
222 # "prenote (Year), postnote; prenote (Year), postnote..."
223 citeyearpar %!citeyearpar%
224 # "Bibliography entry." (dialog) / "Key; Key ... (full cite)" (button)
225 fullcite {%dialog%[[%_bibentry%]][[{%label%[[%!fullcite%]][[%key%%!nextkey% (%_fullcite%)]]}]]}
226 # "Add to bibliography only." (dialog) / "Key; Key ... (not cited)" (button)
227 nocite {%dialog%[[%_addtobib%]][[%key%%!nextkey% (%_notcited%)]]}