lyx_mirror/lib/citeengines/natbib.citeengine
Juergen Spitzmueller dc9efe3d47 Add a CiteFramework tag
This is to distinguish the biblatex and bibtex paradigms
2017-01-01 08:07:04 +01:00

108 lines
3.3 KiB
Plaintext

# \DeclareLyXCiteEngine[natbib.sty]{Natbib (BibTeX)}
# DescriptionBegin
# Natbib supports a range of both author-year and numerical styles mainly
# aimed at the Humanities. It features automatic sorting and merging of
# numerical citations, annotations, capitalization of the `van' part of
# author names, shortened and full author lists, and more.
# DescriptionEnd
# Excludes: basic | jurabib | biblatex
# Author: Julien Rioux <jrioux@lyx.org>
Format 62
Requires natbib
CiteFramework bibtex
CiteEngineType authoryear|numerical
DefaultBiblio authoryear:plainnat|numerical:plainnat
CiteEngine authoryear
Citet*[][]
Citep*[][]
Citealt*[][]
Citealp*[][]
Citeauthor*[]
citeyear[]
citeyearpar[][]
nocite
End
CiteEngine numerical
Citep*[][]
Citealp*[][]
Citet*[][]
Citealt*[][]
Citeauthor*
citeyearpar[][]
citeyear
nocite
End
CiteFormat default
# translatable bits
_notcited not cited
_addtobib Add to bibliography only.
# macros
!startlink {!<a href='#LyXCite-%clean:key%'>!}
!endlink {!</a>!}
!nextauthor {%next%[[%!sep% %!startlink%%!abbrvauthor%%!endlink%%!nextauthor%]]}
!nextkey {%next%[[%!sep% %key%%!nextkey%]]}
!nextyear {%next%[[%!sep% %!startlink%%!year%%!endlink%%!nextyear%]]}
!abbrvauthor {%abbrvauthor%[[%abbrvauthor%]][[??]]}
!textbefore {%textbefore%[[%textbefore% ]]}
!textafter {%textafter%[[, %textafter%]]}
!year {%year%[[%year%]][[??]]}{%modifier%[[%modifier%]]}
# cite styles
citet %!citet%%!textafter%%!close%
citealt %!citealt%%!textafter%
citeyearpar %!open%%!textbefore%%!startlink%%!year%%!endlink%%!nextyear%%!textafter%%!close%
nocite {%dialog%[[%_addtobib%]][[%key%%!nextkey% (%_notcited%)]]}
End
CiteFormat authoryear
!open (
!sep ;
!close )
!citet %!startlink%%!abbrvauthor%%!endlink% %!open%%!textbefore%%!year%%!nextcitet%
!citealt %!startlink%%!abbrvauthor% %!textbefore%%!year%%!endlink%%!nextcitealt%
!citealp %!startlink%%!abbrvauthor%, %!year%%!endlink%%!nextcitealp%
!nextcitet {%next%[[%!close%%!sep% %!citet%]]}
!nextcitealt {%next%[[%!sep% %!citealt%]]}
!nextcitealp {%next%[[%!sep% %!citealp%]]}
cite %!citet%%!textafter%%!close%
citep %!open%%!textbefore%%!citealp%%!textafter%%!close%
citealp %!textbefore%%!citealp%%!textafter%
citeauthor %!startlink%%!abbrvauthor%%!endlink%%!nextauthor%%!textafter%
citeyear %!startlink%%!year%%!endlink%%!nextyear%%!textafter%
End
CiteFormat numerical
!open [
!sep ,
!close ]
!citet %!abbrvauthor% %!open%%!textbefore%{%dialog%[[#ID]][[%!startlink%{%numericallabel%[[%numericallabel%]][[#%key%]]}%!endlink%]]}%!nextcitet%
!citealt %!abbrvauthor% %!textbefore%{%dialog%[[#ID]][[%!startlink%{%numericallabel%[[%numericallabel%]][[#%key%]]}%!endlink%]]}%!nextcitealt%
!hashkey {%dialog%[[#ID]][[%!startlink%{%numericallabel%[[%numericallabel%]][[#%key%]]}%!endlink%%!nexthashkey%]]}
!nextcitet {%next%[[%!close%%!sep% %!citet%]]}
!nextcitealt {%next%[[%!sep% %!citealt%]]}
!nexthashid {%next%[[%!sep% #ID%!nexthashid%]]}
!nexthashkey {%next%[[%!sep% %!startlink%{%numericallabel%[[%numericallabel%]][[#%key%]]}%!endlink%%!nexthashkey%]]}
cite %!open%%!textbefore%%!hashkey%%!textafter%%!close%
citep %!open%%!textbefore%%!hashkey%%!textafter%%!close%
citealp %!textbefore%%!hashkey%%!textafter%
citeauthor %!startlink%%!abbrvauthor%%!endlink%%!nextauthor%
citeyear %!startlink%%!year%%!endlink%%!nextyear%
End