commit 00bdc206932dcbda55fbb0902239a92a076c3bd4
Author: Juergen Spitzmueller <[email protected]>
Date: Tue Nov 12 13:52:05 2019 +0100
Consider shorthand in biblatex cite display
Fixes #11696
(cherry picked from commit 400706ad0525b43ab20993acb487ee4660823f84)
---
lib/citeengines/biblatex-natbib.citeengine | 6 ++++--
lib/citeengines/biblatex.citeengine | 16 ++++++++++------
status.23x | 3 +++
3 files changed, 17 insertions(+), 8 deletions(-)
diff --git a/lib/citeengines/biblatex-natbib.citeengine
b/lib/citeengines/biblatex-natbib.citeengine
index 5dcdfb3..6da456c 100644
--- a/lib/citeengines/biblatex-natbib.citeengine
+++ b/lib/citeengines/biblatex-natbib.citeengine
@@ -192,6 +192,8 @@ CiteFormat default
!makeyear {%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 "??")
@@ -208,7 +210,7 @@ CiteFormat default
# ".., Year..." (including extra label, as in 2017a)
!nextyear {%next%[[%!sep%
%!startlink%%!makeyear%%!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 ..."
@@ -225,7 +227,7 @@ CiteFormat default
# "cf. Author; NextAuthor, p. xx"
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%
+ 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)" [Authoryear] / "(cf. Year, NextYear, p.
xx)" [Numerical]
diff --git a/lib/citeengines/biblatex.citeengine
b/lib/citeengines/biblatex.citeengine
index bd101e4..bbfbb6f 100644
--- a/lib/citeengines/biblatex.citeengine
+++ b/lib/citeengines/biblatex.citeengine
@@ -171,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 ..."
@@ -197,6 +197,8 @@ CiteFormat default
!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 "??")
@@ -215,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)
@@ -250,8 +252,10 @@ CiteFormat authoryear
# 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%]][[%!shyeartitle%]]}
+ # "...; Shorthand|Nextyear ..." (including extra label, as in 2017a)
+ !nextshyeartitle {%next%[[%!sep%
%!startlink%%!yeartitle%%!endlink%%!nextshyeartitle%]]}
#
# ACTUAL STYLE DEFINITIONS
@@ -266,9 +270,9 @@ CiteFormat authoryear
# "(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)"
diff --git a/status.23x b/status.23x
index 6780f03..095d2c5 100644
--- a/status.23x
+++ b/status.23x
@@ -53,6 +53,9 @@ What's new
- Fix display glith where the change tracking cue blinks with the cursor
(bug 11684).
+- Consider shorthand in biblatex cite display (bug 11696).
+
+
* INTERNALS
--
lyx-cvs mailing list
[email protected]
http://lists.lyx.org/mailman/listinfo/lyx-cvs