1

I'm wondering if you can use the journalsubtitle like a titleaddon, since there's no addon option for journaltitles, right?

I have customised the style for addontitles, so that they serve as a translation for the original title, s. example: green = right, red = wrong

green = right, red = wrong

Now I would like the journalsubtitle to be usable the exact same way, omitting a dot [translated title here] add dot

Is there a way to do that?

MWE:

\documentclass[
  12pt,
  a4paper,
  headings=standardclasses,
  numbers=noenddot
]{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}
\usepackage{filecontents}
\usepackage[
  backend=biber,
  style=ext-authoryear,
  sorting=nyvt,
  maxnames=25
]{biblatex}
\addbibresource{jobname.bib}

% editor and et al. spelling
\DefineBibliographyStrings{german}{
  andothers = {et al\adddot},
  byeditor    = {Hg\adddotspace von},
  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}


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

\newbibmacro{online:editor+maintitle}{% organization in front of 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 articles as per IOA
\DeclareListWrapperFormat[article]{parenlocation}{\mkbibparens{#1}}
\DeclareListAlias{parenlocation}{location}
\renewbibmacro*{journal}{%
  \ifboolexpr{
    (test {\iffieldundef{journaltitle}}
     and
     test {\iffieldundef{journalsubtitle}})
    or
    togl {bbx@journalauthor}
  }
    {\ifboolexpr{
       togl {bbx@journalauthor}
       and
       test {\iffieldequalstr{entrysubtype}{newspaper}}
     }
       {\printlist{location}}
       {}}
    {\printtext[journaltitle]{%
       \printfield[titlecase]{journaltitle}%
       \setunit{\subtitlepunct}%
       \printfield[titlecase]{journalsubtitle}}%
     \iffieldequalstr{entrysubtype}{newspaper}
       {\setunit{\addspace}%
        \printlist[parenlocation]{location}}
       {}}}

\renewbibmacro*{issue+date}{%
  \usebibmacro{bbx:ifmergeddate}
    {}
    {\printtext[issuedate]{%
       \printdate}}%
  \setunit{\addcomma\space}%
  \printfield{issue}%
  \setunit{\addcomma\space}}

\renewbibmacro*{journal+issuetitle}{%
  \usebibmacro{journal}%
  \setunit*{\jourvoldelim}%
  \iffieldundef{series}
    {}
    {\setunit*{\jourserdelim}%
     \printfield{series}%
     \setunit{\servoldelim}}%
  \usebibmacro{volume+number+eid}%
  \setunit{\volnumdatedelim}%
  \iftoggle{bbx@journalauthor}
    {}
    {}
  \usebibmacro{issue+date}%
  \setunit{\addcolon\space}%
  \usebibmacro{issue}%
  \newunit}


\begin{filecontents}{jobname.bib}
@article{Ueda.2005,
 title = {Heian-ky\={o} no seiritsu to higashiajia},
 titleaddon = {Die Errichtung von Heian-ky\={o} und Ostasien},
 journaltitle = {Kodai higashi ajia no rekishi to bunka},
 journalsubtitle = {Geschichte und Kultur im ostasiatischen Altertum},
 author = {Ueda, Masaaki},
 year = {2005},
 volume = {122},
 publisher = {Higashiajia no kodai bunka kodai-gaku kenky\={u}-jo},
 location = {Japan},
 pages = {2-8},
 Catalogue-Link* = {http://iss.ndl.go.jp/books/R000000004-I7260043-00}
}

 @incollection{Ki.1957,
 author = {Ki, Tsurayuki},
 title = {Tosa Nikki},
 titleaddon = {Das Tagebuch von Tosa},
 pages = {5--81},
 publisher = {{Iwanami Shoten}},
 maintitle = {Nihon Koten Bungaku Taikei},
 maintitleaddon = {Japanische klassische Literatur},
 editor = {Suzuki, Tomotar\={o} and Kawaguchi, Hisao and End\={o}, Yoshimoto and Nishishita, Tsunekazu},
 booktitle = {Tosa Nikki. Kager\={o} Nikki. Izumi Shikibu Nikki. Sarashina Nikki},
 year = {1957},
 location = {T\={o}ky\={o}},
 volume = {20},
 keywords = {primary}
}
\end{filecontents}

\begin{document}
\nocite{*}
\printbibliography[heading=bibintoc,title={Literaturverzeichnis}]
\end{document}

1 Answer 1

1

It would be possibly to modify the macros to format the journalsubtitle like a (fictitious) journaltitleaddon, but it appears to be much cleaner and nicer to me to just define journaltitleaddon.

This requires a new datamodel (.dbx) file to register the new field and the addition of \setunit{\titleaddonpunct}%and \printfield{journaltitleaddon}% to \renewbibmacro*{journal} in order to print it. Compare also Add field "tome" to biblatex entries.

\documentclass[
  12pt,
  a4paper,
  headings=standardclasses,
  numbers=noenddot
]{scrartcl}
\usepackage[T1]{fontenc}
\usepackage[main=ngerman, english]{babel}
\usepackage[babel, german=quotes]{csquotes}
\usepackage{filecontents}
\begin{filecontents}{journaltitleaddon.dbx}
\DeclareDatamodelFields[type=field, datatype=literal]{
  journaltitleaddon}

\DeclareDatamodelEntryfields[article,periodical]{
  journaltitleaddon}
\end{filecontents}


\usepackage[
  backend=biber,
  datamodel=journaltitleaddon,
  style=ext-authoryear,
  sorting=nyvt,
  maxnames=25
]{biblatex}


% editor and et al. spelling
\DefineBibliographyStrings{german}{
  andothers = {et al\adddot},
  byeditor  = {Hg\adddotspace von},
  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}


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

\newbibmacro{online:editor+maintitle}{% organization in front of 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 articles as per IOA
\DeclareListWrapperFormat[article]{parenlocation}{\mkbibparens{#1}}
\DeclareListAlias{parenlocation}{location}
\renewbibmacro*{journal}{%
  \ifboolexpr{
    (test {\iffieldundef{journaltitle}}
     and
     test {\iffieldundef{journalsubtitle}})
    or
    togl {bbx@journalauthor}
  }
    {\ifboolexpr{
       togl {bbx@journalauthor}
       and
       test {\iffieldequalstr{entrysubtype}{newspaper}}
     }
       {\printlist{location}}
       {}}
    {\printtext[journaltitle]{%
       \printfield[titlecase]{journaltitle}%
       \setunit{\subtitlepunct}%
       \printfield[titlecase]{journalsubtitle}}%
     \setunit{\titleaddonpunct}%
     \printfield{journaltitleaddon}%
     \iffieldequalstr{entrysubtype}{newspaper}
       {\setunit{\addspace}%
        \printlist[parenlocation]{location}}
       {}}}

\renewbibmacro*{issue+date}{%
  \usebibmacro{bbx:ifmergeddate}
    {}
    {\printtext[issuedate]{%
       \printdate}}%
  \setunit{\addcomma\space}%
  \printfield{issue}%
  \setunit{\addcomma\space}}

\renewbibmacro*{journal+issuetitle}{%
  \usebibmacro{journal}%
  \setunit*{\jourvoldelim}%
  \iffieldundef{series}
    {}
    {\setunit*{\jourserdelim}%
     \printfield{series}%
     \setunit{\servoldelim}}%
  \usebibmacro{volume+number+eid}%
  \setunit{\volnumdatedelim}%
  \iftoggle{bbx@journalauthor}
    {}
    {}
  \usebibmacro{issue+date}%
  \setunit{\addcolon\space}%
  \usebibmacro{issue}%
  \newunit}


\begin{filecontents}{\jobname.bib}
@article{Ueda.2005,
 title             = {Heian-ky\={o} no seiritsu to higashiajia},
 titleaddon        = {Die Errichtung von Heian-ky\={o} und Ostasien},
 journaltitle      = {Kodai higashi ajia no rekishi to bunka},
 journaltitleaddon = {Geschichte und Kultur im ostasiatischen Altertum},
 author            = {Ueda, Masaaki},
 year              = {2005},
 volume            = {122},
 publisher         = {Higashiajia no kodai bunka kodai-gaku kenky\={u}-jo},
 location          = {Japan},
 pages             = {2-8},
 Catalogue-Link*   = {http://iss.ndl.go.jp/books/R000000004-I7260043-00}
}

 @incollection{Ki.1957,
 author         = {Ki, Tsurayuki},
 title          = {Tosa Nikki},
 titleaddon     = {Das Tagebuch von Tosa},
 pages          = {5--81},
 publisher      = {{Iwanami Shoten}},
 maintitle      = {Nihon Koten Bungaku Taikei},
 maintitleaddon = {Japanische klassische Literatur},
 editor         = {Suzuki, Tomotar\={o} and Kawaguchi, Hisao
                   and End\={o}, Yoshimoto and Nishishita, Tsunekazu},
 booktitle      = {Tosa Nikki. Kager\={o} Nikki. Izumi Shikibu Nikki. Sarashina Nikki},
 year           = {1957},
 location       = {T\={o}ky\={o}},
 volume         = {20},
 keywords       = {primary}
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
\nocite{*}
\printbibliography[heading=bibintoc,title={Literaturverzeichnis}]
\end{document}

Ueda, Masaaki (2005): „Heian-kyo no seiritsu to higashiajia“ [Die Errichtung von Heian-kyo und Ostasien]. In: Kodai higashi ajia no rekishi to bunka [Geschichte und Kultur im ostasiatischen Altertum] 122, S. 2–8.

3
  • thank you very much for the reply! I am sorry for the follow-up-question - I have tried to figure out the "tome" tutorial, however I am not sure what the dbx file should contain and where i should save it, for your example to work :)
    – user168390
    Jul 21, 2019 at 13:05
  • @user168390 In the MWE I posted the .dbx file will be created automatically be the \begin{filecontents}{journaltitleaddon.dbx}...\end{filecontents}. If you don't want to carry around the filecontents in your actual document, just copy the contents of the environment to a file called journaltitleaddon.dbx and place it somewhere LaTeX can find it (LaTeX will definitely be able to find the file if you put it in the same folder as your main .tex document, for more advanced globally available placement see texfaq.org/FAQ-inst-wlcf and links).
    – moewe
    Jul 21, 2019 at 13:10
  • thank you it worked perfectly fine! :)
    – user168390
    Jul 21, 2019 at 14:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .