2016-12-31 08:28:51 +00:00
|
|
|
# \DeclareLyXCiteEngine[natbib.sty]{Natbib (BibTeX)}
|
2012-03-01 00:41:30 +00:00
|
|
|
# DescriptionBegin
|
2016-12-31 08:28:51 +00:00
|
|
|
# Natbib supports a range of both author-year and numerical styles mainly
|
2017-01-01 07:36:13 +00:00
|
|
|
# aimed at the Humanities. It features automatic sorting and merging of
|
|
|
|
# numerical citations, annotations, capitalization of the `van' part of
|
2016-12-31 08:28:51 +00:00
|
|
|
# author names, shortened and full author lists, and more.
|
2012-03-01 00:41:30 +00:00
|
|
|
# DescriptionEnd
|
2016-12-31 18:44:32 +00:00
|
|
|
# Excludes: basic | jurabib | biblatex
|
2012-03-01 00:41:30 +00:00
|
|
|
|
|
|
|
# Author: Julien Rioux <jrioux@lyx.org>
|
|
|
|
|
2016-10-22 07:25:01 +00:00
|
|
|
Format 62
|
2012-03-01 00:41:30 +00:00
|
|
|
|
|
|
|
Requires natbib
|
|
|
|
|
2017-01-04 12:30:50 +00:00
|
|
|
# The framework (biblatex|bibtex)
|
2016-12-31 18:44:32 +00:00
|
|
|
CiteFramework bibtex
|
2017-01-04 12:30:50 +00:00
|
|
|
|
|
|
|
# Cite style variants (default|authoryear|natbib)
|
|
|
|
# We provide both authoryear and numerical citations
|
2012-03-01 00:41:30 +00:00
|
|
|
CiteEngineType authoryear|numerical
|
2017-01-04 12:30:50 +00:00
|
|
|
|
|
|
|
# Default style files for either engine type
|
2016-12-31 13:57:09 +00:00
|
|
|
DefaultBiblio authoryear:plainnat|numerical:plainnat
|
2012-03-01 00:41:30 +00:00
|
|
|
|
2017-01-04 12:30:50 +00:00
|
|
|
|
|
|
|
# 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.
|
|
|
|
|
|
|
|
#
|
|
|
|
# CITE COMMAND DEFINITIONS for either engine type
|
|
|
|
#
|
2012-03-01 00:41:30 +00:00
|
|
|
CiteEngine authoryear
|
|
|
|
Citet*[][]
|
|
|
|
Citep*[][]
|
|
|
|
Citealt*[][]
|
|
|
|
Citealp*[][]
|
|
|
|
Citeauthor*[]
|
|
|
|
citeyear[]
|
|
|
|
citeyearpar[][]
|
|
|
|
nocite
|
|
|
|
End
|
|
|
|
|
|
|
|
CiteEngine numerical
|
|
|
|
Citep*[][]
|
|
|
|
Citealp*[][]
|
|
|
|
Citet*[][]
|
|
|
|
Citealt*[][]
|
|
|
|
Citeauthor*
|
|
|
|
citeyearpar[][]
|
|
|
|
citeyear
|
|
|
|
nocite
|
|
|
|
End
|
|
|
|
|
2017-01-04 12:30:50 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
#
|
|
|
|
# There are common definitions (default) and specific definitions for
|
|
|
|
# either cite engine type (which overwrite existing defaults.
|
|
|
|
#
|
2012-03-01 00:41:30 +00:00
|
|
|
CiteFormat default
|
2017-01-04 12:30:50 +00:00
|
|
|
#
|
|
|
|
# MACROS
|
|
|
|
#
|
|
|
|
# 1. Translatable bits (need to be marked by _ prefix)
|
|
|
|
#
|
2012-03-01 00:41:30 +00:00
|
|
|
_notcited not cited
|
|
|
|
_addtobib Add to bibliography only.
|
|
|
|
|
2017-01-04 12:30:50 +00:00
|
|
|
#
|
|
|
|
# 2. Macros re-used in the style definitions
|
|
|
|
#
|
2017-01-03 14:35:57 +00:00
|
|
|
# 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
|
2013-03-27 19:46:32 +00:00
|
|
|
!startlink {!<a href='#LyXCite-%clean:key%'>!}
|
2013-01-10 14:24:53 +00:00
|
|
|
!endlink {!</a>!}
|
|
|
|
|
2017-01-04 12:30:50 +00:00
|
|
|
# "Author et al." or "??"
|
2012-03-01 00:41:30 +00:00
|
|
|
!abbrvauthor {%abbrvauthor%[[%abbrvauthor%]][[??]]}
|
2017-01-04 12:30:50 +00:00
|
|
|
# "prenote "
|
2012-03-01 00:41:30 +00:00
|
|
|
!textbefore {%textbefore%[[%textbefore% ]]}
|
2017-01-04 12:30:50 +00:00
|
|
|
# ", postnote"
|
2012-03-01 00:41:30 +00:00
|
|
|
!textafter {%textafter%[[, %textafter%]]}
|
2017-01-03 14:35:57 +00:00
|
|
|
# Add a year if it exists (else "??") and possibly a modifier (as in 2017a)
|
2013-05-13 18:58:12 +00:00
|
|
|
!year {%year%[[%year%]][[??]]}{%modifier%[[%modifier%]]}
|
2012-03-01 00:41:30 +00:00
|
|
|
|
2017-01-04 12:30:50 +00:00
|
|
|
# "...; Author..."
|
2017-01-03 14:35:57 +00:00
|
|
|
!nextauthor {%next%[[%!sep% %!startlink%%!abbrvauthor%%!endlink%%!nextauthor%]]}
|
2017-01-04 12:30:50 +00:00
|
|
|
# "..., CiteKey..."
|
2017-01-03 14:35:57 +00:00
|
|
|
!nextkey {%next%[[%!sep% %key%%!nextkey%]]}
|
2017-01-04 12:30:50 +00:00
|
|
|
# "..., Year..."
|
2017-01-03 14:35:57 +00:00
|
|
|
!nextyear {%next%[[%!sep% %!startlink%%!year%%!endlink%%!nextyear%]]}
|
|
|
|
|
2017-01-04 12:30:50 +00:00
|
|
|
#
|
|
|
|
# ACTUAL STYLE DEFINITIONS
|
|
|
|
#
|
|
|
|
# (identical in authoryear and numerical)
|
|
|
|
#
|
|
|
|
|
|
|
|
# "(cf. Year; NextYear, p. xx)" [Authoryear] / "(cf. Year, NextYear, p. xx)" [Numerical]
|
2013-01-10 14:24:53 +00:00
|
|
|
citeyearpar %!open%%!textbefore%%!startlink%%!year%%!endlink%%!nextyear%%!textafter%%!close%
|
2017-01-04 12:30:50 +00:00
|
|
|
# "Add to bibliography only." (dialog) / "[ID] (not cited)" (button)
|
2012-03-01 00:41:30 +00:00
|
|
|
nocite {%dialog%[[%_addtobib%]][[%key%%!nextkey% (%_notcited%)]]}
|
|
|
|
End
|
|
|
|
|
|
|
|
CiteFormat authoryear
|
2017-01-04 12:30:50 +00:00
|
|
|
#
|
|
|
|
# MACROS
|
|
|
|
#
|
2013-05-13 18:29:49 +00:00
|
|
|
!open (
|
|
|
|
!sep ;
|
|
|
|
!close )
|
|
|
|
|
2017-01-04 12:30:50 +00:00
|
|
|
# "Author et al. (cf. Year..."
|
2017-01-03 14:35:57 +00:00
|
|
|
!makecitet %!startlink%%!abbrvauthor%%!endlink% %!open%%!textbefore%%!year%%!nextcitet%
|
2017-01-04 12:30:50 +00:00
|
|
|
# "Author et al. cf. Year..." [sic!]
|
2017-01-03 14:35:57 +00:00
|
|
|
!makecitealt %!startlink%%!abbrvauthor% %!textbefore%%!year%%!endlink%%!nextcitealt%
|
2017-01-04 12:30:50 +00:00
|
|
|
# "Author et al., Year..."
|
2017-01-03 14:35:57 +00:00
|
|
|
!makecitealp %!startlink%%!abbrvauthor%, %!year%%!endlink%%!nextcitealp%
|
|
|
|
|
2017-01-04 12:30:50 +00:00
|
|
|
# "...); Nextauthor (Year..."
|
2017-01-03 14:35:57 +00:00
|
|
|
!nextcitet {%next%[[%!close%%!sep% %!startlink%%!abbrvauthor%%!endlink% %!open%%!year%%!nextcitet%]]}
|
2017-01-04 12:30:50 +00:00
|
|
|
# "...; NextAuthor et al. Year..."
|
2017-01-03 14:35:57 +00:00
|
|
|
!nextcitealt {%next%[[%!sep% %!makecitealt%]]}
|
2017-01-04 12:30:50 +00:00
|
|
|
# "...; NextAuthor et al., Year..."
|
2017-01-03 14:35:57 +00:00
|
|
|
!nextcitealp {%next%[[%!sep% %!makecitealp%]]}
|
|
|
|
|
2017-01-04 12:30:50 +00:00
|
|
|
#
|
|
|
|
# ACTUAL STYLE DEFINITIONS
|
|
|
|
#
|
|
|
|
# (additions and modifications to default)
|
|
|
|
#
|
|
|
|
|
|
|
|
# "Author (cf. Year); NextAuthor (Year, p. xx)"
|
2017-01-03 14:35:57 +00:00
|
|
|
citet %!makecitet%%!textafter%%!close%
|
2017-01-04 12:30:50 +00:00
|
|
|
# "(cf. Author et al., Year; NextAuthor et al., Year, p. xx)"
|
2017-01-03 14:35:57 +00:00
|
|
|
citep %!open%%!textbefore%%!makecitealp%%!textafter%%!close%
|
2017-01-04 12:30:50 +00:00
|
|
|
# "cf. Author et al., Year; NextAuthor et al., Year, p. xx"
|
2017-01-03 14:35:57 +00:00
|
|
|
citealp %!textbefore%%!makecitealp%%!textafter%
|
2017-01-04 12:30:50 +00:00
|
|
|
# "Author cf. Year; NextAuthor Year, p. xx" [sic!]
|
2017-01-03 14:35:57 +00:00
|
|
|
citealt %!makecitealt%%!textafter%
|
2017-01-04 12:30:50 +00:00
|
|
|
# "Author; NextAuthor, p. xx"
|
2013-01-10 14:24:53 +00:00
|
|
|
citeauthor %!startlink%%!abbrvauthor%%!endlink%%!nextauthor%%!textafter%
|
2017-01-04 12:30:50 +00:00
|
|
|
# "Year; NextYear, p. xx"
|
2013-01-10 14:24:53 +00:00
|
|
|
citeyear %!startlink%%!year%%!endlink%%!nextyear%%!textafter%
|
2017-01-03 14:35:57 +00:00
|
|
|
|
2017-01-04 12:30:50 +00:00
|
|
|
# Fallback style: "Author (cf. Year); NextAuthor (Year, p. xx)"
|
2017-01-03 14:35:57 +00:00
|
|
|
cite %!makecitet%%!textafter%%!close%
|
2012-03-01 00:41:30 +00:00
|
|
|
End
|
|
|
|
|
|
|
|
CiteFormat numerical
|
2017-01-04 12:30:50 +00:00
|
|
|
#
|
|
|
|
# MACROS
|
|
|
|
#
|
2013-05-13 18:29:49 +00:00
|
|
|
!open [
|
|
|
|
!sep ,
|
|
|
|
!close ]
|
|
|
|
|
2017-01-04 12:30:50 +00:00
|
|
|
# "Author [cf. ID..."
|
2017-01-03 14:35:57 +00:00
|
|
|
!makecitet %!abbrvauthor% %!open%%!textbefore%{%dialog%[[#ID]][[%!startlink%{%numericallabel%[[%numericallabel%]][[#%key%]]}%!endlink%]]}%!nextcitet%
|
2017-01-04 12:30:50 +00:00
|
|
|
# "Author cf. ID..."
|
2017-01-03 14:35:57 +00:00
|
|
|
!makecitealt %!abbrvauthor% %!textbefore%{%dialog%[[#ID]][[%!startlink%{%numericallabel%[[%numericallabel%]][[#%key%]]}%!endlink%]]}%!nextcitealt%
|
2017-01-04 12:30:50 +00:00
|
|
|
# "ID..."
|
2013-05-14 19:50:13 +00:00
|
|
|
!hashkey {%dialog%[[#ID]][[%!startlink%{%numericallabel%[[%numericallabel%]][[#%key%]]}%!endlink%%!nexthashkey%]]}
|
2012-03-01 00:41:30 +00:00
|
|
|
|
2017-01-04 12:30:50 +00:00
|
|
|
# "...], NextAuthor [ID..."
|
2017-01-03 14:35:57 +00:00
|
|
|
!nextcitet {%next%[[%!close%%!sep% %!abbrvauthor% %!open%%!textbefore%{%dialog%[[#ID]][[%!startlink%{%numericallabel%[[%numericallabel%]][[#%key%]]}%!endlink%]]}%!nextcitet%]]}
|
2017-01-04 12:30:50 +00:00
|
|
|
# "..., NextAuthor ID..."
|
2017-01-03 14:35:57 +00:00
|
|
|
!nextcitealt {%next%[[%!sep% %!abbrvauthor% {%dialog%[[#ID]][[%!startlink%{%numericallabel%[[%numericallabel%]][[#%key%]]}%!endlink%]]}%!nextcitealt%]]}
|
|
|
|
# FIXME: What is this?
|
2012-03-01 00:41:30 +00:00
|
|
|
!nexthashid {%next%[[%!sep% #ID%!nexthashid%]]}
|
2017-01-04 12:30:50 +00:00
|
|
|
# "..., NextID..."
|
2013-05-14 19:50:13 +00:00
|
|
|
!nexthashkey {%next%[[%!sep% %!startlink%{%numericallabel%[[%numericallabel%]][[#%key%]]}%!endlink%%!nexthashkey%]]}
|
2012-03-01 00:41:30 +00:00
|
|
|
|
2017-01-04 12:30:50 +00:00
|
|
|
#
|
|
|
|
# ACTUAL STYLE DEFINITIONS
|
|
|
|
#
|
|
|
|
# (additions and modifications to default)
|
|
|
|
#
|
|
|
|
|
|
|
|
# "[cf. ID, NextID, p. xx]"
|
2012-03-01 00:41:30 +00:00
|
|
|
citep %!open%%!textbefore%%!hashkey%%!textafter%%!close%
|
2017-01-04 12:30:50 +00:00
|
|
|
# "Author [cf. ID], Nextauthor [NextID, p. xx]"
|
2017-01-03 14:35:57 +00:00
|
|
|
citet %!makecitet%%!textafter%%!close%
|
2017-01-04 12:30:50 +00:00
|
|
|
# "cf. ID, NextID, p. xx"
|
2012-03-01 00:41:30 +00:00
|
|
|
citealp %!textbefore%%!hashkey%%!textafter%
|
2017-01-04 12:30:50 +00:00
|
|
|
# "Author cf. ID, NextAuthor ID, p. xx"
|
2017-01-03 14:35:57 +00:00
|
|
|
citealt %!makecitealt%%!textafter%
|
2017-01-04 12:30:50 +00:00
|
|
|
# "Author, NextAuthor"
|
2013-01-10 14:24:53 +00:00
|
|
|
citeauthor %!startlink%%!abbrvauthor%%!endlink%%!nextauthor%
|
2017-01-04 12:30:50 +00:00
|
|
|
# "Year, NextYear"
|
2013-01-10 14:24:53 +00:00
|
|
|
citeyear %!startlink%%!year%%!endlink%%!nextyear%
|
2017-01-03 14:35:57 +00:00
|
|
|
|
2017-01-04 12:30:50 +00:00
|
|
|
# Fallback style: "[cf. ID, NextID, p. xx]"
|
2017-01-03 14:35:57 +00:00
|
|
|
cite %!open%%!textbefore%%!hashkey%%!textafter%%!close%
|
2012-03-01 00:41:30 +00:00
|
|
|
End
|