1

I am currently facing some obstacles concerning bibliography layout (again).

My institute's formal rules require adding the organization to online sources, if available in capslock in front of the main title, which should be italic (whereas the article title of the website is supposed to be in plain text).

However I am really confused when it comes to bibliography changes as I am never really certain if any of my changes affect other entry types as well, thus I was wondering if you could help me.

This is how it should look like: Happy case This is what it currently looks like: enter image description here

So the position should be changed as well as the plain-text to small caps for organization. However, this should only apply for online sources.

Sorry and thank you!

Here is my MWE (I've tried to reduce it as much as possible, but several settings are already in effect so I had to add them):

\documentclass[12pt]{scrartcl}
\usepackage[left=2.50cm, right=2.50cm, top=2.50cm, bottom=2.00cm, footskip=1cm]{geometry}
\usepackage[onehalfspacing]{setspace}
\usepackage[main=ngerman, english]{babel}
\usepackage[babel, german=quotes]{csquotes}
\usepackage[ngerman]{isodate}
\usepackage[ngerman]{datetime}

%----------------------------------------------------------------------------
%   BIB
%----------------------------------------------------------------------------
\usepackage[
  backend=biber,
  style=ext-authoryear,
  sorting=nyvt,
  maxnames=25,
  innamebeforetitle=true,
  usetranslator=true,
  alldates=terse,
  labeldate=year,
  dashed=false,
  isbn=false
]{biblatex}
\usepackage[hidelinks]{hyperref}

\DefineBibliographyStrings{german}{%
  andothers = {et al\adddot},
  editor    = {Hg\adddot},
  editors   = {Hg\adddot},
  urlseen = {letzter Abruf},
}

\DeclareSourcemap{
  \maps[datatype=bibtex]{
    \map[overwrite=false]{
      \pertype{article}
      \step[fieldsource=entrysubtype, match=\regexp{\Anewspaper\Z}, final]
      \step[fieldsource=journal, final]
      \step[fieldset=author, origfieldval, final]
      \step[fieldsource=author, match=\regexp{\A(.*)\Z}, replace=\regexp{\{$1\}}]
      \step[fieldset=author+an, fieldvalue={1=journalauthor}]
      \step[fieldset=options, fieldvalue={journalauthor}]
    }
  }
}

\newtoggle{bbx@journalauthor}
\DeclareEntryOption[boolean]{journalauthor}[true]{%
\settoggle{bbx@journalauthor}{#1}}

\renewcommand{\mkbibnamefamily}[1]{%
  \ifitemannotation{journalauthor}
    {\mkbibemph{#1}}
    {\textsc{#1}}}

\DeclareDelimFormat[bib]{nametitledelim}{\addcolon\space}

\DeclareDelimFormat{editortypedelim}{\addspace}
\DeclareFieldFormat{editortype}{\mkbibparens{#1}}
\DeclareDelimAlias{translatortypedelim}{editortypedelim}
\DeclareFieldAlias{translatortype}{editortype}

\DeclareFieldFormat
  [article,inbook,incollection,inproceedings,patent,unpublished,online]
  {title}{#1\isdot}
\DeclareFieldFormat
  [thesis]
  {title}{\mkbibemph{#1}\isdot} % thesis title italic

% no period after addon titles
\renewcommand*{\titleaddonpunct}{\addspace}
\DeclareFieldFormat{titleaddon}{\mkbibbrackets{#1}}
\DeclareFieldAlias{booktitleaddon}{titleaddon}
\DeclareFieldAlias{maintitleaddon}{titleaddon}

\newbibmacro{online:editor+maintitle}{%
  \printnames{editor}%
  \setunit*{\addcolon\space}%
  \usebibmacro{maintitle}}

\usepackage{xpatch}
\xpatchbibdriver{online}
  {\usebibmacro{byeditor+others}}
  {\usebibmacro{online:editor+maintitle}}
  {}{}
\xpatchbibmacro{editorstrg}{\bibstring}{\bibcpstring}{}{}
\xpatchbibmacro{editorstrg}{\bibstring}{\bibcpstring}{}{}

\renewbibmacro*{in:}{%
  \iftoggle{bbx@journalauthor}
    {}
    {\printtext{%
     \bibstring{in}\intitlepunct}}}

\DeclareNameAlias{ineditor}{sortname}

\renewcommand*{\volnumdelim}{\addcomma\space}

% set online sources as per IOA
\renewbibmacro*{addendum+pubstate}{%
  \setunit{\space}%
  \printfield{addendum}%
  \newunit\newblock
  \printfield{pubstate}}
  \urlstyle{same}% 
\DeclareFieldFormat{url}{\url{#1}}
\DeclareFieldFormat{urldate}{\mkbibparens{\bibstring{urlseen}\addcolon\space#1}}

\makeatletter
\renewbibmacro*{cite:labeldate+extradate}{%
  \iffieldundef{labelyear}
    {}
    {\printtext[extblx@inner\blx@delimcontext delims]{%
       \printtext[bibhyperref]{%
         \iftoggle{bbx@journalauthor}
           {\printfield{issue}%
            \setunit{\addcomma\space}%
            \printtext[\blx@delimcontext labeldate]{%
              \printdateextra}}
           {\printtext[\blx@delimcontext labeldate]{%
              \printlabeldateextra}}}}}}
\makeatother

\renewcommand\postnotedelim{\addcolon\addspace}
\DeclareFieldFormat{postnote}{\mknormrange{#1}}
\DeclareFieldFormat{multipostnote}{\mknormrange{#1}}

\begin{filecontents*}{\jobname.bib}
@online{NetGtas.,
 author = {Net-Gtas},
 title = {Testimonial Videos of Survivors},
 url = {https://www.global-peace.go.jp/en/picture/index.php},
 urldate = {2019-06-23},
 maintitle = {National Peace Memorial Halls for the Atomic Bomb Victims in Hiroshima and Nagasaki},
 organization = {{Net-Gtas Global Network}}
}
\end{filecontents*}
\addbibresource{\jobname.bib}
%----------------------------------------------------------------------------
\begin{document}
\nocite{*} 
\printbibliography[heading=bibintoc,title={Literaturverzeichnis}] 

\end{document}
2

Since you already patch just the online driver with your custom online:editor+maintitle macro, I suggest just modifying this macro to insert the organization, then clear the organization so it isn't printed again later.

You can adjust the organization list format for just the online entry type to add in the small caps.

So you would add this:

\DeclareListFormat[online]{organization}{%
  \textsc{%
    \usebibmacro{list:delim}{#1}%
    #1\isdot
    \usebibmacro{list:andothers}}}

And change this (you might want to adjust order and punctuation to match exactly what you want):

\newbibmacro{online:editor+maintitle}{%
  \printlist{organization}%
  \clearlist{organization}%
  \setunit*{\addcolon\space}%
  \printnames{editor}%
  \setunit*{\addcolon\space}%
  \usebibmacro{maintitle}}

MWE

\documentclass[12pt]{scrartcl}
\usepackage[left=2.50cm, right=2.50cm, top=2.50cm, bottom=2.00cm, footskip=1cm]{geometry}
\usepackage[onehalfspacing]{setspace}
\usepackage[main=ngerman, english]{babel}
\usepackage[babel, german=quotes]{csquotes}
\usepackage[ngerman]{isodate}
\usepackage[ngerman]{datetime}

%----------------------------------------------------------------------------
%   BIB
%----------------------------------------------------------------------------
\usepackage[
  backend=biber,
  style=ext-authoryear,
  sorting=nyvt,
  maxnames=25,
  innamebeforetitle=true,
  usetranslator=true,
  alldates=terse,
  labeldate=year,
  dashed=false,
  isbn=false
]{biblatex}
\usepackage[hidelinks]{hyperref}

\DefineBibliographyStrings{german}{%
  andothers = {et al\adddot},
  editor    = {Hg\adddot},
  editors   = {Hg\adddot},
  urlseen = {letzter Abruf},
}

\DeclareSourcemap{
  \maps[datatype=bibtex]{
    \map[overwrite=false]{
      \pertype{article}
      \step[fieldsource=entrysubtype, match=\regexp{\Anewspaper\Z}, final]
      \step[fieldsource=journal, final]
      \step[fieldset=author, origfieldval, final]
      \step[fieldsource=author, match=\regexp{\A(.*)\Z}, replace=\regexp{\{$1\}}]
      \step[fieldset=author+an, fieldvalue={1=journalauthor}]
      \step[fieldset=options, fieldvalue={journalauthor}]
    }
  }
}

\newtoggle{bbx@journalauthor}
\DeclareEntryOption[boolean]{journalauthor}[true]{%
\settoggle{bbx@journalauthor}{#1}}

\renewcommand{\mkbibnamefamily}[1]{%
  \ifitemannotation{journalauthor}
    {\mkbibemph{#1}}
    {\textsc{#1}}}

\DeclareDelimFormat[bib]{nametitledelim}{\addcolon\space}

\DeclareDelimFormat{editortypedelim}{\addspace}
\DeclareFieldFormat{editortype}{\mkbibparens{#1}}
\DeclareDelimAlias{translatortypedelim}{editortypedelim}
\DeclareFieldAlias{translatortype}{editortype}

\DeclareFieldFormat
  [article,inbook,incollection,inproceedings,patent,unpublished,online]
  {title}{#1\isdot}
\DeclareFieldFormat
  [thesis]
  {title}{\mkbibemph{#1}\isdot} % thesis title italic

% no period after addon titles
\renewcommand*{\titleaddonpunct}{\addspace}
\DeclareFieldFormat{titleaddon}{\mkbibbrackets{#1}}
\DeclareFieldAlias{booktitleaddon}{titleaddon}
\DeclareFieldAlias{maintitleaddon}{titleaddon}

\newbibmacro{online:editor+maintitle}{%
  \printlist{organization}%
  \clearlist{organization}%
  \setunit*{\addcolon\space}%
  \printnames{editor}%
  \setunit*{\addcolon\space}%
  \usebibmacro{maintitle}}

\usepackage{xpatch}
\xpatchbibdriver{online}
  {\usebibmacro{byeditor+others}}
  {\usebibmacro{online:editor+maintitle}}
  {}{}
\xpatchbibmacro{editorstrg}{\bibstring}{\bibcpstring}{}{}
\xpatchbibmacro{editorstrg}{\bibstring}{\bibcpstring}{}{}

\renewbibmacro*{in:}{%
  \iftoggle{bbx@journalauthor}
    {}
    {\printtext{%
     \bibstring{in}\intitlepunct}}}

\DeclareNameAlias{ineditor}{sortname}

\renewcommand*{\volnumdelim}{\addcomma\space}

% set online sources as per IOA
\renewbibmacro*{addendum+pubstate}{%
  \setunit{\space}%
  \printfield{addendum}%
  \newunit\newblock
  \printfield{pubstate}}
  \urlstyle{same}% 
\DeclareFieldFormat{url}{\url{#1}}
\DeclareFieldFormat{urldate}{\mkbibparens{\bibstring{urlseen}\addcolon\space#1}}

\makeatletter
\renewbibmacro*{cite:labeldate+extradate}{%
  \iffieldundef{labelyear}
    {}
    {\printtext[extblx@inner\blx@delimcontext delims]{%
       \printtext[bibhyperref]{%
         \iftoggle{bbx@journalauthor}
           {\printfield{issue}%
            \setunit{\addcomma\space}%
            \printtext[\blx@delimcontext labeldate]{%
              \printdateextra}}
           {\printtext[\blx@delimcontext labeldate]{%
              \printlabeldateextra}}}}}}
\makeatother

\renewcommand\postnotedelim{\addcolon\addspace}
\DeclareFieldFormat{postnote}{\mknormrange{#1}}
\DeclareFieldFormat{multipostnote}{\mknormrange{#1}}

\DeclareListFormat[online]{organization}{%
  \textsc{%
    \usebibmacro{list:delim}{#1}%
    #1\isdot
    \usebibmacro{list:andothers}}}

\begin{filecontents*}{\jobname.bib}
@online{NetGtas.,
 author = {Net-Gtas},
 title = {Testimonial Videos of Survivors},
 url = {https://www.global-peace.go.jp/en/picture/index.php},
 urldate = {2019-06-23},
 maintitle = {National Peace Memorial Halls for the Atomic Bomb Victims in Hiroshima and Nagasaki},
 organization = {{Net-Gtas Global Network}}
}
\end{filecontents*}
\addbibresource{\jobname.bib}
%----------------------------------------------------------------------------
\begin{document}
\nocite{*} 
\printbibliography[heading=bibintoc,title={Literaturverzeichnis}] 

\end{document}

MWE output

  • Thank you it worked perfeclty! – user168390 Jun 24 at 15:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.