]> git.lyx.org Git - lyx.git/blobdiff - lib/citeengines/biblatex-natbib.citeengine
Adapt citengine to current layout format.
[lyx.git] / lib / citeengines / biblatex-natbib.citeengine
index 54c43567334a96381c760eb26f64d7e60624457b..c33ff0e3c6c5945f587296ff84a2e154a101c276 100644 (file)
@@ -7,11 +7,10 @@
 #   than normal Biblatex. As with normal Biblatex, the use of 'biber'
 #   as Bibliography processor is advised.
 # DescriptionEnd
-# Excludes: basic | jurabib | biblatex | natbib
 
 # Author: Jürgen Spitzmüller <spitz@lyx.org>
 
-Format 63
+Format 64
 
 Requires biblatex
 
@@ -49,6 +48,8 @@ MaxCiteNames 3
 #
 # Note further:
 #
+# * The LyXName "keyonly" has a special meaning: only the citation key,
+#   without any latex command, is output.
 # * Capitalization indicates that the command also has a capitalized
 #   form (\Latexcmd vs. \latexcmd). These usually enforce upcasing of
 #   name prefixes (von Goethe => Von Goethe).
@@ -67,6 +68,8 @@ MaxCiteNames 3
 #   dropping the '!' from the prefix (see below), e.g.:
 #   _stardesc Starred command label
 #   _stardesctooltip Tooltip for the starred command checkbox.
+# * A trailing $ indicates that a command features "qualified citation
+#   lists" (a specific Biblatex feature)
 
 #
 # CITE COMMAND DEFINITIONS for either engine type
@@ -83,20 +86,21 @@ CiteEngine authoryear
        citeyearpar[][]
        citeyear=cite*
        citebyear[][]=citeyear
-       Footcite[][]=smartcite
-       Autocite[][]
+       Footcite$[][]=smartcite
+       Autocite$[][]
        citetitle*<!_citetitlestar!_citetitlestartooltip>[][]
        fullcite[][]
        footfullcite[][]
        nocite
+       keyonly
 End
 
 CiteEngine numerical
        Citep|citealp,citealt*[][]
        Citet|textcite*[][]
        supercite
-       Footcite[][]=smartcite
-       Autocite[][]
+       Footcite$[][]=smartcite
+       Autocite$[][]
        Citeauthor[][]*
        citeyearpar[][]
        citeyear|citebyear[][]
@@ -104,6 +108,7 @@ CiteEngine numerical
        fullcite[][]
        footfullcite[][]
        nocite
+       keyonly
 End
 
 
@@ -118,6 +123,10 @@ End
 # There are common definitions (default) and specific definitions for
 # either cite engine type (which overwrite existing defaults.
 #
+
+# Input standard format definitions for the bibliography
+Input stdciteformats.inc
+
 CiteFormat default
        #
        # MACROS
@@ -127,6 +136,8 @@ CiteFormat default
        #
        _notcited not cited
        _addtobib Add to bibliography only.
+       _keyonly Key only.
+       _key Key
        _finaland , and 
        _footnote Footnote
        _foot Foot
@@ -163,11 +174,19 @@ CiteFormat default
        !smartsep {%second%[[{%next%[[%_namesep%]][[%_pairnamesep%]]}]][[{%next%[[%_namesep%]][[%_lastnamesep%]]}]]}
 
        # "Author et al." or "??"
-       !abbrvauthor {%abbrvauthor%[[%abbrvauthor%]][[??]]}
+       !abbrvciteauthor {%abbrvciteauthor%[[%abbrvciteauthor%]][[??]]}
+       # "Author, ..." or "??"
+       !fullciteauthor {%fullciteauthor%[[%fullciteauthor%]][[??]]}
+       # Handle starred command: abbr. or full author list
+       !makeauthor {%ifstar%[[%!fullciteauthor%]][[%!abbrvciteauthor%]]}
        # "prenote "
        !textbefore {%textbefore%[[%textbefore% ]]}
        # ", postnote"
        !textafter {%textafter%[[, %textafter%]]}
+       # "prenote " (for qualified lists)
+       !ctextbefore {%curpretext%[[%curpretext% ]]}
+       # ", postnote" (for qualified lists)
+       !ctextafter {%curposttext%[[, %curposttext%]]}
        # Add a year if it exists (else "??") and possibly a modifier (as in 2017a)
        !makeyear {%year%[[%year%]][[??]]}{%modifier%[[%modifier%]]}
        # Add a year if it exists (else "??") and indicate a possible modifier (as in 2017[a])
