diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/biblatex-lncs/lncs.bbx')
-rw-r--r-- | Master/texmf-dist/tex/latex/biblatex-lncs/lncs.bbx | 300 |
1 files changed, 187 insertions, 113 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex-lncs/lncs.bbx b/Master/texmf-dist/tex/latex/biblatex-lncs/lncs.bbx index 100de6d671f..544d8295c16 100644 --- a/Master/texmf-dist/tex/latex/biblatex-lncs/lncs.bbx +++ b/Master/texmf-dist/tex/latex/biblatex-lncs/lncs.bbx @@ -1,4 +1,4 @@ -\ProvidesFile{lncs.bbx}[2022/12/15 v0.6] +\ProvidesFile{lncs.bbx}[2023/05/08 v0.7] \RequireBibliographyStyle{numeric} @@ -34,48 +34,71 @@ \DeclareFieldFormat{year}{(#1)} \DeclareFieldFormat{acronym}{#1} \DeclareFieldFormat{url}{\url{#1}} - -%%% +\DeclareFieldFormat[article]{volume}{\textbf{#1}} +\DeclareFieldFormat{doi}{\url{https://doi.org/#1}} +%%% \defbibenvironment{bibliography} - {\list - {\printfield[labelnumberwidth]{labelnumber}} - {\setlength{\labelwidth}{\labelnumberwidth}% - \setlength{\leftmargin}{\labelwidth}% - \setlength{\labelsep}{.5em}% - \addtolength{\leftmargin}{\labelsep}% - \setlength{\itemsep}{\bibitemsep}% - \setlength{\parsep}{\bibparsep}}% - \renewcommand*{\makelabel}[1]{\hss##1}} - {\endlist} - {\item} +{\list + {\printfield[labelnumberwidth]{labelnumber}} + {\setlength{\labelwidth}{\labelnumberwidth}% + \setlength{\leftmargin}{\labelwidth}% + \setlength{\labelsep}{.5em}% + \addtolength{\leftmargin}{\labelsep}% + \setlength{\itemsep}{\bibitemsep}% + \setlength{\parsep}{\bibparsep}}% + \renewcommand*{\makelabel}[1]{\hss##1}} +{\endlist} +{\item} \DeclareStyleSourcemap{ \maps[datatype=bibtex]{ \map{ \step[fieldsource=series, - match=\regexp{Lecture\s+Notes\s+in\s+Computer\s+Science}, - replace={LNCS}] + match=\regexp{Lecture\s+Notes\s+in\s+Computer\s+Science}, + replace={LNCS}] \step[fieldsource=series, - match=\regexp{Lecture\s+Notes\s+in\s+Artificial\s+Intelligence}, - replace={LNAI}] + match=\regexp{Lecture\s+Notes\s+in\s+Artificial\s+Intelligence}, + replace={LNAI}] \step[fieldsource=series, - match=\regexp{Lecture\s+Notes\s+in\s+Business\s+Information\s+Processing}, - replace={LNBIP}] + match=\regexp{Lecture\s+Notes\s+in\s+Business\s+Information\s+Processing}, + replace={LNBIP}] + } + } +} + +\DeclareSourcemap{ + \maps[datatype=bibtex]{ + \map{ + \step[ % copies url to doi field if it starts with https://doi.org/ or http://dx.doi.org/. This does not overwrite doi. + fieldsource=url, + match=\regexp{https?://(dx.)?doi.org/(.+)}, + fieldtarget=doi, + ] + \step[ % removes https://doi.org/ or http://dx.doi.org/ string from doi field + fieldsource=doi, + match=\regexp{https?://(dx.)?doi.org/(.+)}, + replace=\regexp{$2} + ] + } + \map{ % removes url + urldate field from all entries that have a doi field with https://doi.org/ or http://dx.doi.org/ string. If url is undefined or does not match \regexp{https?://(dx.)?doi.org/(.+)}, then processing of this \map immediately terminates. + \step[fieldsource=url, match=\regexp{https?://(dx.)?doi.org/(.+)}, final] + \step[fieldset=url, null] + \step[fieldset=urldate, null] } } } \renewbibmacro{journal}{% \iffieldundef{shortjournal} - {\printfield{journaltitle}} - {\printfield[journal]{shortjournal}}% + {\printfield{journaltitle}} + {\printfield[journal]{shortjournal}}% } \renewbibmacro*{institution+location+date}{% \iflistundef{institution} - {\setunit*{\addcomma\space}} - {\setunit*{\addcolon\space}}% + {\setunit*{\addcomma\space}} + {\setunit*{\addcolon\space}}% \printlist{institution}% \setunit*{\addcomma\space} \printlist{location}% @@ -85,40 +108,40 @@ \newbibmacro{journal:info}{ \iffieldundef{volume} - {\iffieldundef{year} - {\iffieldundef{pubstate} - {} - {(\printfield{pubstate})}} - {\printfield{year}}} - {\printfield{volume}% - \iffieldundef{number}{}{(\printfield{number})}% - \iffieldundef{pages} - {\addspace\printfield{year}} - {\addcomma\addspace\printfield{pages}\addspace\printfield{year}} - } + {\iffieldundef{year} + {\iffieldundef{pubstate} + {} + {(\printfield{pubstate})}} + {\printfield{year}}} + {\printfield{volume}% + \iffieldundef{number}{}{(\printfield{number})}% + \iffieldundef{pages} + {\addspace\printfield{year}} + {\addcomma\addspace\printfield{pages}\addspace\printfield{year}} + } } \newbibmacro{proceedingstitle}{% \iffieldundef{booktitle} - {\printfield{eventtitle}} - {\printfield{booktitle}} + {\printfield{eventtitle}} + {\printfield{booktitle}} } \newbibmacro{acronym/booktitle}{% \iffieldundef{acronym} - {\usebibmacro{proceedingstitle}} - {\printfield{acronym}}% - \addperiod\addspace + {\usebibmacro{proceedingstitle}} + {\printfield{acronym}}% + \addperiod\addspace } \newbibmacro{publisher+location}{% \iftoggle{lncs:lncs} - {\printtext{Springer, Heidelberg}} - {\printlist{publisher}% - \iflistundef{location} - {} - {\addcomma\addspace\printlist{location}}% - }% + {\printtext{Springer, Heidelberg}} + {\printlist{publisher}% + \iflistundef{location} + {} + {\addcomma\addspace\printlist{location}}% + }% } \renewbibmacro{finentry}{\settoggle{lncs:lncs}{false}\finentry} @@ -128,8 +151,8 @@ \newbibmacro{doi}{% \iftoggle{bbx:doi} - {\printfield{doi}} - {}% + {\printfield{doi}} + {}% } \renewbibmacro*{name:andothers}{% from biblatex.def @@ -138,15 +161,31 @@ and test \ifmorenames } - {\ifnumgreater{\value{liststop}}{1} - {\finalandcomma} - {}% - \printdelim{andothersdelim}\bibstring[\emph]{andothers}} % added: \emph - {}} + {\ifnumgreater{\value{liststop}}{1} + {\finalandcomma} + {}% + \printdelim{andothersdelim}\bibstring[\emph]{andothers}} % added: \emph + {}} \DeclareFieldFormat{editortype}{(#1)} \DeclareDelimFormat{editortypedelim}{\space} +\DeclareNameFormat{author}{% + \ifdefvoid{\namepartprefix}{}{\namepartprefix\space}\namepartfamily, \namepartgiveni% + \ifthenelse{\value{listcount}<\value{liststop}} + {\addcomma\space}% + {}% + \usebibmacro{name:andothers}% +} +\DeclareNameFormat{editor}{% + \ifdefvoid{\namepartprefix}{}{\namepartprefix\space}\namepartfamily, \namepartgiveni% + \ifthenelse{\value{listcount}<\value{liststop}} + {\addcomma\space}% + {\space\ifthenelse{\value{listcount}>1} + {(\bibstring{editors})} + {(\bibstring{editor})}}% +} + \DeclareBibliographyDriver{article}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% @@ -162,10 +201,10 @@ \usebibmacro{pageref}% \newunit\newblock \iftoggle{bbx:related} - {\usebibmacro{related:init}% - \usebibmacro{related}} - {}% - \usebibmacro{doi}% + {\usebibmacro{related:init}% + \usebibmacro{related}} + {}% + \usebibmacro{doi+eprint+url}% \nopunct% \usebibmacro{finentry}% } @@ -174,8 +213,8 @@ \usebibmacro{bibindex}% \usebibmacro{begentry}% \ifnameundef{author} - {\printnames{editor}} - {\printnames{author}}% + {\printnames{editor}} + {\printnames{author}}% \setunit*{\labelnamepunct}\newblock% \usebibmacro{title}% \newunit% @@ -188,9 +227,9 @@ \usebibmacro{pageref}% \newunit\newblock \iftoggle{bbx:related} - {\usebibmacro{related:init}% - \usebibmacro{related}} - {}% + {\usebibmacro{related:init}% + \usebibmacro{related}} + {}% \nopunct% \usebibmacro{finentry}% } @@ -206,28 +245,28 @@ \printnames{editor}% \newunit \iffieldundef{series} - {\iftoggle{lncs:abbrev} - {\usebibmacro{acronym/booktitle}} - {\usebibmacro{proceedingstitle}\newunit}% - }% - {\ifboolexpr{ - test {\iffieldequalstr{series}{LNAI}} - or - test {\iffieldequalstr{series}{LNCS}} - or - test {\iffieldequalstr{series}{LNBIP}} - } - {\settoggle{lncs:lncs}{true}% - \usebibmacro{acronym/booktitle}% - \printfield{series} - \addcomma\newunit - \iffieldundef{volume} - {\iffieldundef{number}{}{vol.\addspace\printfield{number}\addcomma}} - {\printfield{volume}}% - }% - {\usebibmacro{acronym/booktitle}% - \printfield{series}}% + {\iftoggle{lncs:abbrev} + {\usebibmacro{acronym/booktitle}} + {\usebibmacro{proceedingstitle}\newunit}% + }% + {\ifboolexpr{ + test {\iffieldequalstr{series}{LNAI}} + or + test {\iffieldequalstr{series}{LNCS}} + or + test {\iffieldequalstr{series}{LNBIP}} } + {\settoggle{lncs:lncs}{true}% + \usebibmacro{acronym/booktitle}% + \printfield{series} + \addcomma\newunit + \iffieldundef{volume} + {\iffieldundef{number}{}{vol.\addspace\printfield{number}\addcomma}} + {\printfield{volume}}% + }% + {\usebibmacro{acronym/booktitle}% + \printfield{series}}% + } \iffieldundef{pages}{}{\setunit{\addcomma\space}\printfield{pages}}% \newunit% \usebibmacro{publisher+location}% @@ -239,10 +278,10 @@ \usebibmacro{pageref}% \newunit\newblock \iftoggle{bbx:related} - {\usebibmacro{related:init}% - \usebibmacro{related}} - {}% - \usebibmacro{doi}% + {\usebibmacro{related:init}% + \usebibmacro{related}} + {}% + \usebibmacro{doi+eprint+url}% \nopunct% \usebibmacro{finentry}% } @@ -253,16 +292,16 @@ \usebibmacro{bibindex}% \usebibmacro{begentry}% \printnames{author} - %\setunit*{\addcolon\space} + % \setunit*{\addcolon\space} \setunit*{\labelnamepunct}\newblock% \usebibmacro{title} - %\printfield[article]{title} + % \printfield[article]{title} \newunit\newblock - %\printtext{In:} + % \printtext{In:} \usebibmacro{in:}% \usebibmacro{maintitle+booktitle}% \newunit\newblock - %\printnames{editor} + % \printnames{editor} \usebibmacro{byeditor+others} \newunit \iffieldundef{pages}{}{\addcomma\addspace\printfield{pages}} @@ -276,10 +315,10 @@ \usebibmacro{pageref}% \newunit\newblock \iftoggle{bbx:related} - {\usebibmacro{related:init}% - \usebibmacro{related}} - {}% - \usebibmacro{doi}% + {\usebibmacro{related:init}% + \usebibmacro{related}} + {}% + \usebibmacro{doi+eprint+url}% \nopunct% \usebibmacro{finentry}% } @@ -317,8 +356,8 @@ \printfield{year}% \newunit\newblock \iftoggle{bbx:eprint} - {\usebibmacro{eprint}} - {}% + {\usebibmacro{eprint}} + {}% \newunit\newblock \usebibmacro{url+urldate}% \newunit\newblock @@ -327,15 +366,51 @@ \usebibmacro{pageref}% \newunit\newblock \iftoggle{bbx:related} - {\usebibmacro{related:init}% - \usebibmacro{related}} - {}% + {\usebibmacro{related:init}% + \usebibmacro{related}} + {}% \usebibmacro{doi}% \nopunct% \usebibmacro{finentry} } -\DeclareBibliographyDriver{misc}{MISC} +\DeclareBibliographyDriver{misc}{% + \usebibmacro{bibindex}% + \usebibmacro{begentry}% + \usebibmacro{author/editor+others/translator+others}% + \setunit*{\labelnamepunct}\newblock% + \usebibmacro{title}% + \addcomma\newunit + \printlist{language}% + \newunit\newblock + \usebibmacro{byauthor}% + \newunit\newblock + \usebibmacro{byeditor+others}% + \newunit\newblock + \printfield{howpublished}% + \newunit\newblock + \printfield{type}% + \newunit + \printfield{version}% + \setunit{\addspace} + \printfield{year}% + \newunit + \usebibmacro{doi+eprint+url}% + \newunit + \printfield{note}% + \newunit\newblock + \printlist{organization}% + \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}% @@ -347,11 +422,10 @@ \printfield{type} \addcomma\newunit \usebibmacro{institution+location+date}% - \usebibmacro{doi}% + \usebibmacro{doi+eprint+url}% \usebibmacro{finentry}% } - \DeclareBibliographyDriver{report}{% \usebibmacro{bibindex}% \usebibmacro{begentry}% @@ -376,27 +450,27 @@ \printfield{pagetotal}% \newunit\newblock \iftoggle{bbx:isbn} - {\printfield{isrn}} - {}% + {\printfield{isrn}} + {}% \newunit\newblock \usebibmacro{institution+location+date}% - %\newunit\newblock + % \newunit\newblock \newunit\newblock \usebibmacro{addendum+pubstate}% \setunit{\bibpagerefpunct}\newblock \usebibmacro{pageref}% \newunit\newblock \iftoggle{bbx:related} - {\usebibmacro{related:init}% - \usebibmacro{related}} - {}% - \usebibmacro{doi}% + {\usebibmacro{related:init}% + \usebibmacro{related}} + {}% + \usebibmacro{doi+eprint+url}% \nopunct% \usebibmacro{finentry} } % \DeclareBibliographyDriver{*}{% -% Titolo: \printfield{title}\\ -% Autore: \printnames{author}\\ -% Prova: \printfield{acronym}% +% Titolo: \printfield{title}\\ +% Autore: \printnames{author}\\ +% Prova: \printfield{acronym}% % } |