]> git.lyx.org Git - lyx.git/blobdiff - lib/citeengines/biblatex.citeengine
Adapt citengine to current layout format.
[lyx.git] / lib / citeengines / biblatex.citeengine
index 66cbfe3355bce8144ccd0b7c3e99cd70bb86c22b..e6d6db60d28fd5f475c5309d4289b8c37550f687 100644 (file)
@@ -8,7 +8,7 @@
 
 # Author: Jürgen Spitzmüller <spitz@lyx.org>
 
-Format 63
+Format 64
 
 Requires biblatex
 
@@ -44,6 +44,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).
@@ -62,38 +64,42 @@ MaxCiteNames 3
 #   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
 #
 CiteEngine authoryear
-       Cite|citealt,citealp[][]
-       Citet[][]=textcite
-       Citep[][]=parencite
+       Cite$|citealt,citealp[][]
+       Citet$[][]=textcite
+       Citep$[][]=parencite
        Citeauthor*<!_citeauthorstar!_citeauthorstartooltip>[][]
        citeyearpar[][]=parencite*
        citeyear[][]=cite*
        citebyear[][]=citeyear
-       Footcite[][]=smartcite
-       Autocite[][]
+       Footcite$[][]=smartcite
+       Autocite$[][]
        citetitle*<!_citetitlestar!_citetitlestartooltip>[][]
        fullcite[][]
        footfullcite[][]
        nocite
+       keyonly
 End
 
 CiteEngine numerical
-       cite|parencite,citep,citealt,citealp[][]
-       Citet[][]=textcite
+       cite$|parencite,citep,citealt,citealp[][]
+       Citet$[][]=textcite
        supercite
-       Footcite[][]=smartcite
-       Autocite[][]
+       Footcite$[][]=smartcite
+       Autocite$[][]
        Citeauthor*<!_citeauthorstar!_citeauthorstartooltip>[][]
        citeyear|parencite*,citebyear[][]=citeyear*
        citetitle*<!_citetitlestar!_citetitlestartooltip>[][]
        fullcite[][]
        footfullcite[][]
        nocite
+       keyonly
 End
 
 
@@ -108,6 +114,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
@@ -117,6 +127,8 @@ CiteFormat default
        #
        _notcited not cited
        _addtobib Add to bibliography only.
+       _keyonly Key only.
+       _key Key
        _footnote Footnote
        _foot Foot
        _fullcite bibliography entry
@@ -150,7 +162,7 @@ CiteFormat default
        !dummymod [a]
 
        # "...; Nextauthor ..."
-       !nextauthor {%next%[[%!sep% %!startlink%%!abbrvauthor%%!endlink%%!nextauthor%]]}
+       !nextauthor {%next%[[%!sep% %!startlink%%!abbrvciteauthor%%!endlink%%!nextauthor%]]}
        # Handle starred command: abbr. or full author list
        !makenextauthor {%next%[[%!sep% %!startlink%%!makeauthor%%!endlink%%!makenextauthor%]]}
        # "...; [NextID] ..."
@@ -167,15 +179,19 @@ CiteFormat default
        !nextfullcite {%next%[[%!sep% %bibentry%%!nextfullcite%]]}
 
        # "Author et al." (if > 3 authors) or "??"
-       !abbrvauthor {%abbrvauthor%[[%abbrvauthor%]][[??]]}
+       !abbrvciteauthor {%abbrvciteauthor%[[%abbrvciteauthor%]][[??]]}
        # "Author et al." (always) or "??"
-       !forceabbrvauthor {%forceabbrvauthor%[[%forceabbrvauthor%]][[??]]}
+       !forceabbrvciteauthor {%forceabbrvciteauthor%[[%forceabbrvciteauthor%]][[??]]}
        # Handle starred command: force of abbr. author list, independent of maxcitenames
