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
26 # The syntax of the cite command definitions below is:
27 # LyXName|alias*<!_stardesc!_stardesctooltip>[][]=latexcmd
29 # * LyXName: The LyX name as output in the LyX file. For
30 # portability reasons, we try to use the same
31 # name for same-formatted commands in the
32 # different engines (thus many names stem from
34 # * Alias: A (comma-separated) list of commands that fall
35 # back to the given LyX name in the current engine.
36 # This is a bit like "ObsoletedBy" in the layouts.
37 # * latexcmd: The actual LaTeX command that is output.
39 # Alias and latexcmd are optional. If no latexcmd is given, the
40 # LyXName will be output to LaTeX.
44 # * Capitalization indicates that the command also has a capitalized
45 # form (\Latexcmd vs. \latexcmd). These usually enforce upcasing of
46 # name prefixes (von Goethe => Von Goethe).
47 # * Brackets [] indicate the number of optional arguments (0, 1, 2).
48 # * The star * indicates there is a starred version of the command
49 # (\latexcmd* vs. \latexcmd). By default, the starred version means:
50 # Expand the author list even if the maxnames setting would cause
51 # BibTeX/Biber to shorten it with "et al.".
52 # If the star has a different meaning for a command, it can be
53 # specified in angle brackets: <!_stardesc!_stardesctooltip>.
54 # Maximal two translatable macro keywords, marked by the prefix '!_',
55 # can be given. The first points to the string that replaces the
56 # "Full aut&hor list" checkbox label in the Citation dialog, the
57 # second one an optional tooltip for this checkbox. Note that these
58 # two macros have to be defined in the CiteFormat section (see below),
59 # dropping the '!' from the prefix (see below), e.g.:
60 # _stardesc Starred command label
61 # _stardesctooltip Tooltip for the starred command checkbox.
65 # FIXME: support for these jurabib styles (fileformat)
75 # footciteyearpar [][]
79 # CITE COMMAND DEFINITIONS
82 # \cite* is not implemented: use \cite instead, it's the same
100 # The following defines how the commands are represented in the GUI
101 # (inset button and citation dialog) as well as in XHTML, docbook and
104 CiteFormat authoryear
108 # 1. Translatable bits (need to be marked by _ prefix)
111 _addtobib Add to bibliography only.
112 _fullcite bibliography entry
113 _bibentry Bibliography entry.
115 _shorttitle short title
118 # 2. Macros re-used in the style definitions
124 # A link that lets us jump to the bibliography entry in LyXHTML
125 # %clean:key% will be substituted by the cite key to give a unique id
126 !startlink {!<a href='#LyXCite-%clean:key%'>!}
129 # "ShortAuthor" or "??"
130 !shortauthor {%shortauthor%[[%shortauthor%]][[??]]}
131 # "... ShortTitle" (button) / "... ShortTitle <short title>" (dialog)
132 !shorttitle {%shorttitle%[[ %shorttitle%]][[{%dialog%[[ <%_shorttitle%>]]}]]}
134 !textbefore {%textbefore%[[%textbefore% ]]}
135 # "/prenote" (button) / "/prenote/<before>" (dialog)
136 !textbefore2 {%textbefore%[[/%textbefore%]][[{%dialog%[[/<%_before%>]]}]]}
138 !textafter {%textafter%[[, %textafter%]]}
140 !textafter2 {%textafter%[[ %textafter%]]}
141 # Add a year if it exists (else "??") and possibly a modifier (as in 2017a)
142 !year {%year%[[%year%]][[??]]}{%modifier%[[%modifier%]]}
144 # "ShortAuthor/prenote postnote..."
145 !cite %!startlink%%!shortauthor%%!endlink%%!textbefore2%%!textafter2%%!nextcite%
146 # "ShortAuthor/prenote ShortTitle postnote..."
147 !citetitle %!startlink%%!shortauthor%%!endlink%%!textbefore2%%!shorttitle%%!textafter2%%!nextcitetitle%
148 # "prenote ShortAuthor (Year, postnote)..."
149 !citet %!textbefore%%!startlink%%!shortauthor%%!endlink% %!open%%!year%%!textafter%%!close%%!nextcitet%
150 # "(prenote ShortAuthor, Year, postnote)"
151 !citep %!open%%!citealp%%!close%
152 # "prenote ShortAuthor Year, postnote..."
153 !citealt %!textbefore%%!startlink%%!shortauthor% %!year%%!endlink%%!textafter%%!nextcitealt%
154 # "prenote ShortAuthor, Year, postnote..."
155 !citealp %!textbefore%%!startlink%%!shortauthor%, %!year%%!endlink%%!textafter%%!nextcitealp%
156 # "prenote ShortAuthor, postnote..."
157 !citeauthor %!textbefore%%!startlink%%!shortauthor%%!endlink%%!textafter%%!nextauthor%
158 # "prenote Year, postnote..."
159 !citeyear %!textbefore%%!startlink%%!year%%!endlink%%!textafter%%!nextyear%
160 # "prenote (Year), postnote..."
161 !citeyearpar %!textbefore%%!open%%!startlink%%!year%%!endlink%%!close%%!textafter%%!nextyearpar%
162 # "prenote in: Key, postnote..."
163 !fullcite {%textbefore%[[%textbefore% in: ]]}%bibentry%{%textafter%[[ %textafter%]]}%!nextfullcite%
165 # "...; ShortAuthor postnote..."
166 !nextcite {%next%[[%!sep% %!startlink%%!shortauthor%%!endlink%%!textafter2%%!nextcite%]]}
167 # "...; ShortAuthor ShortTitle postnote..."
168 !nextcitetitle {%next%[[%!sep% %!startlink%%!shortauthor%%!endlink%%!shorttitle%%!textafter2%%!nextcitetitle%]]}
169 # "...; prenote ShortAuthor (Year, postnote)..."
170 !nextcitet {%next%[[%!sep% %!citet%]]}
171 # "...; prenote ShortAuthor Year, postnote..."
172 !nextcitealt {%next%[[%!sep% %!citealt%]]}
173 # "...; prenote ShortAuthor, Year, postnote..."
174 !nextcitealp {%next%[[%!sep% %!citealp%]]}
175 # "...; prenote ShortAuthor, postnote..."
176 !nextauthor {%next%[[%!sep% %!citeauthor%]]}
177 # "...; prenote Year, postnote..."
178 !nextyear {%next%[[%!sep% %!citeyear%]]}
179 # "...; prenote (Year), postnote..."
180 !nextyearpar {%next%[[%!sep% %!citeyearpar%]]}
181 # "...; Key, postnote..."
182 !nextfullcite {%next%[[%!sep% %bibentry%%textafter%%!nextfullcite%]]}
184 !nextkey {%next%[[%!sep% %key%%!nextkey%]]}
187 # ACTUAL STYLE DEFINITIONS
190 # "ShortAuthor/prenote postnote; NextShortAuthor postnote..."
192 # "ShortAuthor/prenote ShortTitle postnote; NextShortAuthor ShortTitle postnote..."
193 citetitle %!citetitle%
194 # "prenote ShortAuthor (Year, postnote); prenote NextShortAuthor (Year, postnote)..."
196 # "(prenote ShortAuthor, Year, postnote)"
198 # "prenote ShortAuthor Year, postnote; prenote NextShortAuthor Year, postnote..."
200 # "prenote ShortAuthor, Year, postnote.; prenote NextShortAuthor, Year, postnote..."
202 # "prenote ShortAuthor, postnote; prenote NextShortAuthor, postnote..."
203 citeauthor %!citeauthor%
204 # "prenote Year, postnote; prenote Year, postnote..."
206 # "prenote (Year), postnote; prenote (Year), postnote..."
207 citeyearpar %!citeyearpar%
208 # "Bibliography entry." (dialog) / "Key; Key ... (full cite)" (button)
209 fullcite {%dialog%[[%_bibentry%]][[{%label%[[%!fullcite%]][[%key%%!nextkey% (%_fullcite%)]]}]]}
210 # "Add to bibliography only." (dialog) / "Key; Key ... (not cited)" (button)
211 nocite {%dialog%[[%_addtobib%]][[%key%%!nextkey% (%_notcited%)]]}