@@ -182,7 +201,7 @@ CiteFormat default
        !fullcite %bibentry%%!nextfullcite%
 
        # "...; Author..."
-       !nextauthor {%next%[[%!sep% %!startlink%%!abbrvauthor%%!endlink%%!nextauthor%]]}
+       !nextauthor {%next%[[%!sep% %!startlink%%!makeauthor%%!endlink%%!nextauthor%]]}
        # "..., CiteKey..."
        !nextkey {%next%[[%!sep% %key%%!nextkey%]]}
        # ".., Year..." (including extra label, as in 2017a)
@@ -203,7 +222,7 @@ CiteFormat default
        #
 
        # "cf. Author; NextAuthor, p. xx"
-       citeauthor %!textbefore%%!startlink%%!abbrvauthor%%!endlink%%!nextauthor%%!textafter%
+       citeauthor %!textbefore%%!startlink%%!makeauthor%%!endlink%%!nextauthor%%!textafter%
        # "cf. Year; NextYear, S. xx" [Authoryear] / "cf. Year, NextYear, S. xx" [Numerical]
        citeyear %!textbefore%%!startlink%%!myear%%!endlink%%!nextmyear%%!textafter%
        # "cf. Year; Nextyear, p. xx" (without any extra label)
@@ -218,6 +237,8 @@ CiteFormat default
        footfullcite {%dialog%[[%_footnote%]][[%_foot%]]}: {%dialog%[[%_bibentry%]][[{%label%[[%!fullcite%]][[%key%%!nextkey% (%_fullcite%)]]}]]}
        # "Add to bibliography only." (dialog) / "[ID] (not cited)" (button)
        nocite {%dialog%[[%_addtobib%]][[%key%%!nextkey% (%_notcited%)]]}
+       # Output only the key
+       keyonly {%dialog%[[%_keyonly%]][[%_key%: %key%%!nextkey%]]}
 End
 
 CiteFormat authoryear
@@ -228,17 +249,21 @@ CiteFormat authoryear
        !sep ;
        !close )
 
+       # "cf. Author et. al Year..."
+       !makecite %!ctextbefore%%!startlink%%!abbrvciteauthor% %!makeyear%%!endlink%%!ctextafter%%!nextcite%
        # "Author et al. (cf. Year..."
-       !makecitet %!startlink%%!abbrvauthor%%!endlink% %!open%%!textbefore%%!makeyear%%!nextcitet%
+       !makecitet %!startlink%%!makeauthor%%!endlink% %!open%%!textbefore%%!makeyear%%!nextcitet%
        # "cf. Author et al. Year..."
-       !makecitealt  %!textbefore%%!startlink%%!abbrvauthor% %!makeyear%%!endlink%%!nextcitealt%
+       !makecitealt  %!textbefore%%!startlink%%!makeauthor% %!makeyear%%!endlink%%!nextcitealt%
        # "Author et al., Year..."
-       !makecitealp %!startlink%%!abbrvauthor%, %!makeyear%%!endlink%%!nextcitealp%
+       !makecitealp %!startlink%%!makeauthor%, %!makeyear%%!endlink%%!nextcitealp%
 
+       # "...; Nextauthor Year..."
+       !nextcite {%next%[[%!sep% %!makecite%]]}
        # "...), [and] Nextauthor (Year..."
-       !nextcitet {%next%[[%!close%%!smartsep%%!startlink%%!abbrvauthor%%!endlink% %!open%%!makeyear%%!nextcitet%]]}
+       !nextcitet {%next%[[%!close%%!smartsep%%!startlink%%!makeauthor%%!endlink% %!open%%!makeyear%%!nextcitet%]]}
        # "...; NextAuthor et al. Year..."
-       !nextcitealt {%next%[[%!sep% %!startlink%%!abbrvauthor% %!makeyear%%!endlink%%!nextcitealt%]]}
+       !nextcitealt {%next%[[%!sep% %!startlink%%!makeauthor% %!makeyear%%!endlink%%!nextcitealt%]]}
        # "...; NextAuthor et al., Year..."
        !nextcitealp {%next%[[%!sep% %!makecitealp%]]}
 