-       !makeauthor {%ifstar%[[%!forceabbrvauthor%]][[%!abbrvauthor%]]}
+       !makeauthor {%ifstar%[[%!forceabbrvciteauthor%]][[%!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)
        !year {%year%[[%year%]][[??]]}{%modifier%[[%modifier%]]}
        # Add a year if it exists (else "??") and indicate a possible modifier (as in 2017[a])
@@ -209,6 +225,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
@@ -220,14 +238,14 @@ CiteFormat authoryear
        !close )
 
        # "cf. Author et. al Year..."
-       !makecite %!startlink%%!abbrvauthor% %!year%%!endlink%%!nextcite%
+       !makecite %!ctextbefore%%!startlink%%!abbrvciteauthor% %!year%%!endlink%%!ctextafter%%!nextcite%
        # Author et al. (cf. Year...
-       !maketextcite %!startlink%%!abbrvauthor%%!endlink% %!open%%!textbefore%%!year%%!nexttextcite%
+       !maketextcite {%ifqualified%[[%!textbefore%]]}%!startlink%%!abbrvciteauthor%%!endlink% %!open%{%ifqualified%[[%!ctextbefore%]][[%!textbefore%]]}%!year%%!ctextafter%%!nexttextcite%
 
        # "...; Nextauthor Year..."
        !nextcite {%next%[[%!sep% %!makecite%]]}
        # "...); Nextauthor (Year..."
-       !nexttextcite {%next%[[%!close%%!smartsep%%!startlink%%!abbrvauthor%%!endlink% %!open%%!year%%!nexttextcite%]]}
+       !nexttextcite {%next%[[%!close%%!smartsep%%!startlink%%!abbrvciteauthor%%!endlink% %!open%%!ctextbefore%%!year%%!ctextafter%%!nexttextcite%]]}
 
        # Add a year if it exists (else title, else "??") and possibly a modifier (as in 2017a)
        !yeartitle {%year%[[%year%{%modifier%[[%modifier%]][[{%export%[[]][[%!dummymod%]]}]]}]][[{%title%[[%title%]][[??]]}]]}
@@ -273,14 +291,14 @@ CiteFormat numerical
        !close ]
 
        # "Author [cf. ID..."
-       !maketextcite %!abbrvauthor% %!open%%!textbefore%{%dialog%[[#ID]][[%!startlink%{%numericallabel%[[%numericallabel%]][[#%key%]]}%!endlink%]]}%!nexttextcite%
+       !maketextcite %!abbrvciteauthor% %!open%%!textbefore%{%dialog%[[#ID]][[%!startlink%{%numericallabel%[[%numericallabel%]][[#%key%]]}%!endlink%]]}%!nexttextcite%
        # "ID"
-       !makekey {%dialog%[[#ID]][[%!startlink%{%numericallabel%[[%numericallabel%]][[#%key%]]}%!endlink%%!nextkey%]]}
+       !makekey %!ctextbefore%{%dialog%[[#ID]][[%!startlink%{%numericallabel%[[%numericallabel%]][[#%key%]]}%!endlink%]]}%!ctextafter%%!nextkey%
 
        # "...); Nextauthor [ID..."
-       !nexttextcite {%next%[[%!close%%!smartsep%%!abbrvauthor% %!open%{%dialog%[[#ID]][[%!startlink%{%numericallabel%[[%numericallabel%]][[#%key%]]}%!endlink%]]}%!nexttextcite%]]}
+       !nexttextcite {%next%[[%!close%%!smartsep%%!abbrvciteauthor% %!open%%!ctextbefore%{%dialog%[[#ID]][[%!startlink%{%numericallabel%[[%numericallabel%]][[#%key%]]}%!endlink%]]}%!nexttextcite%]]}
        # "..., NextID..."
-       !nextkey {%next%[[%!sep% %!startlink%{%numericallabel%[[%numericallabel%]][[#%key%]]}%!endlink%%!nextkey%]]}
+       !nextkey {%next%[[%!sep% %!ctextbefore%{%dialog%[[#ID]][[%!startlink%{%numericallabel%[[%numericallabel%]][[#%key%]]}%!endlink%]]}%!ctextafter%%!nextkey%]]}
 
        #
        # ACTUAL STYLE DEFINITIONS