]> git.lyx.org Git - lyx.git/blobdiff - lib/citeengines/biblatex.citeengine
DocBook: add test for the forest package.
[lyx.git] / lib / citeengines / biblatex.citeengine
index 657547e403649294afe1770de8f6470fad61b09f..a993fb7a6af7c91d22ff41ce1d1635467525fa55 100644 (file)
@@ -8,7 +8,7 @@
 
 # Author: Jürgen Spitzmüller <spitz@lyx.org>
 
-Format 63
+Format 93
 
 Requires biblatex
 
@@ -64,20 +64,22 @@ 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[][]
@@ -86,11 +88,11 @@ CiteEngine authoryear
 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>[][]
@@ -112,11 +114,16 @@ 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
        #
-       # 1. Translatable bits (need to be marked by _ prefix)
+       # 1. Translatable bits (need to be marked by _ prefix, if translated to the GUI language,
+       #    or B_, if translated to the buffer language)
        #    Note that preceding and trailing spaces matter.
        #
        _notcited not cited
@@ -135,10 +142,10 @@ CiteFormat default
        _citetitlestar F&orce full title[[Possible substitute to All aut&hors]]
        _citetitlestartooltip Use full title even if shorttitle exists
        # The following are handled by BiblioInfo
-       _etal  et al.
-       _namesep , [[separate author names in citation, except for last name]]
-       _lastnamesep , and [[separate name of last author in citation]]
-       _pairnamesep  and [[separate two authors in citation]]
+       B_etal  et al.
+       B_namesep , [[separate author names in citation, except for last name]]
+       B_lastnamesep , and [[separate name of last author in citation]]
+       B_pairnamesep  and [[separate two authors in citation]]
 
        #
        # 2. Macros re-used in the style definitions
@@ -149,7 +156,7 @@ CiteFormat default
        !endlink {!</a>!}
 
        # Add " , and " before the last item (but " and " if there are only two), else ", "
-       !smartsep {%second%[[{%next%[[%_namesep%]][[%_pairnamesep%]]}]][[{%next%[[%_namesep%]][[%_lastnamesep%]]}]]}
+       !smartsep {%second%[[{%next%[[%B_namesep%]][[%B_pairnamesep%]]}]][[{%next%[[%B_namesep%]][[%B_lastnamesep%]]}]]}
 
        # A dummy year modifier. This just indicates that a modifier might be output,
        # to differentiate \cite* and \citeyear
@@ -164,7 +171,7 @@ CiteFormat default
        # "...; Nextyear ..." (including extra label, as in 2017a)
        !nextyear {%next%[[%!sep% %!startlink%%!year%%!endlink%%!nextyear%]]}
        # "...; Nextyear ..." (including emulated extra label, as in 2017[a])
-       !nextmyear {%next%[[%!sep% %!startlink%%!myear%%!endlink%%!nextmyear%]]}
+       !nextshmyear {%next%[[%!sep% %!startlink%%!shmyear%%!endlink%%!nextshmyear%]]}
        # "...; Nextyear ..." (without any extra label)
        !nextbyear {%next%[[%!sep% %!startlink%%!byear%%!endlink%%!nextbyear%]]}
        # "...; Nexttitle ..." 
@@ -182,10 +189,16 @@ CiteFormat default
        !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])
        !myear {%year%[[%year%]][[??]]}{%modifier%[[%modifier%]][[{%export%[[]][[%!dummymod%]]}]]}
+       # Add a shorthand if it exists else myear (see above)
+       !shmyear {%shorthand%[[%shorthand%]][[%!myear%]]}
        # Add a year if it exists (else "??") without any modifier at all
        !byear {%year%[[%year%]][[??]]}
        # Add a shorttitle or title if it exists (else "??")
@@ -204,7 +217,7 @@ CiteFormat default
        # "cf. Author; Nextautor, p. xx"
        citeauthor %!textbefore%%!startlink%%!makeauthor%%!endlink%%!makenextauthor%%!textafter%
        # "cf. Year; Nextyear, p. xx" (including extra label, as in 2017a)
