]> git.lyx.org Git - lyx.git/commitdiff
Improve representation of APA citation
authorJuergen Spitzmueller <spitz@lyx.org>
Thu, 11 Jul 2024 07:20:19 +0000 (09:20 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Thu, 11 Jul 2024 07:20:19 +0000 (09:20 +0200)
lib/citeengines/biblatex-natbib.citeengine
lib/citeengines/biblatex.citeengine

index 2a3a122f42f52c04ddd6aa63195f03ce0937d89c..8ea22cb019ccf1d11236aaf9389726df1b44cf55 100644 (file)
@@ -175,6 +175,8 @@ CiteFormat default
        # Add " , and " before the last item (but " and " if there are only two), else ", "
        !smartsep {%second%[[{%next%[[%B_namesep%]][[%B_pairnamesep%]]}]][[{%next%[[%B_namesep%]][[%B_lastnamesep%]]}]]}
 
+       # "Author et al." (if > 3 authors) or "??" (variant in parentheses)
+       !abbrvpciteauthor {%abbrvciteauthor%[[{%ifstyle:apa%[[%abbrvciteauthor&%]][[%abbrvciteauthor%]]}]][[??]]}
        # "Author et al." or "??"
        !abbrvciteauthor {%abbrvciteauthor%[[%abbrvciteauthor%]][[??]]}
        # "Author, ..." or "??"
@@ -252,9 +254,12 @@ CiteFormat authoryear
        !open (
        !sep ;
        !close )
+       !aysep {%ifstyle:apa%[[,]]}
 
        # "cf. Author et. al Year..."
-       !makecite %!ctextbefore%%!startlink%%!abbrvciteauthor% %!makeyear%%!endlink%%!ctextafter%%!nextcite%
+       !makecite %!ctextbefore%%!startlink%%!abbrvciteauthor%%!aysep% %!makeyear%%!endlink%%!ctextafter%%!nextcite%
+       # "cf. Author et. al Year..."
+       !makepcite %!ctextbefore%%!startlink%%!abbrvpciteauthor%%!aysep% %!year%%!endlink%%!ctextafter%%!nextpcite%
        # "Author et al. (cf. Year..."
        !makecitet %!startlink%%!makeauthor%%!endlink% %!open%%!textbefore%%!makeyear%%!nextcitet%
        # "cf. Author et al. Year..."
@@ -264,6 +269,8 @@ CiteFormat authoryear
 
        # "...; Nextauthor Year..."
        !nextcite {%next%[[%!sep% %!makecite%]]}
+       # "...; Nextauthor Year..."
+       !nextpcite {%next%[[%!sep% %!makepcite%]]}
        # "...), [and] Nextauthor (Year..."
        !nextcitet {%next%[[%!close%%!smartsep%%!startlink%%!makeauthor%%!endlink% %!open%%!makeyear%%!nextcitet%]]}
        # "...; NextAuthor et al. Year..."
@@ -280,7 +287,7 @@ CiteFormat authoryear
        # "Author (cf. Year),[ and] 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%
+       citep %!open%%!textbefore%%!makepcite%%!textafter%%!close%
        # "cf. Author et al., Year; NextAuthor et al., Year, p. xx"
        citealp %!textbefore%%!makecitealp%%!textafter%
        # "cf. Author Year; NextAuthor Year, p. xx" [NB: textbefore position differs from real natbib!]
@@ -288,7 +295,7 @@ CiteFormat authoryear
        # "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)"
-       autocite {%dialog%[[%_autocite%]][[%_auto%]]}: %!open%%!textbefore%%!makecite%%!textafter%%!close%
+       autocite {%dialog%[[%_autocite%]][[%_auto%]]}: %!open%%!textbefore%%!makepcite%%!textafter%%!close%
 
        # Fallback style: "Author A (cf. Year),[ and] Author B (Year, p. xx)"
        cite %!makecitet%%!textafter%%!close%
index a1530c6ea59d4d08e1bc97fe054dad33cedcb878..fe05a0a9b2153ac08832f18913e1bc1647d13a5e 100644 (file)
@@ -180,6 +180,8 @@ CiteFormat default
        # "...; NextKey..."
        !nextfullcite {%next%[[%!sep% %bibentry%%!nextfullcite%]]}
 
+       # "Author et al." (if > 3 authors) or "??" (variant in parentheses)
+       !abbrvpciteauthor {%abbrvciteauthor%[[{%ifstyle:apa%[[%abbrvciteauthor&%]][[%abbrvciteauthor%]]}]][[??]]}
        # "Author et al." (if > 3 authors) or "??"
        !abbrvciteauthor {%abbrvciteauthor%[[%abbrvciteauthor%]][[??]]}
        # "Author et al." (always) or "??"
@@ -240,14 +242,19 @@ CiteFormat authoryear
        !open (
        !sep ;
        !close )
+       !aysep {%ifstyle:apa%[[,]]}
 
        # "cf. Author et. al Year..."
-       !makecite %!ctextbefore%%!startlink%%!abbrvciteauthor% %!year%%!endlink%%!ctextafter%%!nextcite%
+       !makecite %!ctextbefore%%!startlink%%!abbrvciteauthor%%!aysep% %!year%%!endlink%%!ctextafter%%!nextcite%
+       # "cf. Author et. al Year..."
+       !makepcite %!ctextbefore%%!startlink%%!abbrvpciteauthor%%!aysep% %!year%%!endlink%%!ctextafter%%!nextpcite%
        # Author et al. (cf. Year...
        !maketextcite {%ifqualified%[[%!textbefore%]]}%!startlink%%!abbrvciteauthor%%!endlink% %!open%{%ifqualified%[[%!ctextbefore%]][[%!textbefore%]]}%!year%%!ctextafter%%!nexttextcite%
 
        # "...; Nextauthor Year..."
        !nextcite {%next%[[%!sep% %!makecite%]]}
+       # "...; Nextauthor Year..."
+       !nextpcite {%next%[[%!sep% %!makepcite%]]}
        # "...); Nextauthor (Year..."
        !nexttextcite {%next%[[%!close%%!smartsep%%!startlink%%!abbrvciteauthor%%!endlink% %!open%%!ctextbefore%%!year%%!ctextafter%%!nexttextcite%]]}
 
@@ -269,7 +276,7 @@ CiteFormat authoryear
        # "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%
+       citep %!open%%!textbefore%%!makepcite%%!textafter%%!close%
        # This prints year or title, if year is missing
        citeyear %!textbefore%%!startlink%%!shyeartitle%%!endlink%%!nextshyeartitle%%!textafter%
        # "(cf. Year; Nextyear, p. xx)"
@@ -277,7 +284,7 @@ CiteFormat authoryear
        # "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)"
-       autocite {%dialog%[[%_autocite%]][[%_auto%]]}: %!open%%!textbefore%%!makecite%%!textafter%%!close%
+       autocite {%dialog%[[%_autocite%]][[%_auto%]]}: %!open%%!textbefore%%!makepcite%%!textafter%%!close%
 End
 
 CiteFormat numerical