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
|
|
|
|
|
2016-12-31 18:44:32 +00:00
|
|
|
CiteFramework bibtex
|
2012-03-01 00:41:30 +00:00
|
|
|
CiteEngineType authoryear|numerical
|
2016-12-31 13:57:09 +00:00
|
|
|
DefaultBiblio authoryear:plainnat|numerical:plainnat
|
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
|
|
|
|
|
|
|
|
CiteFormat default
|
2017-01-03 14:35:57 +00:00
|
|
|
# Translatable bits
|
2012-03-01 00:41:30 +00:00
|
|
|
_notcited not cited
|
|
|
|
_addtobib Add to bibliography only.
|
|
|
|
|
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-03 14:35:57 +00:00
|
|
|
# Abbreviated author (with et al.) or "??" if there is no author
|
2012-03-01 00:41:30 +00:00
|
|
|
!abbrvauthor {%abbrvauthor%[[%abbrvauthor%]][[??]]}
|
2017-01-03 14:35:57 +00:00
|
|
|
# Prenote: "cf. "
|
2012-03-01 00:41:30 +00:00
|
|
|
!textbefore {%textbefore%[[%textbefore% ]]}
|
2017-01-03 14:35:57 +00:00
|
|
|
# Postnote: ", p. xx"
|
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-03 14:35:57 +00:00
|
|
|
# ...; Author...
|
|
|
|
!nextauthor {%next%[[%!sep% %!startlink%%!abbrvauthor%%!endlink%%!nextauthor%]]}
|
|
|
|
# ..., CiteKey...
|
|
|
|
!nextkey {%next%[[%!sep% %key%%!nextkey%]]}
|
|
|
|
# ..., Year...
|
|
|
|
!nextyear {%next%[[%!sep% %!startlink%%!year%%!endlink%%!nextyear%]]}
|
|
|
|
|
|
|
|
## The actual cite styles (identical in authoryear and numerical except for the separator) ##
|
|
|
|
# (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-03 14:35:57 +00:00
|
|
|
# Add to bibliography only. / [ID] (not cited)
|
2012-03-01 00:41:30 +00:00
|
|
|
nocite {%dialog%[[%_addtobib%]][[%key%%!nextkey% (%_notcited%)]]}
|
|
|
|
End
|
|
|
|
|
|
|
|
CiteFormat authoryear
|
2017-01-03 14:35:57 +00:00
|
|
|
# Macros
|
2013-05-13 18:29:49 +00:00
|
|
|
!open (
|
|
|
|
!sep ;
|
|
|
|
!close )
|
|
|
|
|
2017-01-03 14:35:57 +00:00
|
|
|
# Author et al. (cf. Year...
|
|
|
|
!makecitet %!startlink%%!abbrvauthor%%!endlink% %!open%%!textbefore%%!year%%!nextcitet%
|
|
|
|
# Author et al. cf. Year... [sic!]
|
|
|
|
!makecitealt %!startlink%%!abbrvauthor% %!textbefore%%!year%%!endlink%%!nextcitealt%
|
|
|
|
# Author et al., Year...
|
|
|
|
!makecitealp %!startlink%%!abbrvauthor%, %!year%%!endlink%%!nextcitealp%
|
|
|
|
|
|
|
|
# ...); Nextauthor (Year...
|
|
|
|
!nextcitet {%next%[[%!close%%!sep% %!startlink%%!abbrvauthor%%!endlink% %!open%%!year%%!nextcitet%]]}
|
|
|
|
# ...; NextAuthor et al. Year...
|
|
|
|
!nextcitealt {%next%[[%!sep% %!makecitealt%]]}
|
|
|
|
# ...; NextAuthor et al., Year...
|
|
|
|
!nextcitealp {%next%[[%!sep% %!makecitealp%]]}
|
|
|
|
|
|
|
|
## The actual cite styles (additions and modifications to default) ##
|
|
|
|
# Author (cf. Year); NextAuthor (Year, p. xx)
|
|
|
|
citet %!makecitet%%!textafter%%!close%
|
|
|
|
# (cf. Author et al., Year; NextAuthor et al., Year, p. xx)
|
|
|
|
citep %!open%%!textbefore%%!makecitealp%%!textafter%%!close%
|
|
|
|
# cf. Author et al., Year; NextAuthor et al., Year, p. xx
|
|
|
|
citealp %!textbefore%%!makecitealp%%!textafter%
|
|
|
|
# Author cf. Year; NextAuthor Year, p. xx [sic!]
|
|
|
|
citealt %!makecitealt%%!textafter%
|
|
|
|
# Author; NextAuthor, p. xx
|
2013-01-10 14:24:53 +00:00
|
|
|
citeauthor %!startlink%%!abbrvauthor%%!endlink%%!nextauthor%%!textafter%
|
2017-01-03 14:35:57 +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
|
|
|
|
|
|
|
# Fallback style: Author (cf. Year); NextAuthor (Year, p. xx)
|
|
|
|
cite %!makecitet%%!textafter%%!close%
|
2012-03-01 00:41:30 +00:00
|
|
|
End
|
|
|
|
|
|
|
|
CiteFormat numerical
|
2017-01-03 14:35:57 +00:00
|
|
|
# Macros
|
2013-05-13 18:29:49 +00:00
|
|
|
!open [
|
|
|
|
!sep ,
|
|
|
|
!close ]
|
|
|
|
|
2017-01-03 14:35:57 +00:00
|
|
|
# Author [cf. ID...
|
|
|
|
!makecitet %!abbrvauthor% %!open%%!textbefore%{%dialog%[[#ID]][[%!startlink%{%numericallabel%[[%numericallabel%]][[#%key%]]}%!endlink%]]}%!nextcitet%
|
|
|
|
# Author cf. ID...
|
|
|
|
!makecitealt %!abbrvauthor% %!textbefore%{%dialog%[[#ID]][[%!startlink%{%numericallabel%[[%numericallabel%]][[#%key%]]}%!endlink%]]}%!nextcitealt%
|
|
|
|
# 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-03 14:35:57 +00:00
|
|
|
# ...], NextAuthor [ID...
|
|
|
|
!nextcitet {%next%[[%!close%%!sep% %!abbrvauthor% %!open%%!textbefore%{%dialog%[[#ID]][[%!startlink%{%numericallabel%[[%numericallabel%]][[#%key%]]}%!endlink%]]}%!nextcitet%]]}
|
|
|
|
# ..., NextAuthor ID...
|
|
|
|
!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-03 14:35:57 +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-03 14:35:57 +00:00
|
|
|
## The actual cite styles (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-03 14:35:57 +00:00
|
|
|
# Author [cf. ID], Nextauthor [NextID, p. xx]
|
|
|
|
citet %!makecitet%%!textafter%%!close%
|
|
|
|
# cf. ID, NextID, p. xx
|
2012-03-01 00:41:30 +00:00
|
|
|
citealp %!textbefore%%!hashkey%%!textafter%
|
2017-01-03 14:35:57 +00:00
|
|
|
# Author cf. ID, NextAuthor ID, p. xx
|
|
|
|
citealt %!makecitealt%%!textafter%
|
|
|
|
# Author, NextAuthor
|
2013-01-10 14:24:53 +00:00
|
|
|
citeauthor %!startlink%%!abbrvauthor%%!endlink%%!nextauthor%
|
2017-01-03 14:35:57 +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
|
|
|
|
|
|
|
# Fallback style: [cf. ID, NextID, p. xx]
|
|
|
|
cite %!open%%!textbefore%%!hashkey%%!textafter%%!close%
|
2012-03-01 00:41:30 +00:00
|
|
|
End
|