-       citeyear %!textbefore%%!startlink%%!myear%%!endlink%%!nextyear%%!textafter%
+       citeyear %!textbefore%%!startlink%%!shmyear%%!endlink%%!nextshmyear%%!textafter%
        # "cf. Year; Nextyear, p. xx" (without any extra label)
        citebyear %!textbefore%%!startlink%%!byear%%!endlink%%!nextbyear%%!textafter%
        # "cf. Year; Nextyear, p. xx" (without any extra label)
@@ -228,19 +241,21 @@ CiteFormat authoryear
        !close )
 
        # "cf. Author et. al Year..."
-       !makecite %!startlink%%!abbrvciteauthor% %!year%%!endlink%%!nextcite%
+       !makecite %!ctextbefore%%!startlink%%!abbrvciteauthor% %!year%%!endlink%%!ctextafter%%!nextcite%
        # Author et al. (cf. Year...
-       !maketextcite %!startlink%%!abbrvciteauthor%%!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%%!abbrvciteauthor%%!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%]][[??]]}]]}
-       # "...; Nextyear ..." (including extra label, as in 2017a)
-       !nextyeartitle {%next%[[%!sep% %!startlink%%!yeartitle%%!endlink%%!nextyeartitle%]]}
+       # Add a shorthand if it exists, else yeartitle (above)
+       !shyeartitle {%shorthand%[[%shorthand%]][[%!yeartitle%]]}
+       # "...; Shorthand|Nextyear ..." (including extra label, as in 2017a)
+       !nextshyeartitle {%next%[[%!sep% %!startlink%%!yeartitle%%!endlink%%!nextshyeartitle%]]}
 
        #
        # ACTUAL STYLE DEFINITIONS
@@ -250,14 +265,14 @@ CiteFormat authoryear
 
        # "cf. Author A Year; Author B Year, p. xx"
        cite %!textbefore%%!makecite%%!textafter%
-       # "cf. Author A (Year),[ and] Author B (Year), p. xx"
-       citet %!maketextcite%%!close%%!textafter%
+       # "cf. Author A (Year),[ and] Author B (Year, p. xx)"
+       citet %!maketextcite%%!textafter%%!close%
        # "(cf. Author A Year; Author B Year, p. xx)"
        citep %!open%%!textbefore%%!makecite%%!textafter%%!close%
        # This prints year or title, if year is missing
-       citeyear %!textbefore%%!startlink%%!yeartitle%%!endlink%%!nextyeartitle%%!textafter%
+       citeyear %!textbefore%%!startlink%%!shyeartitle%%!endlink%%!nextshyeartitle%%!textafter%
        # "(cf. Year; Nextyear, p. xx)"
-       citeyearpar %!open%%!textbefore%%!startlink%%!myear%%!endlink%%!nextmyear%%!textafter%%!close%
+       citeyearpar %!open%%!textbefore%%!startlink%%!shmyear%%!endlink%%!nextshmyear%%!textafter%%!close%
        # "Footnote: cf. Author A Year; Author B Year, p. xx."
        footcite {%dialog%[[%_footnote%]][[%_foot%]]}: %!textbefore%%!makecite%%!textafter%.
        # "Auto: (cf. Author A Year; Author B Year, p. xx)"
@@ -268,7 +283,8 @@ CiteFormat numerical
        #
        # MACROS
        #
-       # 1. Translatable bits (need to be marked by _ prefix)
+       # 1. Translatable bits (need to be marked by _ prefix, if translated to the GUI language,
+       #    or B_, if translated to the buffer language)
        #
        _super Super
        _superscript Superscript
@@ -283,12 +299,12 @@ CiteFormat numerical
        # "Author [cf. ID..."
        !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%%!abbrvciteauthor% %!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