Improve on-screen representation with MLA style

This style is quite unique, so we need to accommodate that
This commit is contained in:
Juergen Spitzmueller 2024-07-11 13:38:22 +02:00
parent d036c651d5
commit 29b36dd0b8
2 changed files with 28 additions and 16 deletions

View File

@ -187,18 +187,20 @@ CiteFormat default
!makeauthor {%ifstar%[[%!fullciteauthor%]][[%!abbrvciteauthor%]]}
# "prenote "
!textbefore {%textbefore%[[%textbefore% ]]}
# Separator before textafter
!tasep {%ifstyle:mla,mla-strict,mla-new,mla7%[[]][[,]]}
# ", postnote"
!textafter {%textafter%[[, %textafter%]]}
!textafter {%textafter%[[%!tasep% %textafter%]]}
# "prenote " (for qualified lists)
!ctextbefore {%curpretext%[[%curpretext% ]]}
# ", postnote" (for qualified lists)
!ctextafter {%curposttext%[[, %curposttext%]]}
!ctextafter {%curposttext%[[%!tasep% %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])
!myear {%year%[[%year%]][[??]]}{%modifier%[[%modifier%]][[{%export%[[]][[%!dummymod%]]}]]}
# Add a shorthand if it exists else myear (see above)
!shmyear {%shorthand%[[%shorthand%]][[%!myear%]]}
!shmyear {%shorthand%[[%shorthand%]][[{%ifstyle:mla,mla-strict,mla-new,mla7%[[%!makeshorttitle%]][[%!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 "??")
@ -254,16 +256,20 @@ CiteFormat authoryear
# MACROS
#
!open (
!tcopen {%ifstyle:mla,mla-strict,mla-new,mla7%[[]][[(]]}
!sep ;
!close )
!tcclose {%ifstyle:mla,mla-strict,mla-new,mla7%[[]][[)]]}
!aysep {%ifstyle:apa%[[,]]}
# Title (with MLA), else year
!mkyear {%ifstyle:mla,mla-strict,mla-new,mla7%[[, %!makeshorttitle%]][[%!makeyear%]]}
# "cf. Author et. al Year..."
!makecite %!ctextbefore%%!startlink%%!abbrvciteauthor%%!aysep% %!makeyear%%!endlink%%!ctextafter%%!nextcite%
!makecite %!ctextbefore%%!startlink%%!abbrvciteauthor%%!aysep% %!mkyear%%!endlink%%!ctextafter%%!nextcite%
# "cf. Author et. al Year..."
!makepcite %!ctextbefore%%!startlink%%!abbrvpciteauthor%%!aysep% %!makeyear%%!endlink%%!ctextafter%%!nextpcite%
!makepcite %!ctextbefore%%!startlink%%!abbrvpciteauthor%%!aysep% %!mkyear%%!endlink%%!ctextafter%%!nextpcite%
# "Author et al. (cf. Year..."
!makecitet %!startlink%%!makeauthor%%!endlink% %!open%%!textbefore%%!makeyear%%!nextcitet%
!makecitet %!startlink%%!makeauthor%%!endlink% %!tcopen%%!textbefore%%!mkyear%%!nextcitet%
# "cf. Author et al. Year..."
!makecitealt %!textbefore%%!startlink%%!makeauthor% %!makeyear%%!endlink%%!nextcitealt%
# "Author et al., Year..."
@ -274,7 +280,7 @@ CiteFormat authoryear
# "...; Nextauthor Year..."
!nextpcite {%next%[[%!sep% %!makepcite%]]}
# "...), [and] Nextauthor (Year..."
!nextcitet {%next%[[%!close%%!smartsep%%!startlink%%!makeauthor%%!endlink% %!open%%!makeyear%%!nextcitet%]]}
!nextcitet {%next%[[%!tcclose%%!smartsep%%!startlink%%!makeauthor%%!endlink% %!tcopen%%!mkyear%%!nextcitet%]]}
# "...; NextAuthor et al. Year..."
!nextcitealt {%next%[[%!sep% %!startlink%%!makeauthor% %!makeyear%%!endlink%%!nextcitealt%]]}
# "...; NextAuthor et al., Year..."
@ -287,7 +293,7 @@ CiteFormat authoryear
#
# "Author (cf. Year),[ and] NextAuthor (Year, p. xx)"
citet %!makecitet%%!textafter%%!close%
citet %!makecitet%%!textafter%%!tcclose%
# "(cf. Author et al., Year; NextAuthor et al., Year, p. xx)"
citep %!open%%!textbefore%%!makepcite%%!textafter%%!close%
# "cf. Author et al., Year; NextAuthor et al., Year, p. xx"

View File

@ -192,18 +192,20 @@ CiteFormat default
!makeauthor {%ifstar%[[%!forceabbrvciteauthor%]][[%!abbrvciteauthor%]]}
# "prenote "
!textbefore {%textbefore%[[%textbefore% ]]}
# Separator before textafter
!tasep {%ifstyle:mla,mla-strict,mla-new,mla7%[[]][[,]]}
# ", postnote"
!textafter {%textafter%[[, %textafter%]]}
!textafter {%textafter%[[%!tasep% %textafter%]]}
# "prenote " (for qualified lists)
!ctextbefore {%curpretext%[[%curpretext% ]]}
# ", postnote" (for qualified lists)
!ctextafter {%curposttext%[[, %curposttext%]]}
!ctextafter {%curposttext%[[%!tasep% %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%]]}
!shmyear {%shorthand%[[%shorthand%]][[{%ifstyle:mla,mla-strict,mla-new,mla7%[[%!makeshorttitle%]][[%!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 "??")
@ -242,23 +244,27 @@ CiteFormat authoryear
# MACROS
#
!open (
!tcopen {%ifstyle:mla,mla-strict,mla-new,mla7%[[]][[(]]}
!sep ;
!close )
!tcclose {%ifstyle:mla,mla-strict,mla-new,mla7%[[]][[)]]}
!aysep {%ifstyle:apa%[[,]]}
# Title (with MLA), else year
!makeyear {%ifstyle:mla,mla-strict,mla-new,mla7%[[, %!makeshorttitle%]][[%!year%]]}
# "cf. Author et. al Year..."
!makecite %!ctextbefore%%!startlink%%!abbrvciteauthor%%!aysep% %!year%%!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%
!makepcite %!ctextbefore%%!startlink%%!abbrvpciteauthor%%!aysep% %!makeyear%%!endlink%%!ctextafter%%!nextpcite%
# Author et al. (cf. Year...
!maketextcite {%ifqualified%[[%!textbefore%]]}%!startlink%%!abbrvciteauthor%%!endlink% %!open%{%ifqualified%[[%!ctextbefore%]][[%!textbefore%]]}%!year%%!ctextafter%%!nexttextcite%
!maketextcite {%ifqualified%[[%!textbefore%]]}%!startlink%%!abbrvciteauthor%%!endlink% %!tcopen%{%ifqualified%[[%!ctextbefore%]][[%!textbefore%]]}%!makeyear%%!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%]]}
!nexttextcite {%next%[[%!tcclose%%!smartsep%%!startlink%%!abbrvciteauthor%%!endlink% %!tcopen%%!ctextbefore%%!makeyear%%!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%]][[??]]}]]}
@ -276,7 +282,7 @@ 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%%!textafter%%!close%
citet %!maketextcite%%!textafter%%!tcclose%
# "(cf. Author A Year; Author B Year, p. xx)"
citep %!open%%!textbefore%%!makepcite%%!textafter%%!close%
# This prints year or title, if year is missing