@@ -257,9 +282,9 @@ CiteFormat authoryear
        # "cf. Author Year; NextAuthor Year, p. xx" [NB: textbefore position differs from real natbib!]
        citealt %!makecitealt%%!textafter%
        # "Footnote: cf. Author A Year; Author B Year, p. xx."
-       footcite {%dialog%[[%_footnote%]][[%_foot%]]}: %!textbefore%%!makecitealp%%!textafter%.
+       footcite {%dialog%[[%_footnote%]][[%_foot%]]}: %!textbefore%%!makecite%%!textafter%.
        # "Auto: (cf. Author A Year; Author B Year, p. xx)"
-       autocite {%dialog%[[%_autocite%]][[%_auto%]]}: %!open%%!textbefore%%!makecitealp%%!textafter%%!close%
+       autocite {%dialog%[[%_autocite%]][[%_auto%]]}: %!open%%!textbefore%%!makecite%%!textafter%%!close%
 
        # Fallback style: "Author A (cf. Year),[ and] Author B (Year, p. xx)"
        cite %!makecitet%%!textafter%%!close%
@@ -282,14 +307,16 @@ CiteFormat numerical
        !close ]
 
        # "Author [cf. ID..."
-       !makecitet %!abbrvauthor% %!open%%!textbefore%{%dialog%[[#ID]][[%!startlink%{%numericallabel%[[%numericallabel%]][[#%key%]]}%!endlink%]]}%!nextcitet%
+       !makecitet %!makeauthor% %!open%%!textbefore%{%dialog%[[#ID]][[%!startlink%{%numericallabel%[[%numericallabel%]][[#%key%]]}%!endlink%]]}%!nextcitet%
        # "ID..."
        !makecitealt {%dialog%[[#ID]][[%!startlink%{%numericallabel%[[%numericallabel%]][[#%key%]]}%!endlink%]]}%!nextcitealt%
        # "ID..."
        !hashkey {%dialog%[[#ID]][[%!startlink%{%numericallabel%[[%numericallabel%]][[#%key%]]}%!endlink%%!nexthashkey%]]}
+       # "ID"
+       !makekey %!ctextbefore%{%dialog%[[#ID]][[%!startlink%{%numericallabel%[[%numericallabel%]][[#%key%]]}%!endlink%]]}%!ctextafter%%!nextkey%
 
        # "...], [and] NextAuthor [ID..."
-       !nextcitet {%next%[[%!close%%!smartsep%%!abbrvauthor% %!open%%!textbefore%{%dialog%[[#ID]][[%!startlink%{%numericallabel%[[%numericallabel%]][[#%key%]]}%!endlink%]]}%!nextcitet%]]}
+       !nextcitet {%next%[[%!close%%!smartsep%%!makeauthor% %!open%%!textbefore%{%dialog%[[#ID]][[%!startlink%{%numericallabel%[[%numericallabel%]][[#%key%]]}%!endlink%]]}%!nextcitet%]]}
        # "..., ID..."
        !nextcitealt {%next%[[%!sep% %!makecitealt%]]}
        # FIXME: What is this?
@@ -297,7 +324,9 @@ CiteFormat numerical
        # "..., NextID..."
        !nexthashkey {%next%[[%!sep% %!startlink%{%numericallabel%[[%numericallabel%]][[#%key%]]}%!endlink%%!nexthashkey%]]}
        # "...); Nextauthor [ID..."
-       !nextcitet {%next%[[%!close%%!smartsep%%!abbrvauthor% %!open%{%dialog%[[#ID]][[%!startlink%{%numericallabel%[[%numericallabel%]][[#%key%]]}%!endlink%]]}%!nextcitet%]]}
+       !nextcitet {%next%[[%!close%%!smartsep%%!makeauthor% %!open%{%dialog%[[#ID]][[%!startlink%{%numericallabel%[[%numericallabel%]][[#%key%]]}%!endlink%]]}%!nextcitet%]]}
+       # "..., NextID..."
+       !nextkey {%next%[[%!sep% %!ctextbefore%{%dialog%[[#ID]][[%!startlink%{%numericallabel%[[%numericallabel%]][[#%key%]]}%!endlink%]]}%!ctextafter%%!nextkey%]]}
 
        #
        # ACTUAL STYLE DEFINITIONS