From 559eb58c62e1b7cbb20311e08e21b44b7eb6f141 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 9 Jun 2011 22:29:07 +0000 Subject: biblatex-apa 3.0 (9jun11) git-svn-id: svn://tug.org/texlive/trunk@22894 c570f23f-e606-0410-a88d-b1316a301751 --- .../tex/latex/biblatex-apa/american-apa.lbx | 2 +- Master/texmf-dist/tex/latex/biblatex-apa/apa.bbx | 82 ++++++++-------- Master/texmf-dist/tex/latex/biblatex-apa/apa.cbx | 49 +++++++--- .../tex/latex/biblatex-apa/brazilian-apa.lbx | 108 +++++++++++++++++++++ .../tex/latex/biblatex-apa/dutch-apa.lbx | 2 +- .../tex/latex/biblatex-apa/french-apa.lbx | 2 +- .../tex/latex/biblatex-apa/german-apa.lbx | 2 +- .../tex/latex/biblatex-apa/greek-apa.lbx | 2 +- .../tex/latex/biblatex-apa/ngerman-apa.lbx | 2 +- 9 files changed, 189 insertions(+), 62 deletions(-) create mode 100644 Master/texmf-dist/tex/latex/biblatex-apa/brazilian-apa.lbx (limited to 'Master/texmf-dist/tex/latex') diff --git a/Master/texmf-dist/tex/latex/biblatex-apa/american-apa.lbx b/Master/texmf-dist/tex/latex/biblatex-apa/american-apa.lbx index cbe3c6ba9bc..0786757afa1 100644 --- a/Master/texmf-dist/tex/latex/biblatex-apa/american-apa.lbx +++ b/Master/texmf-dist/tex/latex/biblatex-apa/american-apa.lbx @@ -1,4 +1,4 @@ -% v2.9 +% v3.0 \ProvidesFile{american-apa.lbx} \InheritBibliographyExtras{american} diff --git a/Master/texmf-dist/tex/latex/biblatex-apa/apa.bbx b/Master/texmf-dist/tex/latex/biblatex-apa/apa.bbx index a0e2cc121f6..8cbb242700a 100644 --- a/Master/texmf-dist/tex/latex/biblatex-apa/apa.bbx +++ b/Master/texmf-dist/tex/latex/biblatex-apa/apa.bbx @@ -1,4 +1,4 @@ -%% apa.bbx v2.9 +%% apa.bbx v3.0 %% Copyright 2011 Philip Kime %% %% This work may be distributed and/or modified under the @@ -160,11 +160,8 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % (APA 6.12) Five author max before "et al" and a one author truncation policy -% However, only after the first cite, which means we can't use -% maxnames/minnames and have to do this in the Format for -% labelname (in the cbx). Anyway, since the truncation is to -% one name and APA requires we use the biblatex uniquelist -% functionality, maxnames/minnames isn't really indicated. +% However, only after the first cite, see the labelname format +% in .cbx. It's also overridden per-entry by uniquelist % (APA 6.x) citation tracking is global % (APA 6.14) uses initials to disambiguate shared surnames % (APA 6.16) uses year postfix to disambiguate multiple items in same year @@ -181,8 +178,8 @@ uniquelist=true,% uniquename=init,% citetracker=true,% - maxnames=99,% - minnames=99,% + maxnames=2,% + minnames=1,% abbreviate=true,% mincrossrefs=999,% alldates=apalong} @@ -268,20 +265,33 @@ % last name first. % (APA 6.27) Ellipsis in 7th position and then nothing until last % (APA 7.10 Example 67) Unknown names and dates +% + +% \printnames does different things depending on whether the format you are +% calling is the default for the name field or is a custom format: +% +% * Default format (e.g. "labelname" format for printing labelname): no +% start/stop max/minnames truncation is done first - the format is +% supposed to do it. +% * Custom format (e.g. "labelname" format for printing author): +% max/minnames truncation is done before calling the format so we have +% to do \printnames[format][-\value{listtotal}]{field} to ensure we get +% all of the names in the list to work on \DeclareNameFormat{apaauthor}{% - \ifthenelse{\value{listcount}=\maxprtauth\AND\value{listcount}<\value{liststop}} - {\addcomma\addspace\ldots} - {\ifthenelse{\value{listcount}>\maxprtauth\AND\value{listcount}<\value{liststop}} + \ifthenelse{\value{listcount}=\maxprtauth\AND\value{listcount}<\value{listtotal}} + {\addcomma\addspace\ldots\addspace} + {\ifthenelse{\value{listcount}>\maxprtauth\AND\value{listcount}<\value{listtotal}} {} {\ifthenelse{\iffieldequalstr{usere}{unkauth}\OR\iffieldequalstr{usere}{unkauthdate}} {\mkbibbrackets{\usebibmacro{name:last-first}{#1}{#4}{#5}{#7}?}} {\usebibmacro{name:last-first}{#1}{#4}{#5}{#7}}}}} + \renewbibmacro*{author}{% \ifnameundef{author} {\usebibmacro{labeltitle}} - {\printnames[apaauthor]{author}% + {\printnames[apaauthor][-\value{listtotal}]{author}% \setunit*{\addspace}% \printfield{nameaddon}}% \newunit\newblock% @@ -531,27 +541,13 @@ % (APA 6.27) Editors have first names first ... % (APA 7.02 Example 27) ... unless there is no author -\DeclareNameFormat{apatranslator}{% - \ifthenelse{\value{listcount}=\maxprtauth} - {\addcomma\addspace\ldots} - {\ifthenelse{\value{listcount}>\maxprtauth\AND\value{listcount}<\value{liststop}} - {} - {\usebibmacro{name:first-last}{#1}{#4}{#5}{#7}}}} - -\DeclareNameFormat{apaeditor}{% - \ifthenelse{\value{listcount}=\maxprtauth} +\DeclareNameFormat{apanames}{% + \ifthenelse{\value{listcount}=\maxprtauth\AND\value{listcount}<\value{listtotal}} {\addcomma\addspace\ldots} - {\ifthenelse{\value{listcount}>\maxprtauth\AND\value{listcount}<\value{liststop}} + {\ifthenelse{\value{listcount}>\maxprtauth\AND\value{listcount}<\value{listtotal}} {} {\usebibmacro{name:first-last}{#1}{#4}{#5}{#7}}}} -\DeclareNameFormat{editorinauthpos}{% - \ifthenelse{\value{listcount}=\maxprtauth} - {\addcomma\addspace\ldots} - {\ifthenelse{\value{listcount}>\maxprtauth\AND\value{listcount}<\value{liststop}} - {} - {\usebibmacro{name:last-first}{#1}{#4}{#5}{#7}}}} - \renewbibmacro*{author/editor}{% \ifnameundef{author} {\ifnameundef{editor} @@ -562,7 +558,7 @@ \newbibmacro*{editorinauthpos}{% \global\booltrue{bbx:editorinauthpos}% - \printnames[editorinauthpos]{editor}% + \printnames[apanames][-\value{listtotal}]{editor}% \setunit{\addspace}% \ifnameundef{editor} {} @@ -631,7 +627,7 @@ {}% {\ifnamesequal{editor}{translator}% {\printtext{\bibopenparen}\global\booltrue{bbx:parens}% - \printnames[apaeditor]{editor}% + \printnames[apaenames][-\value{listtotal}]{editor}% \setunit*{\addcomma\addspace}% \usebibmacro{apaeditorstrg}{editor}% \setunit*{\addspace\&\space}% @@ -640,7 +636,7 @@ {\printtext{\bibopenparen}\global\booltrue{bbx:parens}% \ifnameundef{editor}% {}% - {\printnames[apaeditor]{editor}% + {\printnames[apanames][-\value{listtotal}]{editor}% \setunit{\addcomma\addspace}% \usebibmacro{apaeditorstrg}{editor}% \clearname{editor}% @@ -648,7 +644,7 @@ \setunit*{\addspace\&\space}}% \ifnameundef{translator}% {\setunit{}}% - {\printnames[apatranslator]{translator}% + {\printnames[apanames][-\value{listtotal}]{translator}% \setunit{\addcomma\addspace}% \printtext{\bibcpstring{translator}}% \clearname{translator}% @@ -664,7 +660,7 @@ {}% {\ifnamesequal{editor}{translator}% {\usebibmacro{in}% - \printnames[apaeditor]{editor}% + \printnames[apanames][-\value{listtotal}]{editor}% \setunit{\addspace\bibopenparen\global\booltrue{bbx:parens}}% \usebibmacro{apaeditorstrg}{editor}% \setunit*{\addspace\&\space}% @@ -673,7 +669,7 @@ {\ifnameundef{translator}% {}% {\setunit{\relax}% - \printtext[parens]{\printnames[apatranslator]{translator}% + \printtext[parens]{\printnames[apanames][-\value{listtotal}]{translator}% \setunit{\addcomma\addspace}% \printtext{\bibcpstring{translator}}}% \clearname{translator}% @@ -876,7 +872,7 @@ \newbibmacro*{reviewauthor}{% \ifnameundef{author} {\usebibmacro{reviewlabeltitle}} - {\printnames[apaauthor]{author}}% + {\printnames[apaauthor][-\value{listtotal}]{author}}% \newunit\newblock% \usebibmacro{labelyear+extrayear}} @@ -923,13 +919,13 @@ \newbibmacro*{mediaauthor}{% \ifnameundef{namea} {} - {\printnames{namea}% + {\printnames[apanames][-\value{listtotal}]{namea}% \newunit% \printtext[parens]{\printfield{nameatype}}} \setunit*{\addcomma\addspace\&\addspace}% \ifnameundef{nameb} {} - {\printnames{nameb}% + {\printnames[apanames][-\value{listtotal}]{nameb}% \setunit{\addspace}% \printtext[parens]{\printfield{namebtype}}} \newunit @@ -974,7 +970,7 @@ {\usebibmacro{in}% \ifnameundef{namec} {} - {\printnames{namec}% + {\printnames[apanames][-\value{listtotal}]{namec}% \setunit{\addspace}% \printtext[parens]{\printfield{namectype}}} \setunit{\addcomma\addspace}% @@ -1608,28 +1604,28 @@ \newbibmacro*{editorx}{% \ifnameundef{editor} {} - {\printnames[apaeditor]{editor}% + {\printnames[apanames][-\value{listtotal}]{editor}% \setunit{\addspace}% \printtext[parens]{\usebibmacro{apaeditorstrg}{editor}} \clearname{editor}% \newunit}% \ifnameundef{editora} {} - {\printnames[apaeditor]{editora}% + {\printnames[apanames][-\value{listtotal}]{editora}% \setunit{\addspace}% \printtext[parens]{\usebibmacro{apaeditorstrg}{editora}} \clearname{editora}% \newunit}% \ifnameundef{editorb} {} - {\printnames[apaeditor]{editorb}% + {\printnames[apanames][-\value{listtotal}]{editorb}% \setunit{\addspace}% \printtext[parens]{\usebibmacro{apaeditorstrg}{editorb}} \clearname{editorb}% \newunit}% \ifnameundef{editorc} {} - {\printnames[apaeditor]{editorc}% + {\printnames[apanames][-\value{listtotal}]{editorc}% \setunit{\addspace}% \printtext[parens]{\usebibmacro{apaeditorstrg}{editorc}} \clearname{editorc}% diff --git a/Master/texmf-dist/tex/latex/biblatex-apa/apa.cbx b/Master/texmf-dist/tex/latex/biblatex-apa/apa.cbx index aca49a9bd8f..993c3166815 100644 --- a/Master/texmf-dist/tex/latex/biblatex-apa/apa.cbx +++ b/Master/texmf-dist/tex/latex/biblatex-apa/apa.cbx @@ -1,4 +1,4 @@ -%% apa.cbx v2.9 +%% apa.cbx v3.0 %% Copyright 2011 Philip Kime %% %% This work may be distributed and/or modified under the @@ -43,6 +43,15 @@ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% (APA 6.12) No comma before "et al" if there is only one name +% preceding it + +\renewcommand*{\andothersdelim}{\ifnum\value{listcount}>2 \finalandcomma\fi\addspace} + +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % (APA 6.12) ampersand separator in parenthetical cites @@ -89,20 +98,34 @@ \fi \usebibmacro{name:andothers}} -% Can't do this with the built-in printnames as APA requires truncation +% Can't do this with the built-in printnames format as APA requires truncation % and disambiguation only after first cite +% We either use uniquelist or minnames for truncation. If uniquelist isn't +% defined, we fall back on minnames + +% \printnames does different things depending on whether the format you are +% calling is the default for the name field or is a custom format: +% +% max/minnames truncation is done before calling the format so we have +% to do \printnames[format][-\value{listtotal}]{field} to ensure we get +% all of the names in the list to work on here \DeclareNameFormat{labelname}{% - \ifthenelse{\value{listcount}=1\OR\value{listtotal}=2} + \ifthenelse{\value{uniquelist}>1} + {\numdef\cbx@min{\value{uniquelist}}} + {\numdef\cbx@min{\value{minnames}}}% + \ifboolexpr{test {\ifnumcomp{\value{listcount}}{=}{1}} + or test {\ifnumcomp{\value{listtotal}}{=}{2}}} {\usebibmacro{labelname:doname}{#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}} - {\ifthenelse{\ifciteseen\OR\value{listtotal}>5} - {\ifnumcomp{\value{listcount}}{<}{\value{uniquelist} + 1}% normal name - {\usebibmacro{labelname:doname}{#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}}% + {\ifboolexpr{test {\ifnumcomp{\value{listtotal}}{>}{5}} + or test {\ifciteseen}} + {\ifnumcomp{\value{listcount}}{<}{\cbx@min + 1}% normal name + {\usebibmacro{labelname:doname}{#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}}% {}% - \ifnumcomp{\value{listcount}}{=}{\value{uniquelist} + 1}% first past ul is et al + \ifnumcomp{\value{listcount}}{=}{\cbx@min + 1}% first past ul is et al {\andothersdelim\bibstring{andothers}}% {}% - \ifnumcomp{\value{listcount}}{>}{\value{uniquelist} + 1}% nothing thereafter + \ifnumcomp{\value{listcount}}{>}{\cbx@min + 1}% nothing thereafter {\relax}% {}}% {\usebibmacro{labelname:doname}{#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}}}} @@ -151,10 +174,10 @@ \savefield{namehash}{\cbx@lasthash}}} % Normal cite {\ifnameundef{shortauthor} - {\printnames{labelname}} + {\printnames[labelname][-\value{listtotal}]{labelname}} {\ifciteseen {\printnames{shortauthor}} - {\printnames{author}\addspace\printnames[sabrackets]{shortauthor}}}% + {\printnames[labelname][-\value{listtotal}]{author}\addspace\printnames[sabrackets]{shortauthor}}}% \setunit{\nameyeardelim}% \iffieldundef{labelyear} {\usebibmacro{cite:noyear}} @@ -183,11 +206,11 @@ % Normal full cite {\ifnameundef{shortauthor}% % Normal full cite - {\printnames{labelname}} + {\printnames[labelname][-\value{listtotal}]{labelname}} % Cite using short author {\ifciteseen {\printnames{shortauthor}} - {\printnames{author}}}% + {\printnames[labelname][-\value{listtotal}]{author}}}% % Year \setunit{\ifbool{cbx:np} {\nameyeardelim} @@ -228,7 +251,7 @@ \newbibmacro*{cite:shorthand}{% \ifciteseen {\printfield{shorthand}} - {\printnames{labelname}% + {\printnames[labelname][-\value{listtotal}]{labelname}% \setunit{\nameyeardelim}% \printfield{title}\space\printfield{shorthand}}} diff --git a/Master/texmf-dist/tex/latex/biblatex-apa/brazilian-apa.lbx b/Master/texmf-dist/tex/latex/biblatex-apa/brazilian-apa.lbx new file mode 100644 index 00000000000..dd7dd40e733 --- /dev/null +++ b/Master/texmf-dist/tex/latex/biblatex-apa/brazilian-apa.lbx @@ -0,0 +1,108 @@ +% v3.0 +\ProvidesFile{brazilian-apa.lbx} +\InheritBibliographyExtras{brazilian} + +% (APA 6.22) The example abbreviations + +\NewBibliographyString{revisededition} +\NewBibliographyString{typechair} +\NewBibliographyString{typechairs} +\NewBibliographyString{typevolume} +\NewBibliographyString{typevolumes} +\NewBibliographyString{typeseries} +\NewBibliographyString{typeseriess} +\NewBibliographyString{typevolseries} +\NewBibliographyString{typevolseriess} +\NewBibliographyString{on} +\NewBibliographyString{retrieved} +\NewBibliographyString{available} +\NewBibliographyString{from} +\NewBibliographyString{nodate} +\NewBibliographyString{archivedat} +\NewBibliographyString{origyear} +\NewBibliographyString{reviewof} + +\DeclareBibliographyStrings{% + inherit = {brazilian}, + revisededition = {{Edi\c{c}\~ao\space Revisada}{ed\adddotspace rev\adddot}}, + on = {{em}{em}}, + retrieved = {{recuperado}{recuperado}}, + available = {{dispon\'ivel}{disp.}}, + from = {{de}{de}}, + archivedat = {{arquivado\space em}{arquivado\space em}}, + nodate = {{sem\space data}{{}s\adddot d\adddot}}, + reviewof = {{Revis\~ao\space de}{revis\~ao\space de}}, + origyear = {{trabalho\space original\space publicado\space em}{trabalho\space original\space publicado\space em}}, + typechair = {{Coordenador}{Coord\adddot}}, + typechairs = {{Coordenadores}{Coords\adddot}}, + typevolume = {{Editor\space do\space Volume}{Ed\adddot\space Vol\adddot}}, + typevolumes = {{Editores\space do\space Volume}{Eds\adddot\space Vol\adddot}}, + typeseries = {{Editor\space da\space S\'erie}{Ed\adddot\space S\'erie\adddot}}, + typeseriess = {{Editores\space da\space S\'erie}{Eds\adddot\space S\'erie\adddot}}, + typevolseries = {{Editor\space da\space S\'erie\space e\space do\space Volume}{Ed\adddot\space Vol\space\&\space S\'erie}}, + typevolseriess = {{Editores\space da\space S\'erie\space e\space do\space Volume}{Eds\adddot\space Vol\space\&\space S\'erie}}, +} + +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% (APA 7.10 Example 68) Drop end* when they are the same as * + +% You must use \printdate to get here otherwise it will be ignored + +\DefineBibliographyExtras{brazilian}{% + \protected\def\mkbibdateapalong#1#2#3{% + \iffieldundef{#1}% + {}% + {\thefield{#1}}% + \iffieldundef{#2}% + {}% + {\iffieldundef{#1}% + {}% + {\addcomma\addspace}% + \mkbibmonth{\thefield{#2}}}% + \iffieldundef{#3}% + {}% + {\ifthenelse{\iffieldundef{#2}\OR\iffieldundef{#1}}% + {}% + {\addspace}% + \stripzeros{\thefield{#3}}}}% + \protected\def\mkbibdateapalongextra#1#2#3{% + \iffieldundef{#1}% + {}% + {\thefield{#1}\printfield{extrayear}}% + \iffieldundef{#2}% + {}% + {\iffieldundef{#1}% + {}% + {\addcomma\addspace}% + \mkbibmonth{\thefield{#2}}}% + \iffieldundef{#3}% + {}% + {\ifthenelse{\iffieldundef{#2}\OR\iffieldundef{#1}}% + {}% + {\addspace}% + \stripzeros{\thefield{#3}}}}% + \protected\def\mkbibdateapalongdmy#1#2#3{% + \iffieldundef{#3}% + {}% + {\stripzeros{\thefield{#3}}}% + \iffieldundef{#2}% + {}% + {\iffieldundef{#3}% + {}% + {\addspace}% + \mkbibmonth{\thefield{#2}}}% + \iffieldundef{#1}% + {}% + {\ifthenelse{\iffieldundef{#2}\OR\iffieldundef{#3}}% + {}% + {\addspace}% + \thefield{#1}}}} + +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + +\endinput diff --git a/Master/texmf-dist/tex/latex/biblatex-apa/dutch-apa.lbx b/Master/texmf-dist/tex/latex/biblatex-apa/dutch-apa.lbx index 6e02457ee60..a68c5058d16 100644 --- a/Master/texmf-dist/tex/latex/biblatex-apa/dutch-apa.lbx +++ b/Master/texmf-dist/tex/latex/biblatex-apa/dutch-apa.lbx @@ -1,4 +1,4 @@ -% v2.9 +% v3.0 \ProvidesFile{dutch-apa.lbx} \InheritBibliographyExtras{dutch} diff --git a/Master/texmf-dist/tex/latex/biblatex-apa/french-apa.lbx b/Master/texmf-dist/tex/latex/biblatex-apa/french-apa.lbx index 549c12f8fdb..43d86243f5c 100644 --- a/Master/texmf-dist/tex/latex/biblatex-apa/french-apa.lbx +++ b/Master/texmf-dist/tex/latex/biblatex-apa/french-apa.lbx @@ -1,4 +1,4 @@ -% v2.9 +% v3.0 \ProvidesFile{french-apa.lbx} \InheritBibliographyExtras{french} diff --git a/Master/texmf-dist/tex/latex/biblatex-apa/german-apa.lbx b/Master/texmf-dist/tex/latex/biblatex-apa/german-apa.lbx index e5e0d6c63b0..3902e82e09b 100644 --- a/Master/texmf-dist/tex/latex/biblatex-apa/german-apa.lbx +++ b/Master/texmf-dist/tex/latex/biblatex-apa/german-apa.lbx @@ -1,4 +1,4 @@ -% v2.9 +% v3.0 \ProvidesFile{german-apa.lbx} \InheritBibliographyExtras{german} diff --git a/Master/texmf-dist/tex/latex/biblatex-apa/greek-apa.lbx b/Master/texmf-dist/tex/latex/biblatex-apa/greek-apa.lbx index 05382ca25dc..2929087fb7d 100644 --- a/Master/texmf-dist/tex/latex/biblatex-apa/greek-apa.lbx +++ b/Master/texmf-dist/tex/latex/biblatex-apa/greek-apa.lbx @@ -1,4 +1,4 @@ -% v2.9 +% v3.0 \ProvidesFile{greek-apa.lbx} \InheritBibliographyExtras{greek} diff --git a/Master/texmf-dist/tex/latex/biblatex-apa/ngerman-apa.lbx b/Master/texmf-dist/tex/latex/biblatex-apa/ngerman-apa.lbx index db3006d9cb6..4a92f667981 100644 --- a/Master/texmf-dist/tex/latex/biblatex-apa/ngerman-apa.lbx +++ b/Master/texmf-dist/tex/latex/biblatex-apa/ngerman-apa.lbx @@ -1,4 +1,4 @@ -% v2.9 +% v3.0 \ProvidesFile{ngerman-apa.lbx} \InheritBibliographyExtras{ngerman} -- cgit v1.2.3