lyx_mirror/lib/citeengines/jurabib.citeengine
2017-01-04 13:30:50 +01:00

213 lines
7.7 KiB
Plaintext

# \DeclareLyXCiteEngine[jurabib.sty]{Jurabib (BibTeX)}
# DescriptionBegin
# Jurabib supports a range of author-year styles primarily suitable for law studies
# and the Humanities. It includes localizations for English, German, French, Dutch,
# Spanish and Italian.
# DescriptionEnd
# Excludes: basic | natbib | biblatex
# Author: Julien Rioux <jrioux@lyx.org>
Format 62
Requires jurabib
# The framework (biblatex|bibtex)
CiteFramework bibtex
# Cite style variants (default|authoryear|natbib)
# We provide only authoryear citations
CiteEngineType authoryear
# Default style file
DefaultBiblio jurabib
# The syntax of the cite command definitions below is:
# LyXName|alias*<!_stardesc!_stardesctooltip>[][]=latexcmd
#
# * LyXName: The LyX name as output in the LyX file. For
# portability reasons, we try to use the same
# name for same-formatted commands in the
# different engines (thus many names stem from
# natbib).
# * Alias: A (comma-separated) list of commands that fall
# back to the given LyX name in the current engine.
# This is a bit like "ObsoletedBy" in the layouts.
# * latexcmd: The actual LaTeX command that is output.
#
# Alias and latexcmd are optional. If no latexcmd is given, the
# LyXName will be output to LaTeX.
#
# Note further:
#
# * Capitalization indicates that the command also has a capitalized
# form (\Latexcmd vs. \latexcmd). These usually enforce upcasing of
# name prefixes (von Goethe => Von Goethe).
# * Brackets [] indicate the number of optional arguments (0, 1, 2).
# * The star * indicates there is a starred version of the command
# (\latexcmd* vs. \latexcmd). By default, the starred version means:
# Expand the author list even if the maxnames setting would cause
# BibTeX/Biber to shorten it with "et al.".
# If the star has a different meaning for a command, it can be
# specified in angle brackets: <!_stardesc!_stardesctooltip>.
# Maximal two translatable macro keywords, marked by the prefix '!_',
# can be given. The first points to the string that replaces the
# "Full aut&hor list" checkbox label in the Citation dialog, the
# second one an optional tooltip for this checkbox. Note that these
# two macros have to be defined in the CiteFormat section (see below),
# dropping the '!' from the prefix (see below), e.g.:
# _stardesc Starred command label
# _stardesctooltip Tooltip for the starred command checkbox.
# FIXME: support for these jurabib styles (fileformat)
# citefield []{}
# footcite [][]
# footcitetitle [][]
# footcitet [][]
# footcitep [][]
# footcitealt [][]
# footcitealp [][]
# footciteauthor [][]
# footciteyear [][]
# footciteyearpar [][]
# footfullcite [][]
#
# CITE COMMAND DEFINITIONS
#
CiteEngine authoryear
# \cite* is not implemented: use \cite instead, it's the same
cite [][]
citetitle [][]
citet [][]
citep [][]
citealt [][]
citealp [][]
citeauthor [][]
citeyear [][]
citeyearpar [][]
fullcite [][]
nocite
End
#
# CITE FORMAT
#
# The following defines how the commands are represented in the GUI
# (inset button and citation dialog) as well as in XHTML, docbook and
# plain text output.
#
CiteFormat authoryear
#
# MACROS
#
# 1. Translatable bits (need to be marked by _ prefix)
#
_notcited not cited
_addtobib Add to bibliography only.
_fullcite bibliography entry
_bibentry Bibliography entry.
_before before
_shorttitle short title
#
# 2. Macros re-used in the style definitions
#
!open (
!sep ;
!close )
# A link that lets us jump to the bibliography entry in LyXHTML
# %clean:key% will be substituted by the cite key to give a unique id
!startlink {!<a href='#LyXCite-%clean:key%'>!}
!endlink {!</a>!}
# "ShortAuthor" or "??"
!shortauthor {%shortauthor%[[%shortauthor%]][[??]]}
# "... ShortTitle" (button) / "... ShortTitle <short title>" (dialog)
!shorttitle {%shorttitle%[[ %shorttitle%]][[{%dialog%[[ <%_shorttitle%>]]}]]}
# "prenote "
!textbefore {%textbefore%[[%textbefore% ]]}
# "/prenote" (button) / "/prenote/<before>" (dialog)
!textbefore2 {%textbefore%[[/%textbefore%]][[{%dialog%[[/<%_before%>]]}]]}
# ", postnote"
!textafter {%textafter%[[, %textafter%]]}
# " postnote"
!textafter2 {%textafter%[[ %textafter%]]}
# Add a year if it exists (else "??") and possibly a modifier (as in 2017a)
!year {%year%[[%year%]][[??]]}{%modifier%[[%modifier%]]}
# "ShortAuthor/prenote postnote..."
!cite %!startlink%%!shortauthor%%!endlink%%!textbefore2%%!textafter2%%!nextcite%
# "ShortAuthor/prenote ShortTitle postnote..."
!citetitle %!startlink%%!shortauthor%%!endlink%%!textbefore2%%!shorttitle%%!textafter2%%!nextcitetitle%
# "prenote ShortAuthor (Year, postnote)..."
!citet %!textbefore%%!startlink%%!shortauthor%%!endlink% %!open%%!year%%!textafter%%!close%%!nextcitet%
# "(prenote ShortAuthor, Year, postnote)"
!citep %!open%%!citealp%%!close%
# "prenote ShortAuthor Year, postnote..."
!citealt %!textbefore%%!startlink%%!shortauthor% %!year%%!endlink%%!textafter%%!nextcitealt%
# "prenote ShortAuthor, Year, postnote..."
!citealp %!textbefore%%!startlink%%!shortauthor%, %!year%%!endlink%%!textafter%%!nextcitealp%
# "prenote ShortAuthor, postnote..."
!citeauthor %!textbefore%%!startlink%%!shortauthor%%!endlink%%!textafter%%!nextauthor%
# "prenote Year, postnote..."
!citeyear %!textbefore%%!startlink%%!year%%!endlink%%!textafter%%!nextyear%
# "prenote (Year), postnote..."
!citeyearpar %!textbefore%%!open%%!startlink%%!year%%!endlink%%!close%%!textafter%%!nextyearpar%
# "prenote in: Key, postnote..."
!fullcite {%textbefore%[[%textbefore% in: ]]}%bibentry%{%textafter%[[ %textafter%]]}%!nextfullcite%
# "...; ShortAuthor postnote..."
!nextcite {%next%[[%!sep% %!startlink%%!shortauthor%%!endlink%%!textafter2%%!nextcite%]]}
# "...; ShortAuthor ShortTitle postnote..."
!nextcitetitle {%next%[[%!sep% %!startlink%%!shortauthor%%!endlink%%!shorttitle%%!textafter2%%!nextcitetitle%]]}
# "...; prenote ShortAuthor (Year, postnote)..."
!nextcitet {%next%[[%!sep% %!citet%]]}
# "...; prenote ShortAuthor Year, postnote..."
!nextcitealt {%next%[[%!sep% %!citealt%]]}
# "...; prenote ShortAuthor, Year, postnote..."
!nextcitealp {%next%[[%!sep% %!citealp%]]}
# "...; prenote ShortAuthor, postnote..."
!nextauthor {%next%[[%!sep% %!citeauthor%]]}
# "...; prenote Year, postnote..."
!nextyear {%next%[[%!sep% %!citeyear%]]}
# "...; prenote (Year), postnote..."
!nextyearpar {%next%[[%!sep% %!citeyearpar%]]}
# "...; Key, postnote..."
!nextfullcite {%next%[[%!sep% %bibentry%%textafter%%!nextfullcite%]]}
# "...; Key..."
!nextkey {%next%[[%!sep% %key%%!nextkey%]]}
#
# ACTUAL STYLE DEFINITIONS
#
# "ShortAuthor/prenote postnote; NextShortAuthor postnote..."
cite %!cite%
# "ShortAuthor/prenote ShortTitle postnote; NextShortAuthor ShortTitle postnote..."
citetitle %!citetitle%
# "prenote ShortAuthor (Year, postnote); prenote NextShortAuthor (Year, postnote)..."
citet %!citet%
# "(prenote ShortAuthor, Year, postnote)"
citep %!citep%
# "prenote ShortAuthor Year, postnote; prenote NextShortAuthor Year, postnote..."
citealt %!citealt%
# "prenote ShortAuthor, Year, postnote.; prenote NextShortAuthor, Year, postnote..."
citealp %!citealp%
# "prenote ShortAuthor, postnote; prenote NextShortAuthor, postnote..."
citeauthor %!citeauthor%
# "prenote Year, postnote; prenote Year, postnote..."
citeyear %!citeyear%
# "prenote (Year), postnote; prenote (Year), postnote..."
citeyearpar %!citeyearpar%
# "Bibliography entry." (dialog) / "Key; Key ... (full cite)" (button)
fullcite {%dialog%[[%_bibentry%]][[{%label%[[%!fullcite%]][[%key%%!nextkey% (%_fullcite%)]]}]]}
# "Add to bibliography only." (dialog) / "Key; Key ... (not cited)" (button)
nocite {%dialog%[[%_addtobib%]][[%key%%!nextkey% (%_notcited%)]]}
End