From 40a029d723e7e9ab61a8aeb2203ab461227c3ca2 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 15 Oct 2016 22:52:19 +0000 Subject: biblatex-abnt (14oct16) git-svn-id: svn://tug.org/texlive/trunk@42267 c570f23f-e606-0410-a88d-b1316a301751 --- .../tex/latex/biblatex-abnt/abnt-brazilian.lbx | 515 ++--- .../tex/latex/biblatex-abnt/abnt-ibid.bbx | 21 + .../tex/latex/biblatex-abnt/abnt-ibid.cbx | 479 +++++ .../tex/latex/biblatex-abnt/abnt-numeric.bbx | 21 +- .../tex/latex/biblatex-abnt/abnt-numeric.cbx | 35 +- Master/texmf-dist/tex/latex/biblatex-abnt/abnt.bbx | 2009 ++++++++++++-------- Master/texmf-dist/tex/latex/biblatex-abnt/abnt.cbx | 595 +++--- 7 files changed, 2317 insertions(+), 1358 deletions(-) create mode 100644 Master/texmf-dist/tex/latex/biblatex-abnt/abnt-ibid.bbx create mode 100644 Master/texmf-dist/tex/latex/biblatex-abnt/abnt-ibid.cbx (limited to 'Master/texmf-dist/tex/latex/biblatex-abnt') diff --git a/Master/texmf-dist/tex/latex/biblatex-abnt/abnt-brazilian.lbx b/Master/texmf-dist/tex/latex/biblatex-abnt/abnt-brazilian.lbx index 65eae35ba75..7a3798345cd 100644 --- a/Master/texmf-dist/tex/latex/biblatex-abnt/abnt-brazilian.lbx +++ b/Master/texmf-dist/tex/latex/biblatex-abnt/abnt-brazilian.lbx @@ -13,241 +13,324 @@ %% The Current Maintainer of this work is Daniel B. Marques. \ProvidesFile{abnt.lbx}% -[2016/07/06\space v2.0.1\space ABNT biblatex citation style]% +[2016/10/03\space v3.0\space ABNT BibLaTeX citation style]% -\InheritBibliographyExtras{brazilian} -% Remove preposition between month and year in longdates -\DeclareBibliographyExtras{ +% Init >>> + +\InheritBibliographyExtras{brazilian}% +\DeclareBibliographyStrings{% + inherit = {brazil},% +}% + +% <<< + +% No preposition between month and year >>>1 + +\DeclareBibliographyExtras{% \protected\def\mkbibdatelong#1#2#3{% - \iffieldundef{#3} - {} + \iffieldundef{#3}% + {}% {\stripzeros{\thefield{#3}}% \iffieldundef{#2}{}{\addspace}}% - \iffieldundef{#2} - {} + \iffieldundef{#2}% + {}% {\mkbibmonth{\thefield{#2}}% \iffieldundef{#1}{}{\addspace}}% \thefield{#1}}% -} +}% -\NewBibliographyString{sineloco} -\NewBibliographyString{sinenomine} +% <<< -\NewBibliographyString{sheet} -\NewBibliographyString{sheets} +% Publication details >>>1 -\NewBibliographyString{organizer} -\NewBibliographyString{organizers} -\NewBibliographyString{byorganizer} -\NewBibliographyString{byorganizerfo} +\NewBibliographyString{% + apud,% + sineloco,% + sinenomine,% + sheet,% + sheets,% + illustrated,% + monography,% + recensionof,% +}% -\NewBibliographyString{photographer} -\NewBibliographyString{byphotographer} +\DeclareBibliographyStrings{% + apud = {{apud}{apud}},% + idem = {{idem}{id\adddot}},% + volume = {{volume}{v\adddot}},% + volumes = {{volumes}{v\adddot}},% + number = {{número}{n\adddot}},% + pages = {{páginas}{p\adddot}},% + involumes = {{in}{in}},% + in = {{in}{in}},% + inseries = {{in}{in}},% + sineloco = {{sine loco}{s\adddot l\adddot}},% + sinenomine = {{sine nomine}{s\adddot n\adddot}},% + url = {{disponível em}{disponível em}},% + urlseen = {{acesso em}{acesso em}},% + sheet = {{folha}{f\adddot}},% + sheets = {{folhas}{f\adddot}},% + backrefpage = {{citado na página}{citado na p\adddot}},% + backrefpages = {{citado nas páginas}{citado nas pp\adddot}},% + illustrated = {{ilustrado}{il\adddot}},% + monography = {{monografia}{monografia}},% + phdthesis = {{Tese (Doutorado)}{Tese (Doutorado)}},% + mathesis = {{Dissertação (Mestrado)}{Diss. (Mestrado)}},% + reprintfrom = {{separata de}{separata de}},% + recensionof = {{recensão de}{recensão de}},% + reviewof = {{resenha de}{resenha de}},% +}% + +% <<< -\NewBibliographyString{artisticdirector} -\NewBibliographyString{byartisticdirector} +% Languages >>>1 -\NewBibliographyString{recorder} -\NewBibliographyString{byrecorder} +\DeclareBibliographyStrings{% + langamerican = {{versão americana}{versão americana}},% + langbrazilian = {{versão brasileira}{versão brasileira}},% + langcatalan = {{versão catalã}{versão catalã}},% + langcroatian = {{versão croata}{versão croata}},% + langczech = {{versão tcheca}{versão tcheca}},% + langdanish = {{versão dinamarquesa}{versão dinamarquesa}},% + langdutch = {{versão holandesa}{versão holandesa}},% + langenglish = {{versão inglesa}{versão inglesa}},% + langfinnish = {{versão finlandesa}{versão finlandesa}},% + langfrench = {{versão francesa}{versão francesa}},% + langgerman = {{versão alemã}{versão alemã}},% + langgreek = {{versão grega}{versão grega}},% + langitalian = {{versão italiana}{versão italiana}},% + langlatin = {{versão latina}{versão latina}},% + langnorwegian = {{versão norueguesa}{versão norueguesa}},% + langpolish = {{versão polonesa}{versão polonesa}},% + langportuguese = {{versão portuguesa}{versão portuguesa}},% + langrussian = {{versão russa}{versão russa}},% + langslovene = {{versão eslovena}{versão eslovena}},% + langspanish = {{versão espanhola}{versão espanhola}},% + langswedish = {{versão sueca}{versão sueca}},% + fromamerican = {{do original inglês}{do original inglês}},% + frombrazilian = {{do original português}{do original português}},% + fromcatalan = {{do original catalão}{do original catalão}},% + fromcroatian = {{do original croata}{do original croata}},% + fromczech = {{do original tcheco}{do original tcheco}},% + fromdanish = {{do original dinamarquês}{do original dinamarquês}},% + fromdutch = {{do original holandês}{do original holandês}},% + fromenglish = {{do original inglês}{do original inglês}},% + fromfinnish = {{do original finlandês}{do original finlandês}},% + fromfrench = {{do original francês}{do original francês}},% + fromgerman = {{do original alemão}{do original alemão}},% + fromgreek = {{do original grego}{do original grego}},% + fromitalian = {{do original italiano}{do original italiano}},% + fromlatin = {{do original em latim}{do original em latim}},% + fromnorwegian = {{do original norueguês}{do original norueguês}},% + frompolish = {{do original polonês}{do original polonês}},% + fromportuguese = {{do original português}{do original português}},% + fromrussian = {{do original russo}{do original russo}},% + fromslovene = {{do original esloveno}{do original esloveno}},% + fromspanish = {{do original espanhol}{do original espanhol}},% + fromswedish = {{do original sueco}{do original sueco}},% +}% -\NewBibliographyString{interviewer} -\NewBibliographyString{byinterviewer} +% <<< -\NewBibliographyString{generalorganizer} -\NewBibliographyString{bygeneralorganizer} -\NewBibliographyString{bygeneralorganizerfo} +% Roles expressed as functions >>>1 -\NewBibliographyString{bycoeditor} -\NewBibliographyString{bydirector} -\NewBibliographyString{bygeneraldirector} -\NewBibliographyString{bycoordinator} -\NewBibliographyString{byproducer} -\NewBibliographyString{byscreenwriter} -\NewBibliographyString{byinterpreter} -\NewBibliographyString{byillustrator} -\NewBibliographyString{bytechnicalreviser} +\NewBibliographyString{% + organizer,% + organizers,% + coordinator,% + coordinators,% +}% -\NewBibliographyString{illustrated} -\NewBibliographyString{monography} +\DeclareBibliographyStrings{% + editors = {{editores}{ed\adddot}},% + collaborators = {{colaboradores}{col\adddot}},% + translators = {{tradutores}{trad\adddot}},% + commentators = {{comentadores}{coment\adddot}},% + annotators = {{anotadores}{anot\adddot}},% + organizer = {{organizador}{org\adddot}},% + organizers = {{organizadores}{org\adddot}},% + coordinator = {{coordenador}{coord\adddot}},% + coordinators = {{coordenadores}{coord\adddot}},% +}% -\NewBibliographyString{recensionof} +% <<< -\NewBibliographyString{apud} +% Roles expressed as objects >>>1 \DeclareBibliographyStrings{% - apud = {{apud}{apud}}, - volume = {{volume}{v\adddot}}, - volumes = {{volumes}{v\adddot}}, - number = {{número}{n\adddot}}, - pages = {{p\'aginas}{p\adddot}}, - involumes = {{in}{in}}, - in = {{in}{in}}, - inseries = {{in}{in}}, - sineloco = {{sine loco}{s\adddot l\adddot}}, - sinenomine = {{sine nomine}{s\adddot n\adddot}}, - url = {{disponível em}{disponível em}}, - urlseen = {{acesso em}{acesso em}}, - sheet = {{folha}{f.}}, - sheets = {{folhas}{f.}}, - backrefpage = {{citado na p\'agina}{citado na p\adddot}}, - backrefpages = {{citado nas p\'aginas}{citado nas pp\adddot}}, - illustrated = {{ilustrado}{il.}}, - monography = {{monografia}{monografia}}, - phdthesis = {{Tese (Doutorado)}{Tese (Doutorado)}}, - mathesis = {{Tese (Mestrado)}{Tese (Mestrado)}}, - reprintfrom = {{separata de}{separata de}}, - recensionof = {{recensão de}{recensão de}}, - bycoeditor = {{co-edição de}{co-edição de}}, - bydirector = {{direção de}{direção de}}, - bygeneraldirector = {{direção geral de}{direção geral de}}, - bycoordinator = {{coordenação de}{coordenação de}}, - byproducer = {{produção de}{produção de}}, - byscreenwriter = {{roteiro de}{roteiro de}}, - byinterpreter = {{interpretação de}{interpretação de}}, - byillustrator = {{ilustrações de}{ilustrações de}}, - photographer = {{fotógrafo}{fot.}}, - byphotographer = {{fotografia de}{fotografia de}}, - recorder = {{gravador}{gravador}}, - byrecorder = {{gravação de}{gravação de}}, - interviewer = {{entrevistador}{entrevistador}}, - byinterviewer = {{entrevista por}{entrevista por}}, - artisticdirector = {{diretor artístico}{dir. art.}}, - byartisticdirector = {{direção artística de}{direção artística de}}, - organizer = {{organização}{org\adddot}}, - organizers = {{organização}{org\adddot}}, - generalorganizer = {{organização geral}{org\adddot geral}}, - byorganizer = {{organização de}{organização de}}, - bygeneralorganizer = {{organização geral de}{organização geral de}}, - byauthor = {{por}{por}}, - byeditor = {{edição de}{edição de}}, - bycompiler = {{compilação de}{compilação de}}, - byredactor = {{redigido por}{redigido por}}, - byreviser = {{revisão de}{revisão de}}, - bytechnicalreviser = {{revisão técnica de}{revisão técnica de}}, - byreviewer = {{resenha de}{resenha de}}, - byfounder = {{fundado por}{fundado por}}, - bycontinuator = {{continuado por}{continuado por}}, - bycollaborator = {{em colabora\c{a}\~o com}{em colabora\c{a}\~o com}}, - bytranslator = {{tradução de}{tradução de}}, - bycommentator = {{comentário de}{comentário de}}, - byannotator = {{notas de}{notas de}}, - withcommentator = {{coment\'ario de}{coment\'ario de}}, - withannotator = {{notas de}{notas de}}, - withintroduction = {{introdu\c{c}\~ao de}{introdu\c{c}\~ao de}}, - withforeword = {{pref\'acio de}{pref\'acio de}}, - withafterword = {{posf\'acio de}{posf\'acio de}}, - byorganizerfo = {{organização e prefácio de}{organização e prefácio de}}, - bygeneralorganizerfo = {{organização geral e prefácio de}{organização geral e prefácio de}}, - byeditortr = {{edição e tradução de}% - {edição e tradução de}}, - byeditorco = {{edição e comentário de}% - {edição e comentário de}}, - byeditoran = {{edição e notas de}% - {edição e notas de}}, - byeditorin = {{edição e introdução de}% - {edição e introdução de}}, - byeditorfo = {{edição e prefácio de}% - {edição e prefácio de}}, - byeditoraf = {{edição e posfácio de}% - {edição e posfácio de}}, - byeditortrco = {{edição, tradução e comentário de}% - {edição, tradução e comentário de}}, - byeditortran = {{edição, tradução e notas de}% - {edição, tradução e notas de}}, - byeditortrin = {{edição, tradução e introdução de}% - {edição, tradução e introdução de}}, - byeditortrfo = {{edição, tradução e prefácio de}% - {edição, tradução e prefácio de}}, - byeditortraf = {{edição, tradução e posfácio de}% - {edição, tradução e posfácio de}}, - byeditorcoin = {{edição, comentário e introdução de}% - {edição, comentário e introdução de}}, - byeditorcofo = {{edição, comentário e prefácio de}% - {edição, comentário e prefácio de}}, - byeditorcoaf = {{edição, comentário e posfácio de}% - {edição, comentário e posfácio de}}, - byeditoranin = {{edição, introdução e notas de}% - {edição, introdução e notas de}}, - byeditoranfo = {{edição, prefácio e notas de}% - {edição, prefácio e notas de}}, - byeditoranaf = {{edição, posfácio e notas de}% - {edição, posfácio e notas de}}, - byeditortrcoin = {{edição, tradução, comentário e introdução de}% - {edição, tradução, comentário e introdução de}}, - byeditortrcofo = {{edição, tradução, comentário e prefácio de}% - {edição, tradução, comentário e prefácio de}}, - byeditortrcoaf = {{edição, tradução, comentário e posfácio de}% - {edição, tradução, comentário e posfácio de}}, - byeditortranin = {{edição, tradução, notas e introdução de}% - {edição, tradução, notas e introdução de}}, - byeditortranfo = {{edição, tradução, notas e prefácio de}% - {edição, tradução, notas e prefácio de}}, - byeditortranaf = {{edição, tradução, notas e posfácio de}% - {edição, tradução, notas e posfácio de}}, - bytranslatorco = {{tradução e comentário de}% - {tradução e comentário de}}, - bytranslatoran = {{tradução e notas de}% - {tradução e notas de}}, - bytranslatorin = {{tradução e introdução de}% - {tradução e introdução de}}, - bytranslatorfo = {{tradução e prefácio de}% - {tradução e prefácio de}}, - bytranslatoraf = {{tradução e posfácio de}% - {tradução e posfácio de}}, - bytranslatorcoin = {{tradução, comentário e introdução de}% - {tradução, comentário e introdução de}}, - bytranslatorcofo = {{tradução, comentário e prefácio de}% - {tradução, comentário e prefácio de}}, - bytranslatorcoaf = {{tradução, comentário e posfácio de}% - {tradução, comentário e posfácio de}}, - bytranslatoranin = {{tradução, notas e introdução de}% - {tradução, notas e introdução de}}, - bytranslatoranfo = {{tradução, notas e prefácio de}% - {tradução, notas e prefácio de}}, - bytranslatoranaf = {{tradução, notas e posfácio de}% - {tradução, notas e posfácio de}}, - langamerican = {{versão americana}{versão americana}}, - langbrazilian = {{versão brasileira}{versão brasileira}}, - langcatalan = {{versão catalã}{versão catalã}}, - langcroatian = {{versão croata}{versão croata}}, - langczech = {{versão tcheca}{versão tcheca}}, - langdanish = {{versão dinamarquesa}{versão dinamarquesa}}, - langdutch = {{versão holandesa}{versão holandesa}}, - langenglish = {{versão inglesa}{versão inglesa}}, - langfinnish = {{versão finlandesa}{versão finlandesa}}, - langfrench = {{versão francesa}{versão francesa}}, - langgerman = {{versão alem\~a}{versão alem\~a}}, - langgreek = {{versão grega}{versão grega}}, - langitalian = {{versão italiana}{versão italiana}}, - langlatin = {{versão latina}{versão latina}}, - langnorwegian = {{versão norueguesa}{versão norueguesa}}, - langpolish = {{versão polonesa}{versão polonesa}}, - langportuguese = {{versão portuguesa}{versão portuguesa}}, - langrussian = {{versão russa}{versão russa}}, - langslovene = {{versão eslovena}{versão eslovena}}, - langspanish = {{versão espanhola}{versão espanhola}}, - langswedish = {{versão sueca}{versão sueca}}, - fromamerican = {{do original ingl\^es}{do original ingl\^es}}, - frombrazilian = {{do original portugu{\^e}s}{do original portugu{\^e}s}}, - fromcatalan = {{do original catalão}{do original catalão}}, - fromcroatian = {{do original croata}{do original croata}}, - fromczech = {{do original tcheco}{do original tcheco}}, - fromdanish = {{do original dinamarqu\^es}{do original dinamarqu\^es}}, - fromdutch = {{do original holand{\^e}s}{do original holand{\^e}s}}, - fromenglish = {{do original ingl\^es}{do original ingl\^es}}, - fromfinnish = {{do original finland\^es}{do original finland\^es}}, - fromfrench = {{do original franc\^es}{do original franc\^es}}, - fromgerman = {{do original alem\~ao}{do original alem\~ao}}, - fromgreek = {{do original grego}{do original grego}}, - fromitalian = {{do original italiano}{do original italiano}}, - fromlatin = {{do original em latim}{do original em latim}}, - fromnorwegian = {{do original noruegu\^es}{do original noruegu\^es}}, - frompolish = {{do original polonês}{do original polonês}}, - fromportuguese = {{do original portugu{\^e}s}{do original portugu{\^e}s}}, - fromrussian = {{do original russo}{do original russo}}, - fromslovene = {{do original esloveno}{do original esloveno}}, - fromspanish = {{do original espanhol}{do original espanhol}}, - fromswedish = {{do original sueco}{do original sueco}}, -} -\endinput + withcommentator = {{comentário\addcolon}{comentário\addcolon}},% + withannotator = {{notas\addcolon}{notas\addcolon}},% + withintroduction = {{introdução\addcolon}{introdução\addcolon}},% + withforeword = {{prefácio\addcolon}{prefácio\addcolon}},% + withafterword = {{posfácio\addcolon}{posfácio\addcolon}},% +}% + +% <<< + +% Roles expressed as actions >>>1 + +\NewBibliographyString{% >>>2 + byorganizer,% + byorganizerfo,% + bytechrev,% + byupdater,% + byupdateran,% + byphotographer,% + byartdir,% + byrecorder,% + byinterviewer,% + bygenorg,% + bygenorgfo,% + bycoordinator,% + bycoeditor,% + bydirector,% + bygendir,% + byproducer,% + byscreenwriter,% + byinterpreter,% + byillustrator,% + bytechrev,% +}% <<< + +\DeclareBibliographyStrings{% >>>2 + bycoeditor = {{co-edição\addcolon}% + {co-edição\addcolon}},% + bydirector = {{direção\addcolon}% + {direção\addcolon}},% + bygendir = {{direção geral\addcolon}% + {direção geral\addcolon}},% + bycoordinator = {{coordenação\addcolon}% + {coordenação\addcolon}},% + byproducer = {{produção\addcolon}% + {produção\addcolon}},% + byscreenwriter = {{roteiro\addcolon}% + {roteiro\addcolon}},% + byinterpreter = {{interpretação\addcolon}% + {interpretação\addcolon}},% + byillustrator = {{ilustrações\addcolon}% + {ilustrações\addcolon}},% + byorganizer = {{organização\addcolon}% + {organização\addcolon}},% + bytechrev = {{revisão técnica\addcolon}% + {revisão técnica\addcolon}},% + byartdir = {{direção artística\addcolon}% + {direção artística\addcolon}},% + byinterviewer = {{entrevista por}% + {entrevista por}},% + byrecorder = {{gravação\addcolon}% + {gravação\addcolon}},% + byphotographer = {{fotografia\addcolon}% + {fotografia\addcolon}},% + bygenorg = {{organização geral\addcolon}% + {organização geral\addcolon}},% + byauthor = {{por}% + {por}},% + byeditor = {{edição\addcolon}% + {edição\addcolon}},% + bycompiler = {{compilação\addcolon}% + {compilação\addcolon}},% + byredactor = {{redigido por}% + {redigido por}},% + byreviser = {{revisão\addcolon}% + {revisão\addcolon}},% + bytechrev = {{revisão técnica\addcolon}% + {revisão técnica\addcolon}},% + byreviewer = {{resenha\addcolon}% + {resenha\addcolon}},% + byfounder = {{fundado por}% + {fundado por}},% + bycontinuator = {{continuado por}% + {continuado por}},% + bycollaborator = {{em colaboração com}% + {em colaboração com}},% + bytranslator = {{tradução\addcolon}% + {tradução\addcolon}},% + bycommentator = {{comentário\addcolon}% + {comentário\addcolon}},% + byannotator = {{notas\addcolon}% + {notas\addcolon}},% + byupdateran = {{atualização e notas\addcolon}% + {atualização e notas\addcolon}},% + byupdater = {{atualização\addcolon}% + {atualização\addcolon}},% + byorganizerfo = {{organização e prefácio\addcolon}% + {organização e prefácio\addcolon}},% + bygenorgfo = {{organização geral e prefácio\addcolon}% + {organização geral e prefácio\addcolon}},% + byeditortr = {{edição e tradução\addcolon}% + {edição e tradução\addcolon}},% + byeditorco = {{edição e comentário\addcolon}% + {edição e comentário\addcolon}},% + byeditoran = {{edição e notas\addcolon}% + {edição e notas\addcolon}},% + byeditorin = {{edição e introdução\addcolon}% + {edição e introdução\addcolon}},% + byeditorfo = {{edição e prefácio\addcolon}% + {edição e prefácio\addcolon}},% + byeditoraf = {{edição e posfácio\addcolon}% + {edição e posfácio\addcolon}},% + byeditortrco = {{edição, tradução e comentário\addcolon}% + {edição, tradução e comentário\addcolon}},% + byeditortran = {{edição, tradução e notas\addcolon}% + {edição, tradução e notas\addcolon}},% + byeditortrin = {{edição, tradução e introdução\addcolon}% + {edição, tradução e introdução\addcolon}},% + byeditortrfo = {{edição, tradução e prefácio\addcolon}% + {edição, tradução e prefácio\addcolon}},% + byeditortraf = {{edição, tradução e posfácio\addcolon}% + {edição, tradução e posfácio\addcolon}},% + byeditorcoin = {{edição, comentário e introdução\addcolon}% + {edição, comentário e introdução\addcolon}},% + byeditorcofo = {{edição, comentário e prefácio\addcolon}% + {edição, comentário e prefácio\addcolon}},% + byeditorcoaf = {{edição, comentário e posfácio\addcolon}% + {edição, comentário e posfácio\addcolon}},% + byeditoranin = {{edição, introdução e notas\addcolon}% + {edição, introdução e notas\addcolon}},% + byeditoranfo = {{edição, prefácio e notas\addcolon}% + {edição, prefácio e notas\addcolon}},% + byeditoranaf = {{edição, posfácio e notas\addcolon}% + {edição, posfácio e notas\addcolon}},% + byeditortrcoin = {{edição, tradução, comentário e introdução\addcolon}% + {edição, tradução, comentário e introdução\addcolon}},% + byeditortrcofo = {{edição, tradução, comentário e prefácio\addcolon}% + {edição, tradução, comentário e prefácio\addcolon}},% + byeditortrcoaf = {{edição, tradução, comentário e posfácio\addcolon}% + {edição, tradução, comentário e posfácio\addcolon}},% + byeditortranin = {{edição, tradução, notas e introdução\addcolon}% + {edição, tradução, notas e introdução\addcolon}},% + byeditortranfo = {{edição, tradução, notas e prefácio\addcolon}% + {edição, tradução, notas e prefácio\addcolon}},% + byeditortranaf = {{edição, tradução, notas e posfácio\addcolon}% + {edição, tradução, notas e posfácio\addcolon}},% + bytranslatorco = {{tradução e comentário\addcolon}% + {tradução e comentário\addcolon}},% + bytranslatoran = {{tradução e notas\addcolon}% + {tradução e notas\addcolon}},% + bytranslatorin = {{tradução e introdução\addcolon}% + {tradução e introdução\addcolon}},% + bytranslatorfo = {{tradução e prefácio\addcolon}% + {tradução e prefácio\addcolon}},% + bytranslatoraf = {{tradução e posfácio\addcolon}% + {tradução e posfácio\addcolon}},% + bytranslatorcoin = {{tradução, comentário e introdução\addcolon}% + {tradução, comentário e introdução\addcolon}},% + bytranslatorcofo = {{tradução, comentário e prefácio\addcolon}% + {tradução, comentário e prefácio\addcolon}},% + bytranslatorcoaf = {{tradução, comentário e posfácio\addcolon}% + {tradução, comentário e posfácio\addcolon}},% + bytranslatoranin = {{tradução, notas e introdução\addcolon}% + {tradução, notas e introdução\addcolon}},% + bytranslatoranfo = {{tradução, notas e prefácio\addcolon}% + {tradução, notas e prefácio\addcolon}},% + bytranslatoranaf = {{tradução, notas e posfácio\addcolon}% + {tradução, notas e posfácio\addcolon}},% +}% <<< + +% <<< + +\endinput% + +% vim: set foldmarker=\ >>>,\ <<< : + diff --git a/Master/texmf-dist/tex/latex/biblatex-abnt/abnt-ibid.bbx b/Master/texmf-dist/tex/latex/biblatex-abnt/abnt-ibid.bbx new file mode 100644 index 00000000000..1aa31d36df5 --- /dev/null +++ b/Master/texmf-dist/tex/latex/biblatex-abnt/abnt-ibid.bbx @@ -0,0 +1,21 @@ +%% Copyright 2016 Daniel B. Marques +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% The Current Maintainer of this work is Daniel B. Marques. + +\ProvidesFile{abnt-ibid.bbx} +[2016/10/03\space v3.0\space ABNT BibLaTeX citation style]% + +\RequireBibliographyStyle{abnt} + +\endinput + diff --git a/Master/texmf-dist/tex/latex/biblatex-abnt/abnt-ibid.cbx b/Master/texmf-dist/tex/latex/biblatex-abnt/abnt-ibid.cbx new file mode 100644 index 00000000000..88941c28413 --- /dev/null +++ b/Master/texmf-dist/tex/latex/biblatex-abnt/abnt-ibid.cbx @@ -0,0 +1,479 @@ +%% Copyright 2016 Daniel B. Marques +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% The Current Maintainer of this work is Daniel B. Marques. + +\ProvidesFile{abnt-ibid.cbx}% +[2016/10/03\space v3.0\space ABNT BibLaTeX citation style]% + +\newtoggle{sccite}% + +% Format >>>1 + +\DeclareFieldFormat{citetitle}{%% >>>2 + \iftoggle{sccite}{% + \normalfont\textsc{\MakeLowercase{\FirstWord{#1}}}% + }{% + \normalfont\MakeUppercase{\FirstWord{#1}}% + }% +}%% <<<2 + +\DeclareNameFormat{LAST}{%% >>>2 + \ifcase\value{uniquename}% + \usebibmacro{name:family}% + {\iftoggle{sccite}% + {\textsc{\MakeLowercase{\namepartfamily}}}% + {\MakeUppercase{\namepartfamily}}}% + {\namepartgiven}% + {\namepartprefix}% + {\namepartsuffix}% + \or% + \ifuseprefix% + {\usebibmacro{name:given-family}% + {\iftoggle{sccite}% + {\textsc{\MakeLowercase{\namepartfamily}}}% + {\MakeUppercase{\namepartfamily}}}% + {\namepartgiveni}% + {\namepartprefix}% + {\namepartsuffixi}}% + {\usebibmacro{name:given-family}% + {\iftoggle{sccite}% + {\textsc{\MakeLowercase{\namepartfamily}}}% + {\MakeUppercase{\namepartfamily}}}% + {\namepartgiveni}% + {\namepartprefixi}% + {\namepartsuffixi}}% + \or% + \usebibmacro{name:given-family}% + {\iftoggle{sccite}% + {\textsc{\MakeLowercase{\namepartfamily}}}% + {\MakeUppercase{\namepartfamily}}}% + {\namepartgiven}% + {\namepartprefix}% + {\namepartsuffix}% + \fi% + \usebibmacro{name:andothers}% +}% <<<2 + +% \DeclareDelimFormat{nameyeardelim}{\addcomma\addspace}% +\renewcommand*{\nameyeardelim}{\addcomma\addspace}% + +% <<<1 + +% Options >>>1 + +\DeclareBibliographyOption{sccite}[true]{ + \settoggle{sccite}{#1}% +} + +\InitializeCitationStyle{\numgdef{\cbx@resetcount}{\cbx@resetcount+1}}% + +\DeclareFieldFormat{bibhyperlink}{% + \bibhyperlink{\iffootnote{f}{t}:\cbx@resetcount:\thefield{entrykey}}{#1}}% +\DeclareFieldFormat{bibhypertarget}{% + \bibhypertarget{\iffootnote{f}{t}:\cbx@resetcount:\thefield{entrykey}}{#1}}% + +\newcommand*{\cbx@resetcount}{0}% +\providecommand*{\mkidem}[1]{#1}% +\providecommand*{\mkibid}[1]{#1}% +\providecommand*{\mkopcit}[1]{#1}% +\renewcommand*{\iffinalcitedelim}{% + \ifnumequal{\value{textcitecount}}{\value{textcitetotal}-1}}% + +\newtoggle{cbx:loccit}% + +\newbibmacro*{footcite:citepages}{}% +\newbibmacro*{footcite:full:citepages}{}% +\newbibmacro*{footcite:postnote}{}% + +\DeclareBibliographyOption[boolean]{ibidpage}[true]{% + \ifstrequal{#1}{true}% + {\ExecuteBibliographyOptions{loccittracker=constrict}}% + {\ExecuteBibliographyOptions{loccittracker=false}}}% + +\DeclareBibliographyOption[string]{footcitepages}[permit]{% + \ifcsdef{cbx@opt@citepages@#1}% + {\csuse{cbx@opt@citepages@#1}}% + {\PackageError{biblatex}% + {Invalid option 'citepages=#1'}% + {Valid values are 'permit', 'suppress', 'omit', 'separate'.}}}% + +\providebibmacro*{footcite:citepages}{}% +\providebibmacro*{footcite:full:citepages}{}% +\providebibmacro*{footcite:postnote}{}% + +\def\cbx@opt@citepages@permit{% >>>2 + \renewbibmacro*{footcite:citepages}{}% + \renewbibmacro*{footcite:full:citepages}{}% + \renewbibmacro*{footcite:postnote}{% + \usebibmacro{footcite:postnote:ibidpage}}}% <<<2 + +\def\cbx@opt@citepages@suppress{% >>>2 + \renewbibmacro*{footcite:citepages}{}% + \renewbibmacro*{footcite:full:citepages}{% + \clearfield{pages}% + \clearfield{pagetotal}}% + \renewbibmacro*{footcite:postnote}{% + \usebibmacro{footcite:postnote:ibidpage}}}% <<<2 + +\def\cbx@opt@citepages@omit{% >>>2 + \renewbibmacro*{footcite:citepages}{}% + \renewbibmacro*{footcite:full:citepages}{% + \ifboolexpr{% + test {\ifnumequal{\value{footcitecount}}{\value{footcitetotal}}}% + and% + test {\iffieldpages{postnote}}% + }% + {\clearfield{pages}% + \clearfield{pagetotal}}% + {}}% + \renewbibmacro*{footcite:postnote}{% + \usebibmacro{footcite:postnote:ibidpage}}}% <<<2 + +\def\cbx@opt@citepages@separate{% >>>2 + \providetoggle{cbx:fullcite}% + \renewbibmacro*{footcite:citepages}{% + \global\togglefalse{cbx:fullcite}}% + \renewbibmacro*{footcite:full:citepages}{% + \global\toggletrue{cbx:fullcite}}% + \renewbibmacro*{footcite:postnote}{% + \ifboolexpr{% + togl {cbx:fullcite}% + and% + test {\iffieldpages{postnote}}% + and% + test {\ifnumequal{\value{footcitecount}}{\value{footcitetotal}}}% + and% + (% + not test {\iffieldundef{pages}}% + or% + not test {\iffieldundef{pagetotal}}% + )% + }% + {\usebibmacro{footcite:postnote:pages}}% + {\usebibmacro{footcite:postnote:ibidpage}}}% + \providebibmacro*{footcite:postnote:pages}{% + \setunit{\postnotedelim}% + \bibstring{thiscite}% + \setunit{\addspace}% + \printfield{postnote}}}% <<<2 + +\ExecuteBibliographyOptions{% >>>2 + loccittracker=constrict, + citetracker=context,% + ibidtracker=constrict,% + idemtracker=constrict,% + opcittracker=constrict,% + pagetracker,% + autocite=footnote,% + footcitepages=permit,% + labeldateparts,% + labeldate=year,% +}% <<<2 + +% <<<1 + +% Macros >>>1 + +\newbibmacro*{footcite}{% >>>2 + \usebibmacro{footcite:citepages}% + \global\togglefalse{cbx:loccit}% + \ifciteseen{% + \iffieldundef{shorthand}{% + \ifboolexpr{% + test {\ifciteibid}% + and% + not test {\iffirstonpage}% + }{% + \usebibmacro{footcite:ibid}% + }{% + \ifboolexpr{% + test {\ifciteidem}% + and% + not test {\iffirstonpage}% + }{% + \usebibmacro{footcite:idem}% + }{% + \ifboolexpr{% + test {\ifopcit}% + and% + not test {\iffirstonpage}% + }{% + \usebibmacro{footcite:opcit}% + }{% + \usebibmacro{footcite:short}% + }% + }% + }% + }{% + \usebibmacro{footcite:shorthand}% + }% + }{% + \usebibmacro{footcite:full}% + }% +}% <<<2 + +\newbibmacro*{footcite:full}{% >>>2 + \usebibmacro{footcite:full:citepages}% + \printtext[bibhypertarget]{% + \usedriver% + {\DeclareNameAlias{sortname}{default}}% + {\thefield{entrytype}}}% + \usebibmacro{shorthandintro}}% + +\newbibmacro*{footcite:short}{% + \ifnameundef{labelname}{% + \printtext[bibhyperref]{% + \printfield[citetitle]{labeltitle}% + }% + }{% + \printnames[LAST]{labelname}% + }% + \setunit*{\nameyeardelim}% + \iffieldundef{labelyear}{% + }{% + \printtext[bibhyperlink]{% + \printfield{labelyear}% + \printfield{extrayear}% + }% + }% +}% <<<2 + +\newbibmacro*{footcite:opcit}{% >>>2 + \ifnameundef{labelname}{% + \printtext[bibhyperref]{% + \printfield[citetitle]{labeltitle}% + }% + }{% + \printnames[LAST]{labelname}% + }% + \setunit*{\nameyeardelim}% + \printtext[bibhyperlink]{\bibstring[\mkopcit]{opcit}}% +}% + +\newbibmacro*{footcite:idem}{% + \printtext[bibhyperlink]{\bibstring[\mkidem]{idem}}% + \setunit*{\nameyeardelim}% + \iffieldundef{labelyear}{% + }{% + \printtext[bibhyperlink]{% + \printfield{labelyear}% + \printfield{extrayear}% + }% + }% +}% <<<2 + +\newbibmacro*{footcite:ibid}{% >>>2 + \printtext[bibhyperlink]{\bibstring[\mkibid]{ibidem}}% + \ifloccit% + {\global\toggletrue{cbx:loccit}}% + {}}% <<<2 + +\newbibmacro*{footcite:shorthand}{% >>>2 + \printtext[bibhyperlink]{% + \printfield{shorthand}}}% <<<2 + +\newbibmacro*{footcite:postnote:ibidpage}{% >>>2 + \iftoggle{cbx:loccit}% + {}% + {\MakeLowercase{\usebibmacro{postnote}}}}% <<<2 + +% <<<1 + +% Commands >>>1 + +\DeclareCiteCommand{\cite}% >>>2 + {\usebibmacro{prenote}}% + {\usebibmacro{citeindex}% + \usebibmacro{footcite}}% + {\multicitedelim}% + {\usebibmacro{footcite:postnote}}% <<<2 + +\DeclareCiteCommand{\parencite}[\mkbibparens]% >>>2 + {\usebibmacro{prenote}}% + {\usebibmacro{citeindex}% + \usebibmacro{footcite}}% + {\multicitedelim}% + {\usebibmacro{footcite:postnote}}% <<<2 + +\DeclareCiteCommand{\footcite}[\mkbibfootnote]% >>>2 + {\usebibmacro{prenote}}% + {\usebibmacro{citeindex}% + \usebibmacro{footcite}}% + {\multicitedelim}% + {\usebibmacro{footcite:postnote}}% <<<2 + +\DeclareCiteCommand*{\footcite}[\mkbibfootnote]% >>>2 + {\usebibmacro{prenote}}% + {\usebibmacro{citeindex}% + \usebibmacro{footcite:citepages}% + \global\togglefalse{cbx:loccit}% + \usebibmacro{footcite:short}}% + {\multicitedelim}% + {\usebibmacro{footcite:postnote}}% <<<2 + +\DeclareCiteCommand{\footcitetext}[\mkbibfootnotetext]% >>>2 + {\usebibmacro{prenote}}% + {\usebibmacro{citeindex}% + \usebibmacro{footcite}}% + {\multicitedelim}% + {\usebibmacro{footcite:postnote}}% <<<2 + +\DeclareCiteCommand{\smartcite}[\iffootnote\mkbibparens\mkbibfootnote]% >>>2 + {\usebibmacro{prenote}}% + {\usebibmacro{citeindex}% + \usebibmacro{footcite}}% + {\multicitedelim}% + {\usebibmacro{footcite:postnote}}% <<<2 + +% <<<1 + +% apud >>>1 + +\newcommand{\addapud}{%% >>>2 + \renewcommand*{\multicitedelim}{% + \ifnumequal{\value{multicitecount}}{\value{multicitetotal}}% + {\space\bibstring{apud}}% + {\addsemicolon}% + \space}% + \renewcommand*{\textcitedelim}{% + \ifnumequal{\value{multicitecount}}{\value{multicitetotal}}% + {\addspace\bibstring{apud}}% + {\addsemicolon}% + \space}% +}% <<<2 + +\newcommand{\addand}{%% >>>2 + \renewcommand*{\multicitedelim}{% + \ifnumequal{\value{multicitecount}}{\value{multicitetotal}}% + {\space\bibstring{and}}% + {\addsemicolon}% + \space}% + \renewcommand*{\textcitedelim}{% + \ifnumequal{\value{multicitecount}}{\value{multicitetotal}}% + {\addspace\bibstring{and}}% + {\addsemicolon}% + \space}% +}% <<<2 + +\DeclareCiteCommand{\@apud}[\mkbibfootnote]% >>>2 + {\iffieldundef{prenote}% + {}% + {\printfield[uppercasecite]{prenote}% + \addspace\bibstring{apud}\addspace}}% + {\usebibmacro{citeindex}% + \usebibmacro{footcite:short}}% + {\setunit{\multicitedelim}}% + {\usebibmacro{postnote}}% <<<2 + +\DeclareMultiCiteCommand{\apud}[\addapud\mkbibfootnote]% >>>2 + {\@apud}% + {\setunit{\multicitedelim}% +}% <<<2 + +% <<<1 + +% textcite >>>1 + +\renewbibmacro*{textcite}{% >>>2 + \ifnameundef{labelname}% + {\printfield[citetitle]{labeltitle}}% + {\printnames{labelname}}}% <<<2 + +\newbibmacro*{textcite:init}{% >>>2 + \citetrackerfalse% + \pagetrackerfalse% + \iffirstcitekey% + {\global\undef\cbx@lasthash}% + {}}% <<<2 + +\newbibmacro*{textcite:count}{% >>>2 + \stepcounter{textcitetotal}% + \ifnumgreater{\value{uniquelist}}{\value{maxnames}}% + {\ifnumgreater{\value{uniquelist}}{\value{textcitemaxnames}}% + {\setcounter{textcitemaxnames}{\value{uniquelist}}}% + {}}% + {\ifnumless{\value{labelname}}{\value{maxnames}}% + {\ifnumgreater{\value{labelname}}{\value{textcitemaxnames}}% + {\setcounter{textcitemaxnames}{\value{labelname}}}% + {}}% + {\ifnumgreater{\value{maxnames}}{\value{textcitemaxnames}}% + {\setcounter{textcitemaxnames}{\value{maxnames}}}% + {}}}}% <<<2 + +\DeclareCiteCommand{\cbx@textcite}% >>>2 + {\usebibmacro{textcite:init}}% + {\iffieldequals{namehash}{\cbx@lasthash}% + {}% + {\iffirstcitekey% + {}% + {\textcitedelim}% + \stepcounter{textcitecount}% + \usebibmacro{textcite}% + \savefield{namehash}{\cbx@lasthash}}}% + {}% + {}% <<<2 + +\DeclareCiteCommand{\textcite}[\cbx@textcite@init\cbx@textcite\footcite]% >>>2 + {\usebibmacro{textcite:init}% + \gdef\cbx@savedkeys{}% + \DeferNextCitekeyHook}% + {\ifthenelse{\iffirstcitekey\AND\value{multicitetotal}>0}% + {\protected@xappto\cbx@footcite@args{% + (\thefield{multiprenote})(\thefield{multipostnote})}}% + {}% + \xappto\cbx@savedkeys{\thefield{entrykey},}% + \iffieldequals{namehash}{\cbx@lasthash}% + {}% + {\usebibmacro{textcite:count}% + \savefield{namehash}{\cbx@lasthash}}% + \ifnumequal{\value{footcitecount}}{\value{footcitetotal}}% + {\protected@xappto\cbx@textcite@args{{\cbx@savedkeys}}% + \protected@xappto\cbx@footcite@args{% + [\thefield{prenote}][\thefield{postnote}]{\cbx@savedkeys}}% + \iflastcitekey% + {\protected@xappto\cbx@textcite@args{\thefield{postpunct}}% + \protected@xappto\cbx@footcite@args{\nopunct}}% + {}}% + {}}% + {}% + {}% <<<2 + +% textcite has nested \DeclareCiteCommand definitions for +% textcite and we want to use % the normal textcite context +\DeclareDelimcontextAlias{cbx@textcite}{textcite}% + +\newrobustcmd{\cbx@textcite@init}[3]{% >>>2 + \setcounter{textcitetotal}{0}% + \setcounter{textcitecount}{0}% + \setcounter{textcitemaxnames}{0}% + \def\cbx@textcite@args{#1}\def\cbx@footcite@args{#2}#3% + \cbx@textcite@args\@empty\cbx@footcite@args\@empty}% <<<2 + +\DeclareMultiCiteCommand{\cbx@textcites}{\cbx@textcite}{}% +\DeclareMultiCiteCommand{\textcites}% + [\cbx@textcites@init\cbx@textcites\footcites]{\textcite}{}% + +\let\cbx@textcites@init\cbx@textcite@init% >>>2 +\pretocmd{\cbx@textcites@init}{% + \UseNextMultiCiteHook% + \AtNextMultiCite{% + \renewbibmacro{multiprenote}{}% + \renewbibmacro{multipostnote}{}}}{}{}% <<<2 + +% <<<1 + +\endinput% + + +% vim: set foldmarker=\ >>>,\ <<< : + diff --git a/Master/texmf-dist/tex/latex/biblatex-abnt/abnt-numeric.bbx b/Master/texmf-dist/tex/latex/biblatex-abnt/abnt-numeric.bbx index 55b1581520b..de9304d13a2 100644 --- a/Master/texmf-dist/tex/latex/biblatex-abnt/abnt-numeric.bbx +++ b/Master/texmf-dist/tex/latex/biblatex-abnt/abnt-numeric.bbx @@ -13,19 +13,20 @@ %% The Current Maintainer of this work is Daniel B. Marques. \ProvidesFile{abnt-numeric.bbx}% -[2016/07/06\space v2.0.1\space ABNT biblatex citation style]% +[2016/10/03\space v3.0\space ABNT BibLaTeX citation style]% \RequireBibliographyStyle{abnt} \ExecuteBibliographyOptions{labelnumber} -\providebool{bbx:subentry} +\providebool{bbx:subentry} \DeclareBibliographyOption[boolean]{subentry}[true]{% \setbool{bbx:subentry}{#1}} \DeclareFieldFormat{bibentrysetcount}{\mkbibparens{\mknumalph{#1}}} -\defbibenvironment{bibliography} + +\defbibenvironment{bibliography}% >>> {\list {\printtext[labelnumberwidth]{% \printfield{labelprefix}% @@ -38,9 +39,9 @@ \setlength{\parsep}{\bibparsep}}% \renewcommand*{\makelabel}[1]{\hss##1}} {\endlist} - {\item} + {\item}% <<< -\defbibenvironment{shorthand} +\defbibenvironment{shorthand}% >>> {\list {\printfield[shorthandwidth]{shorthand}} {\setlength{\labelwidth}{\shorthandwidth}% @@ -51,9 +52,9 @@ \setlength{\parsep}{\bibparsep}% \renewcommand*{\makelabel}[1]{\hss##1}}} {\endlist} - {\item} + {\item}% <<< -\DeclareBibliographyDriver{set}{% +\DeclareBibliographyDriver{set}{%% >>> \entryset {\ifbool{bbx:subentry} {\printfield[bibentrysetcount]{entrysetcount}% @@ -62,6 +63,10 @@ {}% \newunit\newblock \usebibmacro{setpageref}% - \finentry} + \finentry}% <<< \endinput + + +% vim: set foldmarker=\ >>>,\ <<< : + diff --git a/Master/texmf-dist/tex/latex/biblatex-abnt/abnt-numeric.cbx b/Master/texmf-dist/tex/latex/biblatex-abnt/abnt-numeric.cbx index 20d8d66181f..f2e2777143e 100644 --- a/Master/texmf-dist/tex/latex/biblatex-abnt/abnt-numeric.cbx +++ b/Master/texmf-dist/tex/latex/biblatex-abnt/abnt-numeric.cbx @@ -13,38 +13,44 @@ %% The Current Maintainer of this work is Daniel B. Marques. \ProvidesFile{abnt-numeric.cbx}% -[2016/07/06\space v2.0.1\space ABNT biblatex citation style]% +[2016/10/03\space v3.0\space ABNT BibLaTeX citation style]% \RequireCitationStyle{numeric} -\DeclareCiteCommand{\cite}[\mkbibparens] +% Cite commands >>>1 + +\DeclareCiteCommand{\cite}[\mkbibparens]% >>>2 {\usebibmacro{prenote}} {\usebibmacro{citeindex}% \usebibmacro{cite}} {\multicitedelim} - {\usebibmacro{postnote}} + {\usebibmacro{postnote}}% <<<2 -\DeclareCiteCommand{\parencite}[\mkbibparens] +\DeclareCiteCommand{\parencite}[\mkbibparens]% >>>2 {\usebibmacro{prenote}} {\usebibmacro{citeindex}% \usebibmacro{cite}} {\multicitedelim} - {\usebibmacro{postnote}} + {\usebibmacro{postnote}}% <<<2 -\DeclareCiteCommand{\smartcite}[\iffootnote\mkbibparens\mkbibfootnote] +\DeclareCiteCommand{\smartcite}[\iffootnote\mkbibparens\mkbibfootnote]% >>>2 {\usebibmacro{prenote}} {\usebibmacro{citeindex}% \usebibmacro{cite}} {\multicitedelim} - {\usebibmacro{postnote}} + {\usebibmacro{postnote}}% <<<2 \DeclareMultiCiteCommand{\cites}[\mkbibparens]{\cite}{\multicitedelim} -\DeclareMultiCiteCommand{\parencites}[\mkbibparens]{\parencite}{\multicitedelim} -\DeclareMultiCiteCommand{\smartcites}[\iffootnote\mkbibparens\mkbibfootnote] - {\smartcite}{\multicitedelim} +\DeclareMultiCiteCommand{\parencites}% + [\mkbibparens]{\parencite}{\multicitedelim} + +\DeclareMultiCiteCommand{\smartcites}% + [\iffootnote\mkbibparens\mkbibfootnote]{\smartcite}{\multicitedelim} -\renewbibmacro*{textcite}{% +% <<<1 + +\renewbibmacro*{textcite}{%% >>>1 \iffieldequals{namehash}{\cbx@lasthash} {\setunit{\multicitedelim}} {\ifnameundef{labelname} @@ -63,7 +69,10 @@ \ifbool{cbx:parens} {\bibcloseparen\global\boolfalse{cbx:parens}} {}% - \textcitedelim}} - + \textcitedelim}}% <<<1 \endinput + + +% vim: set foldmarker=\ >>>,\ <<< : + diff --git a/Master/texmf-dist/tex/latex/biblatex-abnt/abnt.bbx b/Master/texmf-dist/tex/latex/biblatex-abnt/abnt.bbx index 01fb395227a..199eed988bb 100644 --- a/Master/texmf-dist/tex/latex/biblatex-abnt/abnt.bbx +++ b/Master/texmf-dist/tex/latex/biblatex-abnt/abnt.bbx @@ -13,7 +13,10 @@ %% The Current Maintainer of this work is Daniel B. Marques. \ProvidesFile{abnt.bbx}% -[2016/07/06\space v2.0.1\space ABNT biblatex citation style]% +[2016/10/03\space v3.0\space ABNT BibLaTeX citation style]% + + +% Init >>>1 \RequireBiber[3]% \DeclareLanguageMapping{brazilian}{abnt-brazilian}% @@ -24,36 +27,40 @@ \InitializeBibliographyStyle{\global\undef\bbx@lasthash}% +% <<<1 -% ---------- -% Options -% ---------- -% Option to make titles bold. -\newtoggle{bftitles}% -\DeclareBibliographyOption{bftitles}[true]{% - \settoggle{bftitles}{#1}}% +% Options >>>1 -% Option to use small caps in the bibliography. +% Print titles in italics >>>2 +\newtoggle{ittitles}% +\DeclareBibliographyOption{ittitles}[true]{% + \settoggle{ittitles}{#1}}% +% <<<2 + +% Use small caps in the bibliography >>>2 \newtoggle{scbib}% \DeclareBibliographyOption{scbib}[true]{% \settoggle{scbib}{#1}}% +% <<<2 -% Option to hide "[s.l.]". +% Hide "[s.l.]" >>>2 \newtoggle{nosl}% \DeclareBibliographyOption{nosl}[true]{% \settoggle{nosl}{#1}}% \DeclareEntryOption[boolean]{nosl}[true]{% \settoggle{nosl}{#1}}% +% <<<2 -% Option to hide "[s.n.]". +% Hide "[s.n.]" >>>2 \newtoggle{nosn}% \DeclareBibliographyOption{nosn}[true]{% \settoggle{nosn}{#1}}% \DeclareEntryOption[boolean]{nosn}[true]{% \settoggle{nosn}{#1}}% +% <<<2 -% Option to hide "[S.l.: sn]". +% Hide "[S.l.: sn]" >>>2 \newtoggle{noslsn}% \DeclareBibliographyOption{noslsn}[true]{% \settoggle{noslsn}{#1}% @@ -63,17 +70,19 @@ \settoggle{noslsn}{#1}% \settoggle{nosl}{#1}% \settoggle{nosn}{#1}}% +% <<<2 +% Repeat titles >>>2 \newtoggle{repeattitle}% \DeclareBibliographyOption[boolean]{repeattitles}[true]{% \settoggle{repeattitle}{#1}% \ifstrequal{#1}{true}{% - \newbibmacro*{bbx:savetitle}{}% - \newbibmacro*{bbx:savesubtitle}{}% + \renewbibmacro*{bbx:savetitle}{}% + \renewbibmacro*{bbx:savesubtitle}{}% }{% \ExecuteBibliographyOptions{pagetracker}% - \newbibmacro*{bbx:savetitle}{\savefield{title}{\bbx@lasttitle}}% - \newbibmacro*{bbx:savesubtitle}{\savefield{subtitle}{\bbx@lastsubtitle}}% + \renewbibmacro*{bbx:savetitle}{\savefield{title}{\bbx@lasttitle}}% + \renewbibmacro*{bbx:savesubtitle}{\savefield{subtitle}{\bbx@lastsubtitle}}% }% }% \DeclareEntryOption[boolean]{repeattitle}[true]{% @@ -82,7 +91,19 @@ \DeclareEntryOption[boolean]{repeattitles}[true]{% \settoggle{repeattitle}{#1}% }% +% <<<2 + +% Repeat first fields >>>2 +\newtoggle{repeatfirstfields}% +\DeclareBibliographyOption[boolean]{repeatfirstfields}[true]{% + \settoggle{repeatfirstfields}{#1}% +}% +\DeclareEntryOption[boolean]{repeatfirstfields}[true]{% + \settoggle{repeatfirstfields}{#1}% +}% +% <<<2 +% Repeat fields >>>2 \newtoggle{repeatfields}% \DeclareBibliographyOption[boolean]{repeatfields}[true]{% \settoggle{repeatfields}{#1}% @@ -102,31 +123,46 @@ \DeclareEntryOption[boolean]{repeatfields}[true]{% \settoggle{repeatfields}{#1}% }% +% <<<2 -% Option to use the original dashes instead of underscores. +% Use original dashes instead of underscores >>>2 +\newtoggle{usedashes}% \DeclareBibliographyOption[boolean]{usedashes}[true]{% - \ifstrequal{#1}{true}% - {\renewcommand*{\bibnamedash}{% - \ifdimless{\leftmargin}{0.75em}% - {\mbox{\textemdash\addspace}}% - {\makebox[\leftmargin][l]{% - \ifdimless{\leftmargin}{1.25em}% - {\textendash}% - {\textemdash}}}}}{}}% - -% Option to use hanging indentation. + \settoggle{usedashes}{#1}% + \ifstrequal{#1}{true}{% + \renewcommand*{\bibnamedash}{% + \ifdimless{\leftmargin}{0.75em}{% + \mbox{\textemdash\addspace}% + }{% else + \makebox[\leftmargin][l]{% + \ifdimless{\leftmargin}{1.25em}{% + \textendash% + }{% + \textemdash% + }% + }% + }% + }% + }{}% +}% +% <<<2 + +% Use hanging indentation >>>2 \setlength{\bibhang}{0pt}% \DeclareBibliographyOption{indent}[true]{% - \ifstrequal{#1}{true}% - {\setlength{\bibhang}{\ifnumequal{\parindent}{0}{1em}{\parindent}}}% - {}}% + \ifstrequal{#1}{true}{% + \setlength{\bibhang}{% + \ifnumequal{\parindent}{0}{1em}{\parindent}% + }% + }{}}% +% <<<2 +% <<<1 -% ---------- -% DeclareSortingScheme -% ---------- -\DeclareSortingScheme{nty}{% +% Data model and sorting >>>1 + +\DeclareSortingScheme{nty}{%% >>>2 \sort{% \field{presort}% }% @@ -165,15 +201,10 @@ \field[padside=left,padwidth=4,padchar=0]{volume}% \literal{0000}% }% -}% - - -% ---------- -% DeclareSourcemap -% ---------- +}% <<<2 -% This maps some fields used in abntex2cite to biblatex fields. -\DeclareSourcemap{% +\DeclareSourcemap{%% >>>2 + % This maps some fields used in abntex2cite to biblatex fields. \maps[datatype=bibtex]{% \map{% \step[fieldsource=conference-number,fieldtarget=number]% @@ -206,16 +237,16 @@ \step[fieldset=bookpagination, fieldvalue={sheet}]% }% }% -}% +}% <<<2 -\DeclareDatamodelFields[type=field,datatype=literal]{% +\DeclareDatamodelFields[type=field,datatype=literal]{%% >>>2 section,% illustrated,% dimensions,% reprinted-text,% -}% +}% <<<2 -\DeclareDatamodelEntryfields[monography]{% +\DeclareDatamodelEntryfields[monography]{%% >>>2 location,% author,% chapter% @@ -233,64 +264,109 @@ addendum,% pubstate,% pageref,% - date}% - - -% ---------- -% newcommand -% ---------- + date% +}% <<<2 -\newcommand{\abntnum}[1]{\ifrmnum{#1}{\rmntonum{#1}}{#1}}% +% <<<1 -% Use "John Doe, Jack Roe and Joe Blow" for byeditor+others, -% "Doe; Roe; Blow" everywhere else. -\newtoggle{byeditor+others}% -\renewcommand*{\multinamedelim}{\iftoggle{byeditor+others}{\addcomma\addspace}{\addsemicolon\addspace}}% -\renewcommand*{\finalnamedelim}{\iftoggle{byeditor+others}{\addspace\bibstring{and}\addspace}{\addsemicolon\addspace}}% -\renewcommand*{\nameyeardelim}{\addcomma\addspace}% +% Formatting >>>1 -\renewcommand*{\subtitlepunct}{\addcolon\addspace}% +% Capitalization commands >>>2 -% Use a period to separate the backref from what comes before -% E.g.: "1973. p. 33–79. Ver p. 2." -\renewcommand*{\bibpagerefpunct}{\addperiod\addspace}% +\renewcommand*{\mkbibacro}[1]{% + \iftoggle{scbib}{% + \textsc{\MakeLowercase{#1}}% + }{\MakeUppercase{#1}}% +}% -% A command to make the first word in a sentence uppercase, -% used for the title when a book has no author. \newcommand\FirstWordUpper[1]{\@firstwordupper#1 \@nil}% \newcommand\@firstwordupper{}% \def\@firstwordupper#1 #2\@nil{\MakeUppercase{#1} #2\unskip}% -% A command to print the first word in a sentence in small caps, -% used for the title when a book has no author. \newcommand\FirstWordSC[1]{\@firstwordsc#1 \@nil}% \newcommand\@firstwordsc{}% \def\@firstwordsc#1 #2\@nil{\textsc{#1} #2\unskip}% -% A command to print the first word in a sentence in lowercase and in small caps. \newcommand\FirstWordLCSC[1]{\@firstwordlcsc#1 \@nil}% \newcommand\@firstwordlcsc{}% \def\@firstwordlcsc#1 #2\@nil{\textsc{\MakeLowercase{#1}} #2\unskip}% -% This has to do with the dashed option -\newbool{bbx@inset}% +\long\def\addto#1#2{\expandafter\def\expandafter#1\expandafter{#1#2}}% + +\def\traceparam#1{\def\paramL{}\traceparamA #1\end}% +\def\traceparamA{\futurelet\next\traceparamB}% +\def\traceparamB{% + \let\nexts=\undefined% + \expandafter\ifx\space\next \let\nexts=\traceparamS \fi% + \ifx\bgroup\next \let\nexts=\traceparamD \fi% + \ifx\end\next \let\nexts=\traceparamE \fi% + \ifx\nexts\undefined \let\nexts=\traceparamC\fi% + \nexts% +}% +\def\traceparamS{\addto\paramL{ }\afterassignment\traceparamA \let\next= }% +\def\traceparamC#1{\addto\paramL{#1}\traceparamA}% +\def\traceparamD#1{% + \expandafter\addto\expandafter\paramL\expandafter% + {\expandafter\noexpand\csname ll:\detokenize{#1}\endcsname}% + \expandafter\def\csname ll:\detokenize{#1}\endcsname{\normalfont #1}% + \traceparamA% +}% +\def\traceparamE\end{}% -% This replaces repeated authors' names. -\renewcommand*{\bibnamedash}{\underline{\hspace*{4em}}\addperiod\addspace}% +\def\smartuppercase#1{% + \bgroup % + \traceparam{#1}% + \MakeUppercase{\paramL}% + \egroup% +}% -% Use or not small caps for acronyms, depending on the scbib option. -\renewcommand*{\mkbibacro}[1]{% - \iftoggle{scbib}% - {\textsc{\MakeLowercase{#1}}}% - {#1}}% +\def\smartlowercase#1{% + \bgroup % + \traceparam{#1}% + \MakeLowercase{\paramL}% + \egroup% +}% +\def\smartlcsc#1{% + \bgroup % + \traceparam{#1}% + \textsc{\MakeLowercase{\paramL}}% + \egroup% +}% + +\def\smartsc#1{% + \bgroup % + \traceparam{#1}% + \textsc{\paramL}% + \egroup% +}% + +% <<<2 + +% Name format >>>2 + +% Name delimiters >>>3 +\newtoggle{byeditor+others}% + +\renewcommand*{\multinamedelim}{% + \iftoggle{byeditor+others}{% + \addcomma\addspace% + }{% + \addsemicolon\addspace% + }% +}% -% ---------- -% DeclareNameFormat -% ---------- +\renewcommand*{\finalnamedelim}{% + \iftoggle{byeditor+others}{% + \addspace\bibstring{and}\addspace% + }{% + \addsemicolon\addspace% + }% +}% +% <<< -\DeclareNameFormat{LAST-first}{% +\DeclareNameFormat{LAST-first}{%% >>>3 \ifgiveninits{% \usebibmacro{name:family-given}{% \iftoggle{scbib}{% @@ -315,14 +391,15 @@ {\namepartsuffix}% }% \usebibmacro{name:andothers}% -}% +}% <<< -\DeclareNameFormat{full}{% +\DeclareNameFormat{full}{%% >>>3 \usebibmacro{name:given-family}% {\namepartfamily}% {\namepartgiven}% {\namepartprefix}% - {\namepartsuffix}}% + {\namepartsuffix}% +}% <<< \DeclareNameAlias{default}{LAST-first}% @@ -340,72 +417,189 @@ \DeclareNameAlias{withforeword}{given-family}% \DeclareNameAlias{withafterword}{given-family}% -% ---------- -% DeclareFieldFormat -% ---------- +\DeclareBibliographyAlias{legislation}{article}% +\DeclareBibliographyAlias{jurisdiction}{article}% +\DeclareBibliographyAlias{legal}{article}% -% Use bold or italics for the main titles, depending on what the user chose. -\DeclareFieldFormat{journaltitle}{\iftoggle{bftitles}{\addspace\mkbibbold{#1}\isdot}{\addspace\mkbibemph{#1}\isdot}}% -\DeclareFieldFormat{issuetitle}{\iftoggle{bftitles}{\addspace\mkbibbold{#1}\isdot}{\addspace\mkbibemph{#1}\isdot}}% -\DeclareFieldFormat{maintitle}{\iftoggle{bftitles}{\addspace\mkbibbold{#1}\isdot}{\addspace\mkbibemph{#1}\isdot}}% -\DeclareFieldFormat{booktitle}{\iftoggle{bftitles}{\addspace\mkbibbold{#1}\isdot}{\addspace\mkbibemph{#1}\isdot}}% -\DeclareFieldFormat{citetitle}{\iftoggle{bftitles}{\addspace\mkbibbold{#1}\isdot}{\addspace\mkbibemph{#1}\isdot}}% -\DeclareFieldFormat*{title}{\iftoggle{bftitles}{\addspace\mkbibbold{#1}\isdot}{\addspace\mkbibemph{#1}\isdot}}% +% <<<2 -\DeclareFieldFormat{authortype}{\bibsentence#1} -\DeclareFieldFormat{editortype}{\bibsentence#1} +% Field format >>>2 -% Use normal text for the title in these entries. -\DeclareFieldFormat% - [article, inbook, incollection, bookinbook, inproceedings, unpublished]% - {title}{\addspace #1\isdot}% +% Standard entry fields >>>3 -\DeclareNumChars*{,-/}% Strings with these characters will still be considered numbers. +\DeclareFieldFormat{authortype}{\printtext[parens]{\bibsentence#1}}% +\DeclareFieldFormat{editortype}{\printtext[parens]{\bibsentence#1}}% -% Add "n." and "v." abbreviations and make them, along with "p.", always lowercase, -% even if preceded by a period. E.g.: "London: Routledge, 2009. p. 235–250." -\DeclareFieldFormat*{number}{% - \ifnumerals{#1}% - {\addspace \MakeLowercase{\bibstring{number}}~\abntnum{#1}}% - {\addspace #1\isdot}}% +\DeclareFieldFormat{nameaddon}{\addspace #1}% -\DeclareFieldFormat[book, proceedings, inproceedings, misc]{number}{\addcomma\addspace #1}% +% titles >>>4 -\DeclareFieldFormat*{volume}{% +\renewcommand*{\subtitlepunct}{\addcolon\addspace}% +\renewcommand*{\bibpagerefpunct}{\addcomma\addspace}% + +\DeclareFieldFormat{journaltitle}{%% >>> + \iftoggle{ittitles}{% + \addspace\mkbibemph{#1}\isdot% + }{% + \addspace\mkbibbold{#1}\isdot% + }% +}%% <<< +\DeclareFieldFormat{issuetitle}{%% >>> + \iftoggle{ittitles}{% + \addspace\mkbibemph{#1}\isdot% + }{% + \addspace\mkbibbold{#1}\isdot% + }% +}%% <<< +\DeclareFieldFormat{maintitle}{%% >>> + \iftoggle{ittitles}{% + \addspace\mkbibemph{#1}\isdot% + }{% + \addspace\mkbibbold{#1}\isdot% + }% +}%% <<< +\DeclareFieldFormat{booktitle}{%% >>> + \iftoggle{ittitles}{% + \addspace\mkbibemph{#1}\isdot% + }{% + \addspace\mkbibbold{#1}\isdot% + }% +}%% <<< +\DeclareFieldFormat{citetitle}{%% >>> + \iftoggle{ittitles}{% + \addspace\mkbibemph{#1}\isdot% + }{% + \addspace\mkbibbold{#1}\isdot% + }% +}%% <<< +\DeclareFieldFormat*{title}{%% >>> + \iftoggle{ittitles}{% + \addspace\mkbibemph{#1}\isdot% + }{% + \addspace\mkbibbold{#1}\isdot% + }% +}%% <<< +\DeclareFieldFormat[% title >>> + article,% + legislation,% + jurisdiction,% + legal,% + inbook,% + incollection,% + bookinbook,% + inproceedings,% + unpublished% +]{title}{\addspace #1\isdot}%% <<< + +% <<< + +% number >>>4 +\DeclareNumChars*{,-/}% +\newcommand{\abntnum}[1]{\ifrmnum{#1}{\rmntonum{#1}}{#1}}% +\DeclareFieldFormat*{number}{%% >>> + \ifnumerals{#1}% + {\addspace \MakeLowercase{\bibstring{number}}~\abntnum{#1}}% + {\addspace #1\isdot}% +}%% <<< +\DeclareFieldFormat[% number >>> + book,% + collection,% + proceedings,% + inproceedings,% + misc% +]{number}{\addcomma\addspace #1}%% <<< +% <<< + +\DeclareFieldFormat*{volume}{%% >>>4 \ifnumerals{#1}% {\addspace \MakeLowercase{\bibstring{volume}}~#1}% - {\addspace #1\isdot}}% + {\addspace #1\isdot}% +}%% <<< -\DeclareFieldFormat*{chapter}{% +\DeclareFieldFormat*{chapter}{%% >>>4 \ifnumerals{#1}% {\addspace \MakeLowercase{\bibstring{chapter}~#1}}% - {\addspace #1\isdot}}% + {\addspace #1\isdot}% +}%% <<< -\DeclareFieldFormat{edition}{% +\DeclareFieldFormat{edition}{%% >>>4 \ifnumerals{#1}% {\addspace #1\adddot\addspace\bibstring{edition}}% - {\addspace #1\isdot}}% + {\addspace #1\isdot}% +}%% <<< + +\DeclareFieldFormat*{pages}{%% >>>4 + \MakeLowercase{\mkpageprefix[bookpagination]{#1}}% +}%% <<< -\DeclareFieldFormat*{pages}{\MakeLowercase{\mkpageprefix[bookpagination]{#1}}}% -\DeclareFieldFormat*{pagetotal}{\MakeLowercase{\mkpagetotal[bookpagination]{#1}}}% -% Always use "f." for the pagination in thesis. -%\DeclareFieldFormat[thesis]{pagetotal}{\MakeLowercase{#1 \bibstring{sheet}}}% +\DeclareFieldFormat*{pagetotal}{%% >>>4 + \MakeLowercase{\mkpagetotal[bookpagination]{#1}}% +}%% <<< \DeclareFieldFormat{illustrated}{\addspace #1\isdot}% \DeclareFieldFormat{url}{\bibstring{url}\addcolon\addspace\url{<#1>}}% \DeclareFieldFormat{urldate}{\bibstring{urlseen}\addcolon\addspace #1}% -\DeclareFieldFormat*{note}{\addspace #1\addperiod\addspace}% +\DeclareFieldFormat*{note}{\addspace #1}% \DeclareFieldFormat{mathesis}{\bibstring{mathesis}}% \DeclareFieldFormat{phdthesis}{\bibstring{phdthesis}}% -\DeclareFieldFormat[monography]{type}{\bibstring{monography}\addspace\printtext[parens]{#1}}% +\DeclareFieldFormat[monography]{type}{%% >>>4 + \bibstring{monography}\addspace\printtext[parens]{#1}% +}%% <<< + +\DeclareFieldFormat{origlanguage}{%% >>>4 + \ifbibstring{#1}% + {\bibxstring{#1}}% + {\ifbibstring{from#1}% + {\bibxstring{from#1}}% + {#1}}% +}%% <<< + +% is*n >>>4 +\DeclareFieldFormat{isbn}{\mkbibacro{ISBN}\space #1}% +\DeclareFieldFormat{isrn}{\mkbibacro{ISRN}\space #1}% +\DeclareFieldFormat{issn}{\mkbibacro{ISSN}\space #1}% +% <<< + +% relatedstring >>>4 +\DeclareFieldFormat{relatedstring:reprintfrom}{#1\addcolon\addspace}% +\DeclareFieldFormat{relatedstring:reviewof}{#1\addcolon\addspace}% +\DeclareFieldFormat{relatedstring:default}{#1\addcolon\addspace}% +% <<< + +% <<< + +% Capitalization >>>3 -\DeclareFieldFormat{uppercase}{\iftoggle{scbib}{\textsc{\smartlowercase{#1}}}{\smartuppercase{#1}}}% \DeclareFieldFormat{lowercase}{\smartlowercase{#1}}% -\DeclareFieldFormat{upperfirst}{% + +\DeclareFieldFormat{uppercase}{%% >>> + \iftoggle{scbib}{% + \textsc{\smartlowercase{#1}}% + }{% + \smartuppercase{#1}% + }% +}%% <<< + +\DeclareListFormat{uppercase}{%% >>> + \usebibmacro{list:delim}{#1}% + \iftoggle{scbib}{% + \ifgiveninits{% + \normalfont\smartsc{#1}% + }{% + \normalfont\smartlcsc{#1}% + }% + }{% + \normalfont\smartuppercase{#1}% + }% + \isdot% + \usebibmacro{list:andothers}% +}%% <<< + +\DeclareFieldFormat{upperfirst}{%% >>> \iftoggle{scbib}{% \ifgiveninits{% \normalfont\FirstWordSC{#1}% @@ -415,37 +609,9 @@ }{% \normalfont\FirstWordUpper{#1}% }% -}% -\DeclareFieldFormat{noformat}{\normalfont{#1}}% - -\DeclareFieldFormat{nameaddon}{\addspace #1}% - -\DeclareFieldFormat{relatedstring:reprintfrom}{\addspace #1\addcolon\addspace}% -\DeclareFieldFormat{relatedstring:default}{\addspace #1\addcolon\addspace}% - -\DeclareFieldFormat{origlanguage}{% - \ifbibstring{#1}% - {\bibxstring{#1}}% - {\ifbibstring{from#1}% - {\bibxstring{from#1}}% - {#1}}% -}% - -\DeclareListFormat{uppercase}{% - \usebibmacro{list:delim}{#1}% - \iftoggle{scbib}{% - \ifgiveninits{% - \normalfont\smartsc{#1}% - }{% - \normalfont\smartlcsc{#1}% - }% - }{% - \normalfont\smartuppercase{#1}% - }% - \isdot% - \usebibmacro{list:andothers}}% +}%% <<< -\DeclareListFormat{upperfirst}{% +\DeclareListFormat{upperfirst}{%% >>> \usebibmacro{list:delim}{#1}% \iftoggle{scbib}{% \ifgiveninits{% @@ -458,59 +624,121 @@ }% \isdot% \usebibmacro{list:andothers}% -}% +}%% <<< +% <<< -% ---------- -% newbibmacro -% ---------- +\DeclareFieldFormat{noformat}{\normalfont{#1}}% -% Always use a period after the year. -\renewbibmacro*{date}{\printdate\addperiod}% +% <<<2 -% Use a comma after journal volumes. -\renewbibmacro*{volume+number+eid}{% - \printfield{volume}% - \setunit*{\addcomma\addspace}% - \printfield{number}% - \setunit{\addcomma\addspace}% - \printfield{eid}}% +% <<<1 -% Don't use parenthesis around the date. -\renewbibmacro*{issue+date}{% - \iffieldundef{issue}% - {\usebibmacro{date}}% - {\printfield{issue}% - \setunit*{\addspace}% - \usebibmacro{date}}% - \newunit}% -% Add a comma after journal names and remove the date. -\renewbibmacro*{journal+issuetitle}{% - \usebibmacro{journal}% - \setunit*{\addcomma\addspace}% - \iffieldundef{series}% - {}% - {\newunit% - \printfield{series}% - \setunit{\addspace}}% - \usebibmacro{volume+number+eid}% - \newunit}% +% Macros >>>1 -% Remove the parenthesis around the backref. -\renewbibmacro*{pageref}{% - \iflistundef{pageref}% - {}% - {\printtext{% \printtext[parens]{% - \ifnumgreater{\value{pageref}}{1}% - {\bibstring{backrefpages}\ppspace}% - {\bibstring{backrefpage}\ppspace}% - \printlist[pageref][-\value{listtotal}]{pageref}}}}% +% Dashed option >>>2 + +\newbool{bbx@inset}% + +\newtoggle{isdashed}% + +\newcommand*{\bibnameunderscore}{\underline{\hspace*{4em}}}% +\newcommand*{\nopunctdash}{\bibnameunderscore\addspace}% +\renewcommand*{\bibnamedash}{\bibnameunderscore\addperiod\addspace}% + +\renewbibmacro*{begrelated}{%% >>>3 + \booltrue{bbx@inset}% +}%% <<<3 + +\newbibmacro*{bbx:savehash}{%% >>>3 + \savefield{fullhash}{\bbx@lasthash}% +}%% <<<3 + +\newbibmacro*{bbx:saveorg}{%% >>>3 + \savelist{organization}{\bbx@lastorg}% +}%% <<<3 + +\newbibmacro*{bbx:savetitle}{%% >>>3 + \savefield{title}{\bbx@lasttitle}% +}%% <<<3 + +\newbibmacro*{bbx:savesubtitle}{%% >>>3 + \savefield{subtitle}{\bbx@lastsubtitle}% +}%% <<<3 + +\newbibmacro*{bbx:dashcheck}[2]{%% >>>3 + \ifboolexpr{% + (% + test {\iffieldequals{fullhash}{\bbx@lasthash}}% + or% + test {\iflistequals{organization}{\bbx@lastorg}}% + )% + and% + not test \iffirstonpage% + and% + not test {\iftoggle{repeatfields}}% + and% + not test {\iftoggle{repeatfirstfields}}% + and% + (% + not bool {bbx@inset}% + or% + test {\iffieldequalstr{entrysetcount}{1}}% + )% + }% + {\settoggle{isdashed}{true}#1}% + {\settoggle{isdashed}{false}#2}% +}%% <<<3 + +\newbibmacro*{bbx:titledashcheck}[2]{%% >>>3 + \iftoggle{isdashed}{% + \ifboolexpr{% + test {\iffieldequals{title}{\bbx@lasttitle}}% + and% + (% + test {\iffieldequals{subtitle}{\bbx@lastsubtitle}}% + or% + test {\iffieldundef{subtitle}}% + )% + and% + not test {\iftoggle{repeattitle}}% + }% + {#1}% + {#2}% + }{% + #2% + }% +}%% <<<3 + +\newbibmacro*{bbx:ineditordashcheck}[2]{%% >>>3 + \ifboolexpr{% + test {\ifnamesequal{editor}{author}}% + and% + not test {\iftoggle{repeatfields}}% + and% + (% + not bool {bbx@inset}% + or% + test {\iffieldequalstr{entrysetcount}{1}}% + )% + }% + {\settoggle{isdashed}{true}#1}% + {\settoggle{isdashed}{false}#2}% +}%% <<<3 + +% <<<2 + +% Titles >>>2 -\newbibmacro*{titleiskey}[2]{% +\newbibmacro*{titleiskey}[2]{%% >>>3 \ifboolexpr{% test {\ifnameundef{author}}% and% + test {\ifnameundef{editor}}% + and% + test {\ifnameundef{holder}}% + and% test {\ifcsundef{saveded}}% and% test {\ifcsundef{savedorg}}% @@ -518,9 +746,10 @@ test {\iffieldundef{eventtitle}}% }% {#1}% - {#2}}% + {#2}% +}%% <<<3 -\renewbibmacro*{title}{% +\renewbibmacro*{title}{%% >>>3 \ifboolexpr{% test {\iffieldundef{title}}% and% @@ -535,46 +764,39 @@ \printtext[title]{% \usebibmacro{titleiskey}% {\unspace\printfield[upperfirst]{title}}% - {\iffieldundef{maintitle}% + {\ifboolexpr{% + test {\iffieldundef{maintitle}}% + and% + test {\iffieldundef{related}}% + }% {\printfield[titlecase]{title}}% {\printfield[noformat]{title}}}% \normalfont{\setunit*{\subtitlepunct}% \printfield[noformat]{subtitle}% \setunit{\addperiod\addspace}}}% \newunit}}% - \printfield{titleaddon}}% + \printfield{titleaddon}% +}%% <<<3 -\newbibmacro*{inmaintitle}{% - \iffieldundef{maintitle}{}{% - \usebibmacro{in:}% - \iftoggle{repeatfields}% - {\addspace\usebibmacro{author/editor+others}}% - {\addspace\bibnamedash}% - \newunit\newblock% - \usebibmacro{maintitle}% - }% +\newbibmacro*{booktitleiskey}[2]{%% >>>3 +\ifboolexpr{% + test {\ifnameundef{bookauthor}}% + and% + test {\ifnameundef{editor}}% + and% + test {\iffieldundef{organization}}% + and% + test {\ifcsundef{saveded}}% + and% + test {\ifcsundef{savedorg}}% + and% + test {\iffieldundef{eventtitle}}% }% + {#1}% + {#2}% +}%% <<<3 -\renewbibmacro*{maintitle+booktitle}{% - \iffieldundef{maintitle}% - {}% - {\usebibmacro{maintitle}% - \newunit\newblock% - \iffieldundef{volume}% - {}% - {\printfield{volume}% - \printfield{part}% - \setunit{\addcolon\addspace}}}% - \usebibmacro{booktitle}% - \newunit}% - -\newbibmacro*{maintitle/booktitle}{% - \iffieldundef{maintitle}% - {\usebibmacro{booktitle}}% - {\usebibmacro{maintitle}}% -}% - -\renewbibmacro*{booktitle}{% +\renewbibmacro*{booktitle}{%% >>>3 \ifboolexpr{% test {\iffieldundef{booktitle}}% and% @@ -582,13 +804,18 @@ }% {}% {\printtext[booktitle]{% - \printfield[titlecase]{booktitle}% - \normalfont{\setunit*{\subtitlepunct}}% - \printfield[noformat]{booksubtitle}}% - \newunit}% - \printfield{booktitleaddon}}% + \usebibmacro{booktitleiskey}{% + \printfield[upperfirst]{booktitle}% + }{% + \printfield[titlecase]{booktitle}% + }% + \normalfont{\setunit*{\subtitlepunct}}% + \printfield[noformat]{booksubtitle}}% + \newunit}% + \printfield{booktitleaddon}% +}%% <<<3 -\renewbibmacro*{maintitle}{% +\renewbibmacro*{maintitle}{%% >>>3 \ifboolexpr{% test {\iffieldundef{maintitle}}% and% @@ -596,127 +823,78 @@ }% {}% {\printtext[maintitle]{% - \printfield[titlecase]{maintitle}% - \normalfont{\setunit*{\subtitlepunct}}% - \printfield[noformat]{mainsubtitle}}% - \newunit}% - \printfield{maintitleaddon}}% - -\newbibmacro*{publisher}{% - \iflistundef{publisher}% - {\iftoggle{nosn}{}{\printtext[brackets]{\bibstring{sinenomine}}}}% - {\printlist{publisher}}}% - -\newbibmacro*{location}{% - \iflistundef{location}% - {\iftoggle{nosl}{}{\printtext[brackets]{\bibstring{sineloco}}}}% - {\printlist{location}}}% - -\newbibmacro*{venue}{% - \iffieldundef{venue}% - {\iftoggle{nosl}{}{\printtext[brackets]{\bibstring{sineloco}}}}% - {\printfield{venue}}}% - -\renewbibmacro*{location+date}{% - \usebibmacro{location}% - \setunit*{\addcomma\addspace}% - \usebibmacro{date}% - \newunit% -}% - -\renewbibmacro*{series+number}{% - \iffieldundef{series}{}{% - \printtext[parens]{% - \printfield{series}% - \setunit*{\addspace}% - \printfield{number}% - \newunit}% - }% - }% + \usebibmacro{titleiskey}{% + \printfield[upperfirst]{maintitle}% + }{% + \printfield[titlecase]{maintitle}% + }% + \normalfont{\setunit*{\subtitlepunct}}% + \printfield[noformat]{mainsubtitle}}% + \newunit}% + \printfield{maintitleaddon}% +}%% <<<3 -% Add s.l. and s.n. when fields are missing. -\renewbibmacro*{publisher+location+date}{% - \ifboolexpr{% - test {\iflistundef{publisher}}% - and% - test {\iflistundef{location}}% - and% - not test {\iftoggle{nosl}}% - and% - not test {\iftoggle{nosn}}% +\newbibmacro*{in:maintitle}{%% >>>3 + \iffieldundef{maintitle}{}{% + \usebibmacro{in:}% + \iftoggle{repeatfields}% + {\addspace\usebibmacro{author/editor+others}}% + {\addspace\bibnamedash}% + \newunit\newblock% + \usebibmacro{maintitle}% }% - {\printtext[brackets]{\bibstring{sineloco}% - \setunit{\addcolon\addnbspace}% - \bibstring{sinenomine}}}% - {\ifboolexpr{% - test {\ifnameundef{author}}% - and% - test {\ifnameundef{editor}}% - and% - test {\iflistundef{publisher}}% - and% - not test {\iflistundef{organization}}% - }% - {\usebibmacro{location}}% - {\usebibmacro{location}% - \setunit*{\addcolon\addspace}% - \usebibmacro{publisher}}}% - \setunit*{\addcomma\addspace}% - \usebibmacro{date}% - \newunit}% +}%% <<<3 -\renewbibmacro*{url+urldate}{% - \usebibmacro{url}% - \iffieldundef{urlyear}% +\renewbibmacro*{maintitle+booktitle}{%% >>>3 + \iffieldundef{maintitle}% {}% - {\setunit*{\addperiod\addspace}% - \usebibmacro{urldate}}}% + {\usebibmacro{maintitle}% + \newunit\newblock% + \iffieldundef{volume}% + {}% + {\printfield{volume}% + \printfield{part}% + \setunit{\addcolon\addspace}}}% + \usebibmacro{booktitle}% + \newunit% +}%% <<<3 -\newbibmacro*{mathesis}{% - \iffieldundef{type}{% - \bibstring{dissertation}\addspace\printtext[parens]{\bibstring{mathesis}}% - }{% - \bibstring{dissertation}\addspace\printtext[parens]{\printfield{type}}% - }% -}% +\newbibmacro*{maintitle/booktitle}{%% >>>3 + \iffieldundef{maintitle}% + {\usebibmacro{booktitle}}% + {\usebibmacro{maintitle}}% +}%% <<<3 -\newbibmacro*{phdthesis}{% - \iffieldundef{type}{% - \bibstring{thesis}\addspace\printtext[parens]{\bibstring{phdthesis}}% - }{% - \bibstring{thesis}\addspace\printtext[parens]{\printfield{type}}% - }% -}% +\renewbibmacro*{journal}{%% >>>3 + \iffieldundef{journaltitle}% + {}% + {\printtext[journaltitle]{% + \printfield[titlecase]{journaltitle}% + \setunit{\subtitlepunct}% + \printfield[noformat]{journalsubtitle}}}% +}%% <<<3 -\newbibmacro*{inbookauthor+others}{% - \usebibmacro{in:}% - \ifboolexpr{% - test {\ifnameundef{author}}% - and% - test {\ifcsundef{saveded}}% - and% - test {\ifcsundef{savedorg}}% - }% +\newbibmacro{journal+section}{%% >>>3 + \usebibmacro{journal}% + \iffieldundef{section}% {}% - {\ifboolexpr{% - test {\ifnameundef{bookauthor}}% - or% - test {\ifnamesequal{author}{bookauthor}}% - }% - {\iftoggle{repeatfields}% - {\usebibmacro{author/editor+others}}% - {\bibnamedash}}% - {\printnames{bookauthor}}}% -}% + {\setunit{\addspace\textendash\addspace}% + \printfield{section}}% +}%% <<<3 -% For @bookinbook entries: use the bookauthor when available, -% else use editor+others. -\newbibmacro*{bookauthor/editor+others}{% - \ifnameundef{bookauthor}{% - \usebibmacro{editor+others}}% - {\printnames{bookauthor}}}% +\renewbibmacro*{journal+issuetitle}{%% >>>3 + \usebibmacro{journal}% + \setunit*{\addcomma\addspace}% + \iffieldundef{series}% + {}% + {\newunit% + \printfield{series}% + \setunit{\addspace}}% + \usebibmacro{volume+number+eid}% + \newunit% +}%% <<<3 -\renewbibmacro*{periodical}{% +\renewbibmacro*{periodical}{%% >>>3 \iffieldundef{title}% {}% {\iffieldundef{issue}{% @@ -730,128 +908,370 @@ \normalfont{\setunit*{\subtitlepunct}% \printfield[noformat]{subtitle}}}}% }% -}% +}%% <<<3 -\renewbibmacro*{issue}{% - \iffieldundef{issuetitle}% - {}% - {\printtext[issuetitle]{% - \printfield[upperfirst]{issuetitle}% - \setunit*{\subtitlepunct}% - \printfield[noformat]{issuesubtitle}}}}% +% <<<2 -\newbibmacro*{organization}{% - \iflistundef{organization}% - {\global\undef\bbx@lastorg}% - {\usebibmacro{bbx:dashcheck}% - {\bibnamedash}% - {\usebibmacro{bbx:saveorg}% - \printlist[uppercase]{organization}}% - \savelistcs*{organization}{savedorg}% - \clearlist{organization}% - \newunit\newblock% - \printfield{nameaddon}}% -}% +% Names >>>2 -\renewbibmacro*{author}{% +\renewbibmacro*{author}{%% >>>3 \ifboolexpr{% test \ifuseauthor% and% not test {\ifnameundef{author}}% }{% \usebibmacro{bbx:dashcheck}{% - \bibnamedash% + \iffieldundef{authortype}{% + \bibnamedash% + \newunit\newblock% + \printfield{nameaddon}% + }{% + \nopunctdash% + \usebibmacro{authorstrg}% + \newunit\newblock% + \printfield{nameaddon}% + }% }{% \usebibmacro{bbx:savehash}% \printnames{author}% + \addspace% + \usebibmacro{authorstrg}% + \newunit\newblock% + \printfield{nameaddon}% }% - \addspace% - \usebibmacro{authorstrg}% - \newunit\newblock% - \printfield{nameaddon}% }{% \global\undef\bbx@lasthash% }% -}% +}%% <<<3 -\renewbibmacro*{editor+others}{% +\renewbibmacro*{editor+others}{%% >>>3 \ifboolexpr{% test \ifuseeditor% and% not test {\ifnameundef{editor}}% }{% \usebibmacro{bbx:dashcheck}{% - \bibnamedash% + \iffieldundef{editortype}{% + \bibnamedash% + }{% + \nopunctdash% + \usebibmacro{editor+othersstrg}% + }% }{% \usebibmacro{bbx:savehash}% \printnames{editor}% \setunit{\addspace}% - \printtext[parens]{\usebibmacro{editor+othersstrg}}% + \usebibmacro{editor+othersstrg}% }% \savenamecs*{editor}{saveded}% - \clearname{editor}% + \clearname{editor}% }{% \global\undef\bbx@lasthash% \usebibmacro{organization}% }% -}% +}%% <<<3 + +\renewbibmacro*{byeditor+others}{%% >>>3 + \toggletrue{byeditor+others}% + \ifnameundef{editor}{}{% else + \usebibmacro{byeditor+othersstrg}% + \setunit*{\addspace}% + \printnames[byeditor]{editor}% + \clearname{editor}% + \newunit% + }% + \usebibmacro{byeditorx}% + \usebibmacro{bytranslator+others}% + \togglefalse{byeditor+others}% +}%% <<<3 + +\newbibmacro*{organization}{%% >>>3 + \iflistundef{organization}% + {\global\undef\bbx@lastorg}% + {\usebibmacro{bbx:dashcheck}% + {\bibnamedash}% + {\usebibmacro{bbx:saveorg}% + \printlist[uppercase]{organization}}% + \savelistcs*{organization}{savedorg}% + \clearlist{organization}% + \newunit\newblock% + \printfield{nameaddon}}% +}%% <<<3 -\newbibmacro*{in:editor+others}{% +\newbibmacro*{author/organization}{%% >>>3 + \ifnameundef{author}% + {\usebibmacro{organization}}% + {\usebibmacro{author}}% +}%% <<<3 + +\newbibmacro*{editor+others/organization}{%% >>>3 + \ifnameundef{editor}% + {\usebibmacro{organization}}% + {\usebibmacro{editor+others}}% +}%% <<<3 + +\newbibmacro*{organization/eventtitle}{%% >>>3 + \iffieldundef{eventtitle}% + {\usebibmacro{organization}}% + {\printfield[uppercase]{eventtitle}}% +}%% <<<3 + +\newbibmacro*{bookauthor/editor+others}{%% >>>3 + \ifnameundef{bookauthor}{% + \usebibmacro{editor+others}}% + {\printnames{bookauthor}}% +}%% <<<3 + +\newbibmacro*{in:bookauthor+others}{%% >>>3 + \usebibmacro{in:}% + \ifnameundef{bookauthor}{% + % do nothing + }{% else + \ifnamesequal{author}{bookauthor}{% + \iftoggle{repeatfields}{% + \usebibmacro{author/editor+others}% + }{% else + \bibnamedash% + }% + }{% else + \printnames{bookauthor}% + }% + }% +}%% <<<3 + +\newbibmacro*{in:editor+others}{%% >>>3 \usebibmacro{in:}% \addspace% \ifnameundef{editor}{% \printlist[uppercase]{organization}% }{% - \printnames{editor}% - \setunit*{\addspace}% - \printtext[parens]{\usebibmacro{editor+othersstrg}}% - \clearname{editor}% + \usebibmacro{bbx:ineditordashcheck}{% + \iffieldundef{editortype}{% + \bibnamedash% + }{% + \nopunctdash% + \usebibmacro{editor+othersstrg}% + \savenamecs*{editor}{saveded}% + \clearname{editor}% + }% + }{% + \printnames{editor}% + \setunit*{\addspace}% + \usebibmacro{editor+othersstrg}% + \savenamecs*{editor}{saveded}% + \clearname{editor}% + }% }% -}% +}%% <<<3 -\newbibmacro*{in:eventtitle/organization/editor}{% +\newbibmacro*{in:eventtitle/organization/editor}{%% >>>3 \usebibmacro{in:}% \iffieldundef{eventtitle}{% \ifnameundef{editor}{% \printlist[uppercase]{organization}% \clearlist{organization}% }{% - \printnames{editor}% + \usebibmacro{editor+others}% }% }{% \printfield[uppercase]{eventtitle}% }% +}%% <<<3 + +% <<<2 + +% Publisher, location, date, issue >>>2 + +\renewbibmacro*{date}{% + \printdate% + \printunit{\addperiod\addspace}% }% -\newbibmacro*{editor+others/organization}{% - \ifnameundef{editor}% - {\usebibmacro{organization}}% - {\usebibmacro{editor+others}}}% +\newbibmacro*{publisher}{%% >>>3 + \iflistundef{publisher}% + {\iftoggle{nosn}{}{\printtext[brackets]{\bibstring{sinenomine}}}}% + {\printlist{publisher}}% +}%% <<<3 -\newbibmacro*{author/organization}{% - \ifnameundef{author}% - {\usebibmacro{organization}}% - {\usebibmacro{author}}}% +\newbibmacro*{location}{%% >>>3 + \iflistundef{location}% + {\iftoggle{nosl}{}{\printtext[brackets]{\bibstring{sineloco}}}}% + {\printlist{location}}% +}%% <<<3 -\newbibmacro*{organization/eventtitle}{% - \iffieldundef{eventtitle}% - {\usebibmacro{organization}}% - {\printfield[uppercase]{eventtitle}}}% +\newbibmacro*{venue}{%% >>>3 + \iffieldundef{venue}% + {\iftoggle{nosl}{}{\printtext[brackets]{\bibstring{sineloco}}}}% + {\printfield{venue}}% +}%% <<<3 -\renewbibmacro*{byeditor+others}{% - \toggletrue{byeditor+others}% - \ifnameundef{editor}% +\renewbibmacro*{location+date}{%% >>>3 + \usebibmacro{location}% + \setunit*{\addcomma\addspace}% + \usebibmacro{date}% + \newunit% +}%% <<<3 + +\renewbibmacro*{publisher+location+date}{%% >>>3 + \ifboolexpr{% + test {\iflistundef{publisher}}% + and% + test {\iflistundef{location}}% + and% + not test {\iftoggle{nosl}}% + and% + not test {\iftoggle{nosn}}% + }{% + \printtext[brackets]{\bibstring{sineloco}% + \setunit{\addcolon\addnbspace}% + \bibstring{sinenomine}}% + }{% + \ifboolexpr{% + test {\ifnameundef{author}}% + and% + test {\ifnameundef{editor}}% + and% + test {\iflistundef{publisher}}% + and% + not test {\iflistundef{organization}}% + }{% + \usebibmacro{location}% + }{% + \usebibmacro{location}% + \setunit*{\addcolon\addspace}% + \usebibmacro{publisher}% + }% + }% + \setunit*{\addcomma\addspace}% + \usebibmacro{date}% + \newunit% +}%% <<<3 + +\renewbibmacro*{issue}{%% >>>3 + \iffieldundef{issuetitle}% {}% - {\usebibmacro{byeditor+othersstrg}% + {\printtext[issuetitle]{% + \printfield[upperfirst]{issuetitle}% + \setunit*{\subtitlepunct}% + \printfield[noformat]{issuesubtitle}}}% +}%% <<<3 + +\renewbibmacro*{issue+date}{%% >>>3 + \iffieldundef{issue}% + {\usebibmacro{date}}% + {\printfield{issue}% \setunit*{\addspace}% - \printnames[byeditor]{editor}% - \clearname{editor}% - \newunit}% - \usebibmacro{byeditorx}% - \usebibmacro{bytranslator+others}}% - \togglefalse{byeditor+others}% + \usebibmacro{date}}% + \newunit% +}%% <<<3 + +\newbibmacro*{publisher+location+issue+date}{%% >>>3 + \ifboolexpr{% + test {\iflistundef{publisher}}% + and% + test {\iflistundef{location}}% + and% + not test {\iftoggle{nosl}}% + and% + not test {\iftoggle{nosn}}% + }{% + \printtext[brackets]{\bibstring{sineloco}% + \setunit{\addcolon\addnbspace}% + \bibstring{sinenomine}}% + }{% + \ifboolexpr{% + test {\ifnameundef{author}}% + and% + test {\ifnameundef{editor}}% + and% + test {\iflistundef{publisher}}% + and% + not test {\iflistundef{organization}}% + }{% + \usebibmacro{location}% + }{% + \usebibmacro{location}% + \setunit*{\addcolon\addspace}% + \usebibmacro{publisher}% + }% + }% + \setunit*{\addcomma\addspace}% + \printfield[number]{issue}% + \setunit*{\addcomma\addspace}% + \usebibmacro{date}% + \newunit% +}%% <<<3 -\renewbibmacro*{related:reprintfrom}[1]{% +% <<<2 + +% Misc >>> + +\renewbibmacro*{volume+number+eid}{%% >>>3 + \printfield{volume}% + \setunit*{\addcomma\addspace}% + \printfield{number}% + \setunit{\addcomma\addspace}% + \printfield{eid}% +}%% <<<3 + +\renewbibmacro*{series+number}{%% >>>3 + \iffieldundef{series}{}{% + \printtext[parens]{% + \printfield{series}% + \setunit*{\addcomma\addspace}% + \printfield[noformat]{number}% + \newunit}% + }% +}%% <<<3 + +\renewbibmacro*{pageref}{%% >>>3 + \iflistundef{pageref}% + {}% + {\printunit{\addperiod\addspace} + \printtext{% \printtext[parens]{% + \ifnumgreater{\value{pageref}}{1}% + {\bibstring{backrefpages}\ppspace}% + {\bibstring{backrefpage}\ppspace}% + \printlist[pageref][-\value{listtotal}]{pageref}}}% +}%% <<<3 + +\renewbibmacro*{url+urldate}{%% >>>3 + \usebibmacro{url}% + \iffieldundef{urlyear}% + {}% + {\setunit*{\addperiod\addspace}% + \usebibmacro{urldate}}% +}%% <<<3 + +\newbibmacro*{mathesis}{%% >>>3 + \iffieldundef{type}{% + \bibstring{dissertation}\addspace\printtext[parens]{\bibstring{mathesis}}% + }{% + \bibstring{dissertation}\addspace\printtext[parens]{\printfield{type}}% + }% +}%% <<<3 + +\newbibmacro*{phdthesis}{%% >>>3 + \iffieldundef{type}{% + \bibstring{thesis}\addspace\printtext[parens]{\bibstring{phdthesis}}% + }{% + \bibstring{thesis}\addspace\printtext[parens]{\printfield{type}}% + }% +}%% <<<3 + +\newbibmacro*{language}{%% >>>3 + \ifboolexpr{% + test {\iflistundef{language}}% + or% + test {\iffieldundef{origlanguage}}% + }% + {}% + {% + \printtext{\printlist{language}\addspace\printfield{origlanguage}}% + }% +}%% <<<3 + +\renewbibmacro*{related:reprintfrom}[1]{%% >>>3 \entrydata*{#1}{% \usedriver% {\ifnameundef{savedauthor}% @@ -868,94 +1288,19 @@ \ifbibmacroundef{date+extrayear}% {}% {\renewbibmacro*{date+extrayear}{}% - \renewbibmacro*{date}{\printdate}}% - \renewbibmacro*{pageref}{}}% - {\thefield{entrytype}}}}% - -\newbibmacro*{language}{% - \ifboolexpr{% - test {\iflistundef{language}}% - or% - test {\iffieldundef{origlanguage}}% - }% - {}% - {% - \printtext{\printlist{language}\addspace\printfield{origlanguage}}% - }% -}% - -\newbibmacro{journal+section}{% - \usebibmacro{journal}% - \iffieldundef{section}% - {}% - {\setunit{\addspace\textendash\addspace}% - \printfield{section}}% -}% - -\newbibmacro*{bbx:savehash}{% - \savefield{fullhash}{\bbx@lasthash}}% - -\newbibmacro*{bbx:saveorg}{% - \savelist{organization}{\bbx@lastorg}}% - -\newbibmacro*{bbx:savetitle}{% - \savefield{title}{\bbx@lasttitle}}% - -\newbibmacro*{bbx:savesubtitle}{% - \savefield{subtitle}{\bbx@lastsubtitle}}% - -\newtoggle{isdashed}% - -\newbibmacro*{bbx:dashcheck}[2]{% - \ifboolexpr{% - (% - test {\iffieldequals{fullhash}{\bbx@lasthash}}% - or% - test {\iflistequals{organization}{\bbx@lastorg}}% - )% - and% - not test \iffirstonpage% - and% - not test {\iftoggle{repeatfields}}% - and% - (% - not bool {bbx@inset}% - or% - test {\iffieldequalstr{entrysetcount}{1}}% - )% - }% - {\settoggle{isdashed}{true}#1}% - {\settoggle{isdashed}{false}#2}}% + \renewbibmacro*{date}{\printdate}}% + \renewbibmacro*{pageref}{}}% + {\thefield{entrytype}}}% +}%% <<<3 -\newbibmacro*{bbx:titledashcheck}[2]{% - \iftoggle{isdashed}{% - \ifboolexpr{% - test {\iffieldequals{title}{\bbx@lasttitle}}% - and - (% - test {\iffieldequals{subtitle}{\bbx@lastsubtitle}}% - or% - test {\iffieldundef{subtitle}}% - ) - and% - not test {\iftoggle{repeattitle}} - }% - {#1}% - {#2}% - }{% - #2% - }% -}% +% <<< -\renewbibmacro*{begrelated}{% - \booltrue{bbx@inset}}% +% <<<1 -% ---------- -% Drivers -% ---------- +% Drivers >>>1 -\DeclareBibliographyDriver{article}{% +\DeclareBibliographyDriver{article}{%% >>>2 \usebibmacro{bibindex}% \usebibmacro{begentry}% \usebibmacro{author/organization}% @@ -987,12 +1332,10 @@ \setunit*{\addcomma\addspace}% \printfield{pagetotal}% \setunit{\addcomma\addspace}% - \usebibmacro{date}% + \usebibmacro{issue+date}% \newunit% \printfield{note}% - \setunit{\addcolon\addspace}% - \usebibmacro{issue}% - \newunit\newblock% + \printunit{\addperiod\addspace}% \iftoggle{bbx:isbn}% {\printfield{issn}}% {}% @@ -1000,23 +1343,24 @@ \usebibmacro{doi+eprint+url}% \newunit\newblock% \usebibmacro{addendum+pubstate}% - \setunit{\bibpagerefpunct}\newblock% + \printunit{\bibpagerefpunct}\newblock% \usebibmacro{pageref}% \newunit\newblock% \iftoggle{bbx:related}% {\usebibmacro{related:init}% \usebibmacro{related}}% {}% - \usebibmacro{finentry}}% + \usebibmacro{finentry}% +}%% <<<2 -\DeclareBibliographyDriver{mvbook}{% +\DeclareBibliographyDriver{book}{%% >>>2 \usebibmacro{bibindex}% \usebibmacro{begentry}% \usebibmacro{author/editor+others}% \setunit{\labelnamepunct}\newblock% \usebibmacro{title}% \newunit\newblock% - \usebibmacro{inmaintitle}% + \usebibmacro{in:maintitle}% \newunit\newblock% \usebibmacro{byeditor+others}% \newunit\newblock% @@ -1024,9 +1368,12 @@ \newunit\newblock% \usebibmacro{publisher+location+date}% \newunit\newblock% - \printfield{volumes}% - \newunit\newblock% - \usebibmacro{chapter+pages}% + \printfield{volume}% + \printfield{part}% + \setunit{\addcomma\addspace}% + \printfield{chapter}% + \setunit*{\addcomma\addspace}% + \printfield{pages}% \newunit\newblock% \printfield{pagetotal}% \setunit*{\addcomma\addspace}% @@ -1041,7 +1388,7 @@ \usebibmacro{language}% \newunit\newblock% \printfield{note}% - \newunit\newblock% + \printunit{\addperiod\addspace}% \iftoggle{bbx:isbn}% {\printfield{isbn}}% {}% @@ -1049,51 +1396,42 @@ \usebibmacro{doi+eprint+url}% \newunit\newblock% \usebibmacro{addendum+pubstate}% - \setunit{\bibpagerefpunct}\newblock% + \printunit{\bibpagerefpunct}\newblock% \usebibmacro{pageref}% \newunit\newblock% \iftoggle{bbx:related}% {\usebibmacro{related:init}% \usebibmacro{related}}% {}% - \usebibmacro{finentry}}% + \usebibmacro{finentry}% +}%% <<<2 -\DeclareBibliographyDriver{book}{% +\DeclareBibliographyDriver{inbook}{%% >>>2 \usebibmacro{bibindex}% \usebibmacro{begentry}% \usebibmacro{author/editor+others}% \setunit{\labelnamepunct}\newblock% \usebibmacro{title}% + \newunit% + \usebibmacro{in:bookauthor+others}% \newunit\newblock% - \usebibmacro{inmaintitle}% - \newunit\newblock% + \usebibmacro{maintitle/booktitle}% + \newunit% \usebibmacro{byeditor+others}% \newunit\newblock% \printfield{edition}% \newunit\newblock% \usebibmacro{publisher+location+date}% - \newunit\newblock% + \newunit% \printfield{volume}% \printfield{part}% - \setunit{\addcomma\addspace}% - \printfield{chapter}% - \setunit*{\addcomma\addspace}% - \printfield{pages}% - \newunit\newblock% - \printfield{pagetotal}% - \setunit*{\addcomma\addspace}% - \printfield{illustrated}% \setunit*{\addcomma\addspace}% - \printfield{dimensions}% + \usebibmacro{chapter+pages}% \newunit\newblock% \usebibmacro{series+number}% \newunit\newblock% - \printfield{howpublished}% - \newunit\newblock% - \usebibmacro{language}% - \newunit\newblock% \printfield{note}% - \newunit\newblock% + \printunit{\addperiod\addspace}% \iftoggle{bbx:isbn}% {\printfield{isbn}}% {}% @@ -1101,41 +1439,49 @@ \usebibmacro{doi+eprint+url}% \newunit\newblock% \usebibmacro{addendum+pubstate}% - \setunit{\bibpagerefpunct}\newblock% + \printunit{\bibpagerefpunct}\newblock% \usebibmacro{pageref}% \newunit\newblock% \iftoggle{bbx:related}% {\usebibmacro{related:init}% \usebibmacro{related}}% {}% - \usebibmacro{finentry}}% + \usebibmacro{finentry}% +}%% <<<2 -\DeclareBibliographyDriver{inbook}{% +\DeclareBibliographyDriver{mvbook}{%% >>>2 \usebibmacro{bibindex}% \usebibmacro{begentry}% \usebibmacro{author/editor+others}% \setunit{\labelnamepunct}\newblock% \usebibmacro{title}% - \newunit% - \usebibmacro{inbookauthor+others}% \newunit\newblock% - \usebibmacro{maintitle/booktitle}% - \newunit% + \usebibmacro{in:maintitle}% + \newunit\newblock% \usebibmacro{byeditor+others}% \newunit\newblock% \printfield{edition}% \newunit\newblock% \usebibmacro{publisher+location+date}% - \newunit% - \printfield{volume}% - \printfield{part}% - \setunit*{\addcomma\addspace}% + \newunit\newblock% + \printfield{volumes}% + \newunit\newblock% \usebibmacro{chapter+pages}% \newunit\newblock% + \printfield{pagetotal}% + \setunit*{\addcomma\addspace}% + \printfield{illustrated}% + \setunit*{\addcomma\addspace}% + \printfield{dimensions}% + \newunit\newblock% \usebibmacro{series+number}% \newunit\newblock% - \printfield{note}% + \printfield{howpublished}% + \newunit\newblock% + \usebibmacro{language}% \newunit\newblock% + \printfield{note}% + \printunit{\addperiod\addspace}% \iftoggle{bbx:isbn}% {\printfield{isbn}}% {}% @@ -1143,47 +1489,44 @@ \usebibmacro{doi+eprint+url}% \newunit\newblock% \usebibmacro{addendum+pubstate}% - \setunit{\bibpagerefpunct}\newblock% + \printunit{\bibpagerefpunct}\newblock% \usebibmacro{pageref}% \newunit\newblock% \iftoggle{bbx:related}% {\usebibmacro{related:init}% \usebibmacro{related}}% {}% - \usebibmacro{finentry}}% + \usebibmacro{finentry}% +}%% <<<2 -\DeclareBibliographyDriver{mvcollection}{% +\DeclareBibliographyDriver{booklet}{%% >>>2 \usebibmacro{bibindex}% \usebibmacro{begentry}% - \usebibmacro{editor+others}% + \usebibmacro{author/editor+others}% \setunit{\labelnamepunct}\newblock% - \usebibmacro{title}% + \usebibmacro{maintitle+title}% + \newunit% + \printlist{language}% \newunit\newblock% - \usebibmacro{inmaintitle}% + \usebibmacro{byauthor}% \newunit\newblock% \usebibmacro{byeditor+others}% \newunit\newblock% \printfield{edition}% \newunit\newblock% - \usebibmacro{publisher+location+date}% - \newunit\newblock% - \printfield{volumes}% - \newunit\newblock% - \usebibmacro{chapter+pages}% - \newunit\newblock% - \printfield{pagetotal}% - \setunit*{\addcomma\addspace}% - \printfield{illustrated}% - \setunit*{\addcomma\addspace}% - \printfield{dimensions}% - \newunit\newblock% \usebibmacro{series+number}% \newunit\newblock% - \printfield{howpublished}% + \printfield{type}% + \newunit% + \printfield{version}% \newunit\newblock% - \usebibmacro{language}% + \usebibmacro{location+date}% \newunit\newblock% + \usebibmacro{chapter+pages}% + \newunit% \printfield{note}% + \newunit% + \printfield{pagetotal}% \newunit\newblock% \iftoggle{bbx:isbn}% {\printfield{isbn}}% @@ -1192,23 +1535,24 @@ \usebibmacro{doi+eprint+url}% \newunit\newblock% \usebibmacro{addendum+pubstate}% - \setunit{\bibpagerefpunct}\newblock% + \printunit{\bibpagerefpunct}\newblock% \usebibmacro{pageref}% \newunit\newblock% \iftoggle{bbx:related}% {\usebibmacro{related:init}% \usebibmacro{related}}% {}% - \usebibmacro{finentry}}% + \usebibmacro{finentry}% +}%% <<<2 -\DeclareBibliographyDriver{collection}{% +\DeclareBibliographyDriver{collection}{%% >>>2 \usebibmacro{bibindex}% \usebibmacro{begentry}% \usebibmacro{editor+others}% \setunit{\labelnamepunct}\newblock% \usebibmacro{title}% \newunit\newblock% - \usebibmacro{inmaintitle}% + \usebibmacro{in:maintitle}% \newunit\newblock% \usebibmacro{byeditor+others}% \newunit\newblock% @@ -1236,7 +1580,7 @@ \usebibmacro{language}% \newunit\newblock% \printfield{note}% - \newunit\newblock% + \printunit{\addperiod\addspace}% \iftoggle{bbx:isbn}% {\printfield{isbn}}% {}% @@ -1244,16 +1588,17 @@ \usebibmacro{doi+eprint+url}% \newunit\newblock% \usebibmacro{addendum+pubstate}% - \setunit{\bibpagerefpunct}\newblock% + \printunit{\bibpagerefpunct}\newblock% \usebibmacro{pageref}% \newunit\newblock% \iftoggle{bbx:related}% {\usebibmacro{related:init}% \usebibmacro{related}}% {}% - \usebibmacro{finentry}}% + \usebibmacro{finentry}% +}%% <<<2 -\DeclareBibliographyDriver{incollection}{% +\DeclareBibliographyDriver{incollection}{%% >>>2 \usebibmacro{bibindex}% \usebibmacro{begentry}% \usebibmacro{author}% @@ -1276,7 +1621,7 @@ \usebibmacro{series+number}% \newunit\newblock% \printfield{note}% - \newunit\newblock% + \printunit{\addperiod\addspace}% \usebibmacro{chapter+pages}% \newunit\newblock% \iftoggle{bbx:isbn}% @@ -1286,70 +1631,182 @@ \usebibmacro{doi+eprint+url}% \newunit\newblock% \usebibmacro{addendum+pubstate}% - \setunit{\bibpagerefpunct}\newblock% + \printunit{\bibpagerefpunct}\newblock% \usebibmacro{pageref}% \newunit\newblock% \iftoggle{bbx:related}% {\usebibmacro{related:init}% \usebibmacro{related}}% {}% - \usebibmacro{finentry}}% + \usebibmacro{finentry}% +}%% <<<2 -\DeclareBibliographyDriver{periodical}{% +\DeclareBibliographyDriver{mvcollection}{%% >>>2 \usebibmacro{bibindex}% \usebibmacro{begentry}% - \usebibmacro{editor+others/organization}% + \usebibmacro{editor+others}% \setunit{\labelnamepunct}\newblock% \usebibmacro{title}% \newunit\newblock% + \usebibmacro{in:maintitle}% + \newunit\newblock% + \usebibmacro{byeditor+others}% + \newunit\newblock% + \printfield{edition}% + \newunit\newblock% \usebibmacro{publisher+location+date}% + \newunit\newblock% + \printfield{volumes}% + \newunit\newblock% + \usebibmacro{chapter+pages}% + \newunit\newblock% + \printfield{pagetotal}% + \setunit*{\addcomma\addspace}% + \printfield{illustrated}% + \setunit*{\addcomma\addspace}% + \printfield{dimensions}% + \newunit\newblock% + \usebibmacro{series+number}% + \newunit\newblock% + \printfield{howpublished}% + \newunit\newblock% + \usebibmacro{language}% + \newunit\newblock% + \printfield{note}% + \printunit{\addperiod\addspace}% + \iftoggle{bbx:isbn}% + {\printfield{isbn}}% + {}% + \newunit\newblock% + \usebibmacro{doi+eprint+url}% + \newunit\newblock% + \usebibmacro{addendum+pubstate}% + \printunit{\bibpagerefpunct}\newblock% + \usebibmacro{pageref}% + \newunit\newblock% + \iftoggle{bbx:related}% + {\usebibmacro{related:init}% + \usebibmacro{related}}% + {}% + \usebibmacro{finentry}% +}%% <<<2 + +\DeclareBibliographyDriver{manual}{%% >>>2 + \usebibmacro{bibindex}% + \usebibmacro{begentry}% + \usebibmacro{author/editor+others}% + \setunit{\labelnamepunct}\newblock% + \usebibmacro{maintitle+title}% \newunit% \printlist{language}% \newunit\newblock% + \usebibmacro{byauthor}% + \newunit\newblock% \usebibmacro{byeditor}% \newunit\newblock% + \printfield{edition}% + \newunit\newblock% + \printfield{type}% + \newunit% + \printfield{version}% + \newunit\newblock% + \usebibmacro{location+date}% + \newunit\newblock% \usebibmacro{chapter+pages}% - \setunit*{\addcomma\addspace}% + \newunit% \printfield{pagetotal}% \newunit\newblock% + \usebibmacro{series+number}% + \newunit% \printfield{note}% - \newunit\newblock% + \printunit{\addperiod\addspace}% \iftoggle{bbx:isbn}% - {\printfield{issn}}% + {\printfield{isbn}}% {}% \newunit\newblock% \usebibmacro{doi+eprint+url}% \newunit\newblock% \usebibmacro{addendum+pubstate}% - \setunit{\bibpagerefpunct}\newblock% + \printunit{\bibpagerefpunct}\newblock% \usebibmacro{pageref}% \newunit\newblock% \iftoggle{bbx:related}% {\usebibmacro{related:init}% \usebibmacro{related}}% {}% - \usebibmacro{finentry}}% - % -\DeclareBibliographyDriver{supperiodical}{% + \usebibmacro{finentry}% +}%% <<<2 + +\DeclareBibliographyDriver{monography}{%% >>>2 \usebibmacro{bibindex}% \usebibmacro{begentry}% - \usebibmacro{author/editor+others}% + \usebibmacro{author}% \setunit{\labelnamepunct}\newblock% - \usebibmacro{issue}% - \setunit*{\addperiod\addspace}% - \usebibmacro{periodical}% - \setunit*{\addperiod\addspace}% - \usebibmacro{location}% - \setunit*{\addcolon\addspace}% - \usebibmacro{publisher}% - \setunit*{\addcomma\addspace}% - \printfield{volume}% - \setunit*{\addcomma\addspace}% - \printfield{number}% + \usebibmacro{title}% + \newunit% + \usebibmacro{date}% + \newunit\newblock% + \usebibmacro{chapter+pages}% + \newunit% + \printfield{pagetotal}% + \newunit\newblock% + \printfield{type}% + \setunit*{\addspace\textendash\addspace}% + \printlist{institution}% \setunit*{\addcomma\addspace}% - \printfield{pages}% + \printlist{location}% \setunit*{\addcomma\addspace}% - \usebibmacro{date}% + \printeventdate% + \newunit\newblock% + \printfield{note}% + \printunit{\addperiod\addspace}% + \iftoggle{bbx:isbn}% + {\printfield{isbn}}% + {}% + \newunit\newblock% + \usebibmacro{doi+eprint+url}% + \newunit\newblock% + \usebibmacro{addendum+pubstate}% + \printunit{\bibpagerefpunct}\newblock% + \usebibmacro{pageref}% + \newunit\newblock% + \iftoggle{bbx:related}% + {\usebibmacro{related:init}% + \usebibmacro{related}}% + {}% + \usebibmacro{finentry}% +}%% <<<2 + +\DeclareBibliographyDriver{patent}{%% >>>2 + \usebibmacro{bibindex}% + \usebibmacro{begentry}% + \ifnameundef{holder}{% + \iflistundef{organization}{% + \usebibmacro{author/editor+others}% + }{% + \usebibmacro{organization}% + \ifnameundef{author}{% + \printnames[given-family]{editor}% + }{% + \printnames[given-family]{author}% + }% + \newunit\newblock% + \printfield{nameaddon}% + \newunit\newblock% + }% + }{% + \printnames{holder}% + \newunit\newblock% + \printfield{nameaddon}% + \newunit\newblock% + \ifnameundef{author}{% + \printnames[given-family]{editor}% + }{% + \printnames[given-family]{author}% + }% + }% + \setunit{\labelnamepunct}\newblock% + \usebibmacro{title}% \newunit% \printlist{language}% \newunit\newblock% @@ -1357,78 +1814,126 @@ \newunit\newblock% \usebibmacro{byeditor+others}% \newunit\newblock% + \printlist{location}% + \setunit*{\addcomma\addspace}% + \usebibmacro{date}% + \setunit*{\addcomma\addspace}% + \printfield{number}% + \setunit*{\addcomma\addspace}% \printfield{howpublished}% \newunit\newblock% \printfield{type}% \newunit% \printfield{version}% + \newunit% + \printfield{note}% + \printunit{\addperiod\addspace}% + \usebibmacro{doi+eprint+url}% + \newunit\newblock% + \usebibmacro{addendum+pubstate}% + \printunit{\bibpagerefpunct}\newblock% + \usebibmacro{pageref}% + \newunit\newblock% + \iftoggle{bbx:related}% + {\usebibmacro{related:init}% + \usebibmacro{related}}% + {}% + \usebibmacro{finentry}% +}%% <<<2 + +\DeclareBibliographyDriver{periodical}{%% >>>2 + \usebibmacro{bibindex}% + \usebibmacro{begentry}% + \usebibmacro{editor+others/organization}% + \setunit{\labelnamepunct}\newblock% + \printfield[uppercase]{title}% + \setunit*{\addcolon\addspace}% + \printfield[noformat]{subtitle}% + \newunit% + \printfield{titleaddon}% + \newunit\newblock% + \usebibmacro{publisher+location+issue+date}% + \newunit% + \printlist{language}% + \newunit\newblock% + \usebibmacro{byeditor}% \newunit\newblock% \usebibmacro{chapter+pages}% \setunit*{\addcomma\addspace}% \printfield{pagetotal}% - \newunit% + \newunit\newblock% \printfield{note}% + \printunit{\addperiod\addspace}% + \iftoggle{bbx:isbn}% + {\printfield{issn}}% + {}% \newunit\newblock% \usebibmacro{doi+eprint+url}% \newunit\newblock% \usebibmacro{addendum+pubstate}% - \setunit{\bibpagerefpunct}\newblock% + \printunit{\bibpagerefpunct}\newblock% \usebibmacro{pageref}% \newunit\newblock% \iftoggle{bbx:related}% {\usebibmacro{related:init}% \usebibmacro{related}}% {}% - \usebibmacro{finentry}}% + \usebibmacro{finentry}% +}%% <<<2 -% TODO: For now there is no way to make just part of the% -% organization name uppercase (C.f. 10520-2002:6.3-6) -\DeclareBibliographyDriver{manual}{% +\DeclareBibliographyDriver{supperiodical}{%% >>>2 \usebibmacro{bibindex}% \usebibmacro{begentry}% \usebibmacro{author/editor+others}% \setunit{\labelnamepunct}\newblock% - \usebibmacro{maintitle+title}% + \usebibmacro{issue}% + \setunit*{\addperiod\addspace}% + \usebibmacro{periodical}% + \setunit*{\addperiod\addspace}% + \usebibmacro{location}% + \setunit*{\addcolon\addspace}% + \usebibmacro{publisher}% + \setunit*{\addcomma\addspace}% + \printfield{volume}% + \setunit*{\addcomma\addspace}% + \printfield{number}% + \setunit*{\addcomma\addspace}% + \printfield{pages}% + \setunit*{\addcomma\addspace}% + \usebibmacro{date}% \newunit% \printlist{language}% \newunit\newblock% \usebibmacro{byauthor}% \newunit\newblock% - \usebibmacro{byeditor}% + \usebibmacro{byeditor+others}% \newunit\newblock% - \printfield{edition}% + \printfield{howpublished}% \newunit\newblock% \printfield{type}% \newunit% \printfield{version}% \newunit\newblock% - \usebibmacro{location+date}% - \newunit\newblock% \usebibmacro{chapter+pages}% - \newunit% + \setunit*{\addcomma\addspace}% \printfield{pagetotal}% - \newunit\newblock% - \usebibmacro{series+number}% \newunit% \printfield{note}% - \newunit\newblock% - \iftoggle{bbx:isbn}% - {\printfield{isbn}}% - {}% - \newunit\newblock% + \printunit{\addperiod\addspace}% \usebibmacro{doi+eprint+url}% \newunit\newblock% \usebibmacro{addendum+pubstate}% - \setunit{\bibpagerefpunct}\newblock% + \printunit{\bibpagerefpunct}\newblock% \usebibmacro{pageref}% \newunit\newblock% \iftoggle{bbx:related}% {\usebibmacro{related:init}% \usebibmacro{related}}% {}% - \usebibmacro{finentry}}% + \usebibmacro{finentry}% +}%% <<<2 -\DeclareBibliographyDriver{proceedings}{% +\DeclareBibliographyDriver{proceedings}{%% >>>2 \usebibmacro{bibindex}% \usebibmacro{begentry}% \usebibmacro{organization/eventtitle}% @@ -1450,9 +1955,11 @@ \printfield{part}}% {}% \newunit\newblock% - \printfield{note}% + \printfield{volumes}% \newunit\newblock% - \printlist{organization}% This has to be printed conditionally + \printfield{note}% + \printunit{\addperiod\addspace}% + \printlist{organization}% % This has to be printed conditionally \newunit\newblock% \usebibmacro{chapter+pages}% \newunit% @@ -1465,16 +1972,17 @@ \usebibmacro{doi+eprint+url}% \newunit\newblock% \usebibmacro{addendum+pubstate}% - \setunit{\bibpagerefpunct}\newblock% + \printunit{\bibpagerefpunct}\newblock% \usebibmacro{pageref}% \newunit\newblock% \iftoggle{bbx:related}% {\usebibmacro{related:init}% \usebibmacro{related}}% {}% - \usebibmacro{finentry}}% + \usebibmacro{finentry}% +}%% <<<2 -\DeclareBibliographyDriver{inproceedings}{% +\DeclareBibliographyDriver{inproceedings}{%% >>>2 \usebibmacro{bibindex}% \usebibmacro{begentry}% \usebibmacro{author/translator+others}% @@ -1521,85 +2029,7 @@ \printfield{pagetotal}% \newunit\newblock% \printfield{note}% - \newunit\newblock% - \iftoggle{bbx:isbn}% - {\printfield{isbn}}% - {}% - \newunit\newblock% - \usebibmacro{doi+eprint+url}% - \newunit\newblock% - \usebibmacro{addendum+pubstate}% - \setunit{\bibpagerefpunct}\newblock% - \usebibmacro{pageref}% - \newunit\newblock% - \iftoggle{bbx:related}% - {\usebibmacro{related:init}% - \usebibmacro{related}}% - {}% - \usebibmacro{finentry}}% - -\DeclareBibliographyDriver{thesis}{% - \usebibmacro{bibindex}% - \usebibmacro{begentry}% - \usebibmacro{author}% - \setunit{\labelnamepunct}\newblock% - \usebibmacro{title}% - \newunit% - \usebibmacro{date}% - \newunit\newblock% - \usebibmacro{chapter+pages}% - \newunit% - \printfield{pagetotal}% - \newunit\newblock% - \printfield{type}% - \setunit*{\addspace\textendash\addspace}% - \printlist{institution}% - \setunit*{\addcomma\addspace}% - \printlist{location}% - \setunit*{\addcomma\addspace}% - \printeventdate% - \newunit\newblock% - \printfield{note}% - \newunit\newblock% - \iftoggle{bbx:isbn}% - {\printfield{isbn}}% - {}% - \newunit\newblock% - \usebibmacro{doi+eprint+url}% - \newunit\newblock% - \usebibmacro{addendum+pubstate}% - \setunit{\bibpagerefpunct}\newblock% - \usebibmacro{pageref}% - \newunit\newblock% - \iftoggle{bbx:related}% - {\usebibmacro{related:init}% - \usebibmacro{related}}% - {}% - \usebibmacro{finentry}}% - -\DeclareBibliographyDriver{monography}{% - \usebibmacro{bibindex}% - \usebibmacro{begentry}% - \usebibmacro{author}% - \setunit{\labelnamepunct}\newblock% - \usebibmacro{title}% - \newunit% - \usebibmacro{date}% - \newunit\newblock% - \usebibmacro{chapter+pages}% - \newunit% - \printfield{pagetotal}% - \newunit\newblock% - \printfield{type}% - \setunit*{\addspace\textendash\addspace}% - \printlist{institution}% - \setunit*{\addcomma\addspace}% - \printlist{location}% - \setunit*{\addcomma\addspace}% - \printeventdate% - \newunit\newblock% - \printfield{note}% - \newunit\newblock% + \printunit{\addperiod\addspace}% \iftoggle{bbx:isbn}% {\printfield{isbn}}% {}% @@ -1607,16 +2037,17 @@ \usebibmacro{doi+eprint+url}% \newunit\newblock% \usebibmacro{addendum+pubstate}% - \setunit{\bibpagerefpunct}\newblock% + \printunit{\bibpagerefpunct}\newblock% \usebibmacro{pageref}% \newunit\newblock% \iftoggle{bbx:related}% {\usebibmacro{related:init}% \usebibmacro{related}}% {}% - \usebibmacro{finentry}}% + \usebibmacro{finentry}% +}%% <<<2 -\DeclareBibliographyDriver{booklet}{% +\DeclareBibliographyDriver{report}{%% >>>2 \usebibmacro{bibindex}% \usebibmacro{begentry}% \usebibmacro{author/editor+others}% @@ -1630,21 +2061,24 @@ \usebibmacro{byeditor+others}% \newunit\newblock% \printfield{edition}% - \newunit\newblock% - \usebibmacro{series+number}% - \newunit\newblock% - \printfield{type}% \newunit% - \printfield{version}% + \iffieldundef{maintitle}% + {\printfield{volume}% + \printfield{part}}% + {}% + \newunit% + \printfield{volumes}% \newunit\newblock% \usebibmacro{location+date}% \newunit\newblock% \usebibmacro{chapter+pages}% \newunit% - \printfield{note}% - \newunit% \printfield{pagetotal}% \newunit\newblock% + \usebibmacro{series+number}% + \newunit\newblock% + \printfield{note}% + \printunit{\addperiod\addspace}% \iftoggle{bbx:isbn}% {\printfield{isbn}}% {}% @@ -1652,104 +2086,39 @@ \usebibmacro{doi+eprint+url}% \newunit\newblock% \usebibmacro{addendum+pubstate}% - \setunit{\bibpagerefpunct}\newblock% + \printunit{\bibpagerefpunct}\newblock% \usebibmacro{pageref}% \newunit\newblock% \iftoggle{bbx:related}% {\usebibmacro{related:init}% \usebibmacro{related}}% {}% - \usebibmacro{finentry}}% + \usebibmacro{finentry}% +}%% <<<2 -\DeclareBibliographyDriver{patent}{% +\DeclareBibliographyDriver{thesis}{%% >>>2 \usebibmacro{bibindex}% \usebibmacro{begentry}% - \ifnameundef{holder}{% - \iflistundef{organization}{% - \usebibmacro{author/editor+others}% - }{% - \usebibmacro{organization} - \ifnameundef{author}{% - \printnames[given-family]{editor}% - }{% - \printnames[given-family]{author} - }% - } - }{% - \printnames{holder} - \ifnameundef{author}{% - \printnames[given-family]{editor}% - }{% - \printnames[given-family]{author} - }% - } + \usebibmacro{author}% \setunit{\labelnamepunct}\newblock% \usebibmacro{title}% \newunit% - \printlist{language}% - \newunit\newblock% - \usebibmacro{byauthor}% - \newunit\newblock% - \usebibmacro{byeditor+others}% - \newunit\newblock% - \printlist{location}% - \setunit*{\addcomma\addspace}% \usebibmacro{date}% - \setunit*{\addcomma\addspace}% - \printfield{number}% - \setunit*{\addcomma\addspace}% - \printfield{howpublished}% - \newunit\newblock% - \printfield{type}% - \newunit% - \printfield{version}% - \newunit% - \printfield{note}% - \newunit\newblock% - \usebibmacro{doi+eprint+url}% - \newunit\newblock% - \usebibmacro{addendum+pubstate}% - \setunit{\bibpagerefpunct}\newblock% - \usebibmacro{pageref}% - \newunit\newblock% - \iftoggle{bbx:related}% - {\usebibmacro{related:init}% - \usebibmacro{related}}% - {}% - \usebibmacro{finentry}}% - -\DeclareBibliographyDriver{report}{% - \usebibmacro{bibindex}% - \usebibmacro{begentry}% - \usebibmacro{author/editor+others}% - \setunit{\labelnamepunct}\newblock% - \usebibmacro{maintitle+title}% - \newunit% - \printlist{language}% - \newunit\newblock% - \usebibmacro{byauthor}% - \newunit\newblock% - \usebibmacro{byeditor+others}% - \newunit\newblock% - \printfield{edition}% - \newunit% - \iffieldundef{maintitle}% - {\printfield{volume}% - \printfield{part}}% - {}% - \newunit% - \printfield{volumes}% - \newunit\newblock% - \usebibmacro{location+date}% \newunit\newblock% \usebibmacro{chapter+pages}% \newunit% \printfield{pagetotal}% \newunit\newblock% - \usebibmacro{series+number}% + \printfield{type}% + \setunit*{\addspace\textendash\addspace}% + \printlist{institution}% + \setunit*{\addcomma\addspace}% + \printlist{location}% + \setunit*{\addcomma\addspace}% + \printeventdate% \newunit\newblock% \printfield{note}% - \newunit\newblock% + \printunit{\addperiod\addspace}% \iftoggle{bbx:isbn}% {\printfield{isbn}}% {}% @@ -1757,16 +2126,17 @@ \usebibmacro{doi+eprint+url}% \newunit\newblock% \usebibmacro{addendum+pubstate}% - \setunit{\bibpagerefpunct}\newblock% + \printunit{\bibpagerefpunct}\newblock% \usebibmacro{pageref}% \newunit\newblock% \iftoggle{bbx:related}% {\usebibmacro{related:init}% \usebibmacro{related}}% {}% - \usebibmacro{finentry}}% + \usebibmacro{finentry}% +}%% <<<2 -\DeclareBibliographyDriver{misc}{% +\DeclareBibliographyDriver{misc}{%% >>>2 \usebibmacro{bibindex}% \usebibmacro{begentry}% \usebibmacro{author/editor+others}% @@ -1801,7 +2171,7 @@ \usebibmacro{series+number}% \newunit\newblock% \printfield{note}% - \newunit\newblock% + \printunit{\addperiod\addspace}% \iftoggle{bbx:isbn}% {\printfield{isbn}}% {}% @@ -1809,78 +2179,29 @@ \usebibmacro{doi+eprint+url}% \newunit\newblock% \usebibmacro{addendum+pubstate}% - \setunit{\bibpagerefpunct}\newblock% + \printunit{\bibpagerefpunct}\newblock% \usebibmacro{pageref}% \newunit\newblock% \iftoggle{bbx:related}% {\usebibmacro{related:init}% \usebibmacro{related}}% {}% - \usebibmacro{finentry}}% + \usebibmacro{finentry}% +}%% <<<2 -% I copied this from authoryear.bbx for the dashed option. -\DeclareBibliographyDriver{set}{% +\DeclareBibliographyDriver{set}{%% >>>2 \booltrue{bbx@inset}% \entryset{}{}% \newunit\newblock% \usebibmacro{setpageref}% - \finentry}% - - -% ---------- -% Helper commands -% ---------- - -\long\def\addto#1#2{\expandafter\def\expandafter#1\expandafter{#1#2}}% - -\def\traceparam#1{\def\paramL{}\traceparamA #1\end}% -\def\traceparamA{\futurelet\next\traceparamB}% -\def\traceparamB{% - \let\nexts=\undefined% - \expandafter\ifx\space\next \let\nexts=\traceparamS \fi% - \ifx\bgroup\next \let\nexts=\traceparamD \fi% - \ifx\end\next \let\nexts=\traceparamE \fi% - \ifx\nexts\undefined \let\nexts=\traceparamC\fi% - \nexts% -}% -\def\traceparamS{\addto\paramL{ }\afterassignment\traceparamA \let\next= }% -\def\traceparamC#1{\addto\paramL{#1}\traceparamA}% -\def\traceparamD#1{% - \expandafter\addto\expandafter\paramL\expandafter% - {\expandafter\noexpand\csname ll:\detokenize{#1}\endcsname}% - \expandafter\def\csname ll:\detokenize{#1}\endcsname{\normalfont #1}% - \traceparamA% -}% -\def\traceparamE\end{}% - -\def\smartuppercase#1{% - \bgroup % - \traceparam{#1}% - \MakeUppercase{\paramL}% - \egroup% -}% + \finentry% +}%% <<<2 -\def\smartlowercase#1{% - \bgroup % - \traceparam{#1}% - \MakeLowercase{\paramL}% - \egroup% -}% +% <<<1 -\def\smartlcsc#1{% - \bgroup % - \traceparam{#1}% - \textsc{\MakeLowercase{\paramL}}% - \egroup% -}% -\def\smartsc#1{% - \bgroup % - \traceparam{#1}% - \textsc{\paramL}% - \egroup% -}% +\endinput% -\endinput% +% vim: set foldmarker=\ >>>,\ <<< : diff --git a/Master/texmf-dist/tex/latex/biblatex-abnt/abnt.cbx b/Master/texmf-dist/tex/latex/biblatex-abnt/abnt.cbx index 856e75a2b0d..afc7aeef0e9 100644 --- a/Master/texmf-dist/tex/latex/biblatex-abnt/abnt.cbx +++ b/Master/texmf-dist/tex/latex/biblatex-abnt/abnt.cbx @@ -13,62 +13,37 @@ %% The Current Maintainer of this work is Daniel B. Marques. \ProvidesFile{abnt.cbx}% -[2016/07/06\space v2.0.1\space ABNT biblatex citation style]% - -\RequireBiber[3] -\RequireCitationStyle{authoryear} - -\RequirePackage{xparse} - -\newcommand{\addapud}{% - \renewcommand*{\multicitedelim}{% - \ifnumequal{\value{multicitecount}}{\value{multicitetotal}}% - {\space\bibstring{apud}}% - {\addsemicolon}% - \space}% - \renewcommand*{\textcitedelim}{% - \ifnumequal{\value{multicitecount}}{\value{multicitetotal}}% - {\addspace\bibstring{apud}}% - {\addsemicolon}% - \space}% -} +[2016/10/03\space v3.0\space ABNT BibLaTeX citation style]% -\newcommand{\addand}{% - \renewcommand*{\multicitedelim}{% - \ifnumequal{\value{multicitecount}}{\value{multicitetotal}}% - {\space\bibstring{and}}% - {\addsemicolon}% - \space}% - \renewcommand*{\textcitedelim}{% - \ifnumequal{\value{multicitecount}}{\value{multicitetotal}}% - {\addspace\bibstring{and}}% - {\addsemicolon}% - \space}% -} -\DeclareFieldFormat{uppercasecite}{% - \iftoggle{sccite}{% - \textsc{\smartlowercase{#1}}% - }{% - \smartuppercase{#1}% - }% +% Init >>>1 + +\RequireBiber[3]% +\RequireCitationStyle{authoryear}% +\RequireCitationStyle{abnt-ibid}% + +\RequirePackage{xparse}% + +\renewcommand*{\iffinalcitedelim}{\iflastcitekey} + +\DeclareLabeldate{% + \field{date} + \field{year} + \field{eventdate} + \field{eventyear} + \field{origdate} + \field{urldate} + \literal{nodate} } -% ---------- -% Options -% ---------- +% <<<1 -% Option to use small caps in the citations. -\newtoggle{sccite} -\DeclareBibliographyOption{sccite}[true]{% - \settoggle{sccite}{#1}} +% Format >>>1 -% ---------- -% DeclareNameFormat -% ---------- +% Name format >>>2 -\DeclareNameFormat{LAST}{% +\DeclareNameFormat{LAST}{%% >>>3 \ifcase\value{uniquename}% \usebibmacro{name:family}% {\iftoggle{sccite}% @@ -102,9 +77,10 @@ {\namepartprefix}% {\namepartsuffix}% \fi% - \usebibmacro{name:andothers}} + \usebibmacro{name:andothers}% +}% <<<3 -\DeclareNameFormat{fullcite}{% +\DeclareNameFormat{fullcite}{%% >>>3 \ifcase\value{uniquename}% \usebibmacro{name:given-family}% {\namepartfamily}% @@ -130,103 +106,67 @@ {\namepartprefix}% {\namepartsuffix}% \fi% - \usebibmacro{name:andothers}} + \usebibmacro{name:andothers}% +}% <<<3 + +% <<<2 +% Field format >>>2 -% ---------- -% DeclareFieldFormat -% ---------- +\DeclareFieldFormat{emphtitle}{\emph{#1}}% -\DeclareFieldFormat{emphtitle}{\emph{#1}} +% Get first word >>>3 +\newcommand\FirstWord[1]{\@firstword#1 \@nil}% +\def\@firstword#1 #2\@nil{\@removecomma#1,\@nil}% +\def\@removecomma#1,#2\@nil{\@removeperiod#1.\@nil}% +\def\@removeperiod#1.#2\@nil{\@removesemicolon#1;\@nil}% +\def\@removesemicolon#1;#2\@nil{#1}% +% <<<3 -\DeclareFieldFormat{citetitle}{% +\DeclareFieldFormat{citetitle}{%% >>>3 \iftoggle{sccite}{% \normalfont\textsc{\MakeLowercase{\FirstWord{#1}}}% }{% \normalfont\MakeUppercase{\FirstWord{#1}}% }% -}% +}%% <<<3 +\DeclareFieldFormat{uppercasecite}{%% >>>3 + \iftoggle{sccite}{% + \textsc{\smartlowercase{#1}}% + }{% + \smartuppercase{#1}% + }% +}% <<<3 -% ---------- -% DeclareCiteCommand -% ---------- +% <<<2 -\NewDocumentCommand{\textapud}{o o m o o m}{% - \citelastname{#3} - \mkbibparens{% - \IfNoValueTF{#2} - {% - \IfNoValueTF{#1} - {\citeyear*{#3}} - {\citeyear*[#1]{#3}}% - } - {% - \citeyear*[#1][#2]{#3}% - } - \IfNoValueTF{#5} - {% - \IfNoValueTF{#4} - {\plaincite[\blx@imc@bibxstring{apud}][]{#6}} - {\plaincite[\blx@imc@bibxstring{apud}][#4]{#6}}% - } - {% - \cite[\blx@imc@bibxstring{apud} #4][#5]{#6}% - }% - }} +% <<<1 -\DeclareMultiCiteCommand{\apud}[\addapud\mkbibparens] - {\@apud} - {\setunit{\multicitedelim}} -\DeclareCiteCommand{\@apud} - {\usebibmacro{cite:init}% - \iffieldundef{prenote}% - {}% - {\printfield[uppercasecite]{prenote}% - \addspace\bibstring{apud}\addspace}}% - {\usebibmacro{citeindex}% - \usebibmacro{cite}}% - {\setunit{\multicitedelim}}% - {\usebibmacro{postnote}} +% Cite commands >>>1 -\DeclareCiteCommand{\parencite}[\mkbibparens] +\DeclareCiteCommand{\cite}[\mkbibparens]% >>>2 {\usebibmacro{cite:init}% \usebibmacro{prenote}}% {\usebibmacro{citeindex}% \usebibmacro{cite}}% {}% - {\usebibmacro{postnote}} + {\usebibmacro{postnote}}% -\DeclareCiteCommand{\cite}[\mkbibparens] +\DeclareCiteCommand*{\cite}% {\usebibmacro{cite:init}% \usebibmacro{prenote}}% {\usebibmacro{citeindex}% \usebibmacro{cite}}% {}% - {\usebibmacro{postnote}} + {\usebibmacro{postnote}}% -\DeclareMultiCiteCommand{\cites}[\mkbibparens] +\DeclareMultiCiteCommand{\cites}[\mkbibparens]% {\cite}% - {\setunit{\multicitedelim}} + {\setunit{\multicitedelim}}% <<<2 -\DeclareCiteCommand*{\cite} - {\usebibmacro{cite:init}% - \usebibmacro{prenote}}% - {\usebibmacro{citeindex}% - \usebibmacro{cite}}% - {}% - {\usebibmacro{postnote}} - -\DeclareCiteCommand{\plaincite} - {\usebibmacro{cite:init}% - \usebibmacro{prenote}}% - {\usebibmacro{citeindex}% - \usebibmacro{cite}}% - {\multicitedelim}% - {\usebibmacro{postnote}} - -\DeclareCiteCommand{\textcite} +\DeclareCiteCommand{\textcite}% >>>2 {\usebibmacro{cite:init}% \boolfalse{cbx:parens}% \renewcommand*{\finalnamedelim}{\addspace\bibstring{and}\addspace}% @@ -240,9 +180,9 @@ {\ifbool{cbx:parens}% {\bibcloseparen\global\boolfalse{cbx:parens}}% {}}% - {\usebibmacro{textcite:postnote}} + {\usebibmacro{textcite:postnote}}% -\DeclareCiteCommand*{\textcite} +\DeclareCiteCommand*{\textcite}% {\usebibmacro{cite:init}% \boolfalse{cbx:parens}% \renewcommand*{\finalnamedelim}{\addspace\bibstring{and}\addspace}% @@ -258,19 +198,40 @@ {}}% {\usebibmacro{textcite:postnote}} -\DeclareCiteCommand{\citetitle}[\mkbibparens] +\DeclareMultiCiteCommand{\textcites}{\textcite}{}% <<<2 + + +\DeclareCiteCommand{\parencite}[\mkbibparens]% >>>2 {\usebibmacro{cite:init}% - \boolfalse{citetracker}% + \usebibmacro{prenote}}% + {\usebibmacro{citeindex}% + \usebibmacro{cite}}% + {}% + {\usebibmacro{postnote}}% <<<2 + +\DeclareCiteCommand{\citeauthor}[\mkbibparens]% >>>2 + {\boolfalse{citetracker}% \boolfalse{pagetracker}% \usebibmacro{prenote}}% {\ifciteindex% - {\indexfield{indextitle}}% + {\indexnames{labelname}}% {}% - \printtext[bibhyperref]{\printfield[emphtitle]{labeltitle}}}% + \printtext[bibhyperref]{\printnames[LAST]{labelname}}}% + {\multicitedelim}% + {\usebibmacro{postnote}}% + +\DeclareCiteCommand*{\citeauthor}% + {\boolfalse{citetracker}% + \boolfalse{pagetracker}% + \usebibmacro{prenote}}% + {\ifciteindex% + {\indexnames{labelname}}% + {}% + \printtext[bibhyperref]{\printnames{labelname}}}% {\multicitedelim}% - {\usebibmacro{postnote}} + {\usebibmacro{postnote}}% <<<2 -\DeclareCiteCommand*{\citetitle} +\DeclareCiteCommand{\citetitle}[\mkbibparens]% >>>2 {\usebibmacro{cite:init}% \boolfalse{citetracker}% \boolfalse{pagetracker}% @@ -280,73 +241,136 @@ {}% \printtext[bibhyperref]{\printfield[emphtitle]{labeltitle}}}% {\multicitedelim}% - {\usebibmacro{postnote}} + {\usebibmacro{postnote}}% -\DeclareCiteCommand{\citelastname} +\DeclareCiteCommand*{\citetitle}% {\usebibmacro{cite:init}% \boolfalse{citetracker}% \boolfalse{pagetracker}% \usebibmacro{prenote}}% {\ifciteindex% - {\indexnames{labelname}}% + {\indexfield{indextitle}}% {}% - \printtext[bibhyperref]{\printnames{labelname}}}% + \printtext[bibhyperref]{\printfield[emphtitle]{labeltitle}}}% {\multicitedelim}% - {\usebibmacro{postnote}} + {\usebibmacro{postnote}}% <<<2 -\DeclareCiteCommand{\citeauthor}[\mkbibparens] +\DeclareCiteCommand{\citeyear}[\mkbibparens]% >>>2 {\boolfalse{citetracker}% \boolfalse{pagetracker}% - \usebibmacro{prenote}} - {\ifciteindex - {\indexnames{labelname}} - {}% - \printtext[bibhyperref]{\printnames[LAST]{labelname}}} - {\multicitedelim} - {\usebibmacro{postnote}} + \usebibmacro{prenote}}% + {\printfield[bibhyperref]{year}}% + {\multicitedelim}% + {\usebibmacro{postnote}}% -\DeclareCiteCommand*{\citeauthor} +\DeclareCiteCommand*{\citeyear}% {\boolfalse{citetracker}% \boolfalse{pagetracker}% - \usebibmacro{prenote}} - {\ifciteindex - {\indexnames{labelname}} - {}% - \printtext[bibhyperref]{\printnames{labelname}}}% - {\multicitedelim} - {\usebibmacro{postnote}} + \usebibmacro{prenote}}% + {\printfield[bibhyperref]{year}}% + {\multicitedelim}% + {\usebibmacro{postnote}}% <<<2 -\DeclareCiteCommand{\citeyear}[\mkbibparens] - {\boolfalse{citetracker}% - \boolfalse{pagetracker}% - \usebibmacro{prenote}} - {\printfield[bibhyperref]{year}} - {\multicitedelim} - {\usebibmacro{postnote}} +% apud >>>2 -\DeclareCiteCommand*{\citeyear} - {\boolfalse{citetracker}% +\DeclareCiteCommand{\@apud}% >>>3 + {\usebibmacro{cite:init}% + \iffieldundef{prenote}% + {}% + {\printfield[uppercasecite]{prenote}% + \addspace\bibstring{apud}\addspace}}% + {\usebibmacro{citeindex}% + \usebibmacro{cite}}% + {\setunit{\multicitedelim}}% + {\usebibmacro{postnote}}% <<<3 + +\DeclareMultiCiteCommand{\apud}[\addapud\mkbibparens]% >>>3 + {\@apud}% + {\setunit{\multicitedelim}% +}% <<<3 + +\DeclareCiteCommand{\plaincite}% >>>3 + {\usebibmacro{cite:init}% + \usebibmacro{prenote}}% + {\usebibmacro{citeindex}% + \usebibmacro{cite}}% + {\multicitedelim}% + {\usebibmacro{postnote}}% <<<3 + +\DeclareCiteCommand{\citelastname}% >>>3 + {\usebibmacro{cite:init}% + \boolfalse{citetracker}% \boolfalse{pagetracker}% - \usebibmacro{prenote}} - {\printfield[bibhyperref]{year}} - {\multicitedelim} - {\usebibmacro{postnote}} + \usebibmacro{prenote}}% + {\ifciteindex% + {\indexnames{labelname}}% + {}% + \printtext[bibhyperref]{\printnames{labelname}}}% + {\multicitedelim}% + {\usebibmacro{postnote}}% <<<3 + +\NewDocumentCommand{\textapud}{o o m o o m}{%% >>>3 + \citelastname{#3} + \mkbibparens{% + \IfNoValueTF{#2} + {% + \IfNoValueTF{#1} + {\citeyear*{#3}} + {\citeyear*[#1]{#3}}% + } + {% + \citeyear*[#1][#2]{#3}% + } + \IfNoValueTF{#5} + {% + \IfNoValueTF{#4} + {\plaincite[\blx@imc@bibxstring{apud}][]{#6}} + {\plaincite[\blx@imc@bibxstring{apud}][#4]{#6}}% + } + {% + \cite[\blx@imc@bibxstring{apud} #4][#5]{#6}% + }% + }% +}%% <<<3 +% <<<2 -% ---------- -% newbibmacro -% ---------- +% <<<1 -\newbibmacro*{cite:noname}{% - \printfield[citetitle]{title}} -\newbibmacro*{cite:init}{% - \global\undef\cbx@lasthash} +% Macros >>>1 -\newbibmacro*{cite:author}{% - \printtext[bibhyperref]{\printfield{author}}} +\renewbibmacro*{cite}{%% >>>2 + \iffieldequals{fullhash}{\cbx@lasthash}% + {\usebibmacro{cite:plabelyear+extrayear}}% + {\iffieldundef{shorthand}{% + \ifnameundef{shortauthor}{% + \ifnameundef{holder}{% + \ifnameundef{labelname}{% + \iflistundef{organization}{% + \usebibmacro{cite:noname}% + }{% + \printlist[uppercase]{organization}% + }% + }{% + \printtext[bibhyperref]{\printnames[LAST]{labelname}}% + }% + }{% + \printnames[LAST]{holder}% + }% + }{% + \printnames[LAST]{shortauthor}% + }% + }{% + \usebibmacro{cite:shorthand}% + }% + \setunit{\nameyeardelim}% + \usebibmacro{cite:plabelyear+extrayear}% + \savefield{fullhash}{\cbx@lasthash}}% + \setunit{\multicitedelim}% +}% <<<2 -\renewbibmacro*{textcite}{% +\renewbibmacro*{textcite}{%% >>>2 \ifnameundef{labelname}% {\iffieldundef{shorthand}% {\usebibmacro{cite:label}% @@ -358,16 +382,17 @@ {}% \usebibmacro{cite:labelyear+extrayear}}% {\usebibmacro{cite:shorthand}}}% - {\printnames{labelname}% + {\printtext[bibhyperref]{\printnames{labelname}}% \setunit{% \global\booltrue{cbx:parens}% \addspace\bibopenparen}% \ifnumequal{\value{citecount}}{1}% {\usebibmacro{prenote}}% {}% - \usebibmacro{citeyear}}} + \usebibmacro{citeyear}}% +}% <<<2 -\newbibmacro*{textcitefull}{% +\newbibmacro*{textcitefull}{%% >>>2 \ifnameundef{labelname}% {\iffieldundef{shorthand}% {\usebibmacro{cite:label}% @@ -379,136 +404,152 @@ {}% \usebibmacro{cite:labelyear+extrayear}}% {\usebibmacro{cite:shorthand}}}% - {\printnames[fullcite]{labelname}% + {\printtext[bibhyperref]{\printnames[fullcite]{labelname}}% \setunit{% \global\booltrue{cbx:parens}% \addspace\bibopenparen}% \ifnumequal{\value{citecount}}{1}% {\usebibmacro{prenote}}% {}% - \usebibmacro{citeyear}}} + \usebibmacro{citeyear}}% +}% <<<2 -\renewbibmacro*{cite}{% - \iffieldequals{fullhash}{\cbx@lasthash}% - {\usebibmacro{cite:plabelyear+extrayear}}% - {\iffieldundef{shorthand}{% - \ifnameundef{shortauthor}{% - \ifnameundef{holder}{% - \ifnameundef{labelname}{% - \iflistundef{organization}{% - \usebibmacro{cite:noname}% - }{% - \printlist[uppercase]{organization}% - } - }{% - \printtext[bibhyperref]{\printnames[LAST]{labelname}}% - } - }{% - \printnames[LAST]{holder}% - } - }{% - \printnames[LAST]{shortauthor}% - } - }{% - \usebibmacro{cite:shorthand} - } - \setunit{\nameyeardelim}% - \usebibmacro{cite:plabelyear+extrayear}% - \savefield{fullhash}{\cbx@lasthash}}% - \setunit{\multicitedelim}} +\newbibmacro*{cite:init}{%% >>>2 + \global\undef\cbx@lasthash% +}% <<<2 + +\newbibmacro*{cite:author}{%% >>>2 + \printtext[bibhyperref]{\printfield{author}}% +}% <<<2 + +\newbibmacro*{cite:noname}{%% >>>2 + \printfield[citetitle]{title}% +}% <<<2 -\def\citeresetabnt{\global\let\cbx@abnt@names\@empty} -\citeresetabnt +\def\citeresetabnt{\global\let\cbx@abnt@names\@empty}% +\citeresetabnt% \def\cbx@abnt@ifnamesaved{% - \xifinlist{\thefield{fullhash}}{\cbx@abnt@names} - {\@firstoftwo} - {\@secondoftwo}} + \xifinlist{\thefield{fullhash}}{\cbx@abnt@names}% + {\@firstoftwo}% + {\@secondoftwo}}% + +\renewbibmacro*{cite:label}{%% >>>2 + \iffieldundef{label}{% + \printtext[bibhyperref]{% + \printfield[uppercasecite]{labeltitle}% + }% + }{% + \printtext[bibhyperref]{% + \printfield{label}% + }% + }% +}% <<<2 + +\newbibmacro*{cite:plabelyear+extrayear}{%% >>>2 + \iffieldundef{labelyear}{}{% + \printtext[bibhyperref]{% + \printfield[noformat]{origyear}% + \setunit*{\addslash}% + \printfield{labelyear}% + \printfield{extrayear}% + }% + }% + \iffieldundef{issue}{}{% + \addcomma\addspace\printfield{issue}% + }% +}% <<<2 -\renewbibmacro*{cite:label}{% - \iffieldundef{label} - {\printtext[bibhyperref]{\printfield[uppercasecite]{labeltitle}}}% - {\printtext[bibhyperref]{\printfield{label}}}} +\renewbibmacro*{cite:shorthand}{%% >>>2 + \printtext[bibhyperref]{% + \emph{\printfield{shorthand}}% + }% +}% <<<2 + +\newbibmacro*{citeyearpunct}{%% >>>2 + \iffieldundef{labelyear}{% + \usebibmacro{cite:init}% + }{% else + \iffieldequals{fullhash}{\cbx@lasthash}{% + \setunit{\compcitedelim}% + \usebibmacro{cite:plabelyear+extrayear}% + }{% else + \usebibmacro{cite:plabelyear+extrayear}% + \savefield{fullhash}{\cbx@lasthash}% + }% + }% + \setunit{\multicitedelim}% +}% <<<2 -\newbibmacro*{cite:plabelyear+extrayear}{% - \iffieldundef{labelyear}% - {}% - {\printtext[bibhyperref]{% - \printfield[noformat]{origyear}\setunit*{\addslash}% - \printfield{labelyear}\printfield{extrayear}}}% - \iffieldundef{issue}% - {}% - {\addcomma\addspace\printfield{issue}}} - -\renewbibmacro*{cite:shorthand}{% - \printtext[bibhyperref]{\emph{\printfield{shorthand}}}} - -\newbibmacro*{citeyearpunct}{% - \iffieldundef{labelyear}% - {\usebibmacro{cite:init}}% - {\iffieldequals{fullhash}{\cbx@lasthash}% - {\setunit{\compcitedelim}% - \usebibmacro{cite:plabelyear+extrayear}}% - {\usebibmacro{cite:plabelyear+extrayear}% - \savefield{fullhash}{\cbx@lasthash}}}% - \setunit{\multicitedelim}} - - -% Get the whole thing inside bibhyperref (including punctuation) - -\DeclareFieldFormat{citehyperref}{% +% <<<1 + + +% bibhyperref >>>1 + +\DeclareFieldFormat{citehyperref}{%% >>>2 \DeclareFieldAlias{bibhyperref}{noformat}% Avoid nested links - \bibhyperref{#1}} + \bibhyperref{#1}% +}% <<<2 -\DeclareFieldFormat{textcitehyperref}{% +\DeclareFieldFormat{textcitehyperref}{%% >>>2 \DeclareFieldAlias{bibhyperref}{noformat}% Avoid nested links \bibhyperref{% #1% - \ifbool{cbx:parens} - {\bibcloseparen\global\boolfalse{cbx:parens}} - {}}} + \ifbool{cbx:parens}% + {\bibcloseparen\global\boolfalse{cbx:parens}}% + {}}% +}% <<<2 -\savebibmacro{cite} -\savebibmacro{textcite} -\savebibmacro{textcitefull} +\savebibmacro{cite}% +\savebibmacro{textcite}% +\savebibmacro{textcitefull}% -\renewbibmacro*{cite}{% +\renewbibmacro*{cite}{%% >>>2 \printtext[citehyperref]{% \restorebibmacro{cite}% - \usebibmacro{cite}}} - -\renewbibmacro*{textcite}{% - \ifboolexpr{ - ( not test {\iffieldundef{prenote}} and - test {\ifnumequal{\value{citecount}}{1}} ) - or - ( not test {\iffieldundef{postnote}} and - test {\ifnumequal{\value{citecount}}{\value{citetotal}}} ) - } - {\DeclareFieldAlias{textcitehyperref}{noformat}} + \usebibmacro{cite}}% +}% <<<2 + +\renewbibmacro*{textcite}{%% >>>2 + \ifboolexpr{% + (% + not test {\iffieldundef{prenote}}% + and% + test {\ifnumequal{\value{citecount}}{1}}% + )% + or% + (% + not test {\iffieldundef{postnote}}% + and% + test {\ifnumequal{\value{citecount}}{\value{citetotal}}}% + )% + }% + {\DeclareFieldAlias{textcitehyperref}{noformat}}% {}% \printtext[textcitehyperref]{% \restorebibmacro{textcite}% - \usebibmacro{textcite}}} - -\renewbibmacro*{textcitefull}{% - \ifboolexpr{ - ( not test {\iffieldundef{prenote}} and - test {\ifnumequal{\value{citecount}}{1}} ) - or - ( not test {\iffieldundef{postnote}} and - test {\ifnumequal{\value{citecount}}{\value{citetotal}}} ) - } - {\DeclareFieldAlias{textcitehyperref}{noformat}} + \usebibmacro{textcite}}% +}% <<<2 + +\renewbibmacro*{textcitefull}{%% >>>2 + \ifboolexpr{% + ( not test {\iffieldundef{prenote}} and% + test {\ifnumequal{\value{citecount}}{1}} )% + or% + ( not test {\iffieldundef{postnote}} and% + test {\ifnumequal{\value{citecount}}{\value{citetotal}}} )% + }% + {\DeclareFieldAlias{textcitehyperref}{noformat}}% {}% \printtext[textcitehyperref]{% \restorebibmacro{textcitefull}% - \usebibmacro{textcitefull}}} + \usebibmacro{textcitefull}}% +}% <<<2 +% <<<1 -\newcommand\FirstWord[1]{\@firstword#1 \@nil}% -\def\@firstword#1 #2\@nil{\@removecomma#1,\@nil}% -\def\@removecomma#1,#2\@nil{\@removeperiod#1.\@nil} -\def\@removeperiod#1.#2\@nil{\@removesemicolon#1;\@nil} -\def\@removesemicolon#1;#2\@nil{#1} -\endinput +\endinput% + + +% vim: set foldmarker=\ >>>,\ <<< : + -- cgit v1.2.3