0

I am using biblatex with biber as backend. For displaying a text after the title field, there is the titleaddon field. Is there also an equivalent for the publisher field, which can be used to display a text after the publisher name? If not, is it possible to define a custom field? I would also need such an additional field for after the journal field in articles (not italic) and the school field for phd theses.

I use the Chicago citation style. Here an MWE:

\documentclass[12pt]{article}

\usepackage{csquotes}
\usepackage{polyglossia}
\usepackage[notes,natbib,isbn=false,backend=biber]{biblatex-chicago}  

\setdefaultlanguage{english}
\nocite{*}
\addbibresource{samplebib.bib}

\begin{document}
\printbibliography
\end{document}

And the samplebib.bib file:

@article{smith1999,
    author = {Peter Smith},
    title = {Article Title},
    year = {1999},
    journal = {Journal Title ADDENDUM NOT ITALIC},
    volume = {5},
    number = {4},
    pages = {119 - 145}
}

@book{smith2000,
    author = {Peter Smith},
    title = {Book Title},
    year = {2011},
    volumes = {2},
    address = {New York},
    publisher = {Publisher PUBLISHER ADDENDUM}
}

@phdthesis{smith1995,
    author = {Peter Smith},
    title = {PhD Title},
    year = {1995},
    school = {School SCHOOL ADDENDUM}
}

Thank you very much!

2
  • 3
    Can you show us which style you use and what you have so far? See MWE/MWEB. A solution will heavily depend on your setup. May I ask what you need the text for? Could you be OK with note or addendum (or location)?
    – moewe
    Jun 23, 2017 at 15:17
  • @moewe I updated the question. I also tried note, addendum and location, but they do not lead to the desired result.
    – Rolch2015
    Jun 23, 2017 at 15:46

1 Answer 1

3

Normally this would be as easy as creating a new .dbx, declaring the new fields there, loading it and then using the new fields in the respective macros. See Add field “tome” to biblatex entries.

With biblatex-chicago the number of macros to modify can be quite large, and the macros may contain quite a lot of lines.

Furthermore, biblatex-chicago does not allow for the datamodel option. This complicates things. We need to copy what the wrapper package biblatex-chicago.sty does in the preamble.

MWE

\documentclass[12pt]{article}
\usepackage{csquotes}
\usepackage{polyglossia}

\usepackage{filecontents}
\begin{filecontents*}{addons.dbx}
\DeclareDatamodelFields[type=field, datatype=literal]{
  journaltitleaddon,
  publisheraddon,
  institutionaddon}
\DeclareDatamodelEntryfields{
  journaltitleaddon,
  publisheraddon,
  institutionaddon}
\end{filecontents*}

\usepackage[style=chicago-notes,natbib,isbn=false,backend=biber,datamodel=addons]{biblatex}
  \ExecuteBibliographyOptions{%
    pagetracker=true,autocite=footnote,abbreviate=false,alldates=comp,
    citetracker=true,ibidtracker=constrict,usetranslator=true,
    usenamec=true,loccittracker=constrict,dateabbrev=false,
    maxbibnames=10,minbibnames=7,sorting=cms,sortcase=false}

\makeatletter
\newtoggle{cms@nomark}

\setlength{\bibitemsep}{0.5\baselineskip plus 0.5\baselineskip}
\setlength{\bibhang}{2em}
\setlength{\lositemsep}{0.25\baselineskip plus 0.25\baselineskip}

\setcounter{biburllcpenalty}{5000}
\setcounter{biburlucpenalty}{9000}
\setcounter{biburlnumpenalty}{9000}

\renewcommand*{\bibnamedash}{\rule[.4ex]{3em}{.6pt}}

\iftoggle{cms@nomark}
{}
{\@ifclassloaded{memoir}%
  {\blx@warning@noline{%
      Since you are using the 'memoir' class,\MessageBreak
      I'm leaving the formatting of the foot- and/or\MessageBreak
      end-note mark and text to you.}}%
  {\renewcommand\@makefntext[1]{% Provides in-line footnote marks
      \setlength\parindent{1em}%
      \noindent
      \makebox[2.3em][r]{\@thefnmark.\,\,}#1}
    \@ifpackageloaded{endnotes}% Provides in-line endnote marks
    {\def\enotesize{\small}% This size recommended by the Manual
      \renewcommand{\enoteformat}{%
        \renewcommand{\makeenmark}{%
          \hbox{\theenmark.\,\,}}
        \rightskip\z@ \leftskip\z@ \parindent=2.3em
        \leavevmode\llap{\makeenmark}}}
    {}}}

\@ifpackageloaded{babel}
{\ifthenelse{\equal{\languagename}{american}}
  {\DeclareLanguageMapping{american}{cms-american}}%
  {\ifthenelse{\equal{\languagename}{english}}%
    {\DeclareLanguageMapping{english}{cms-american}}%
    {\DeclareLanguageMapping{american}{cms-american}}}}%
{\DeclareLanguageMapping{english}{cms-american}}

\DeclareLanguageMapping{british}{cms-british}
\DeclareLanguageMapping{german}{cms-german}
\DeclareLanguageMapping{french}{cms-french}
\DeclareLanguageMapping{finnish}{cms-finnish}
\DeclareLanguageMapping{ngerman}{cms-ngerman}
\DeclareLanguageMapping{icelandic}{cms-icelandic}
\DeclareLanguageMapping{norsk}{cms-norsk}
\DeclareLanguageMapping{nynorsk}{cms-nynorsk}
\DeclareLanguageMapping{swedish}{cms-swedish}

\ifundef\bbl@loaded{\let\bbl@loaded\@empty}{}% For old versions of babel
\makeatother

\setdefaultlanguage{english}
\nocite{*}



\begin{filecontents}{\jobname.bib}
@article{smith1999,
    author = {Peter Smith},
    title = {Article Title},
    year = {1999},
    journal = {Journal Title},
    journaltitleaddon = {ADDENDUM NOT ITALIC},
    volume = {5},
    number = {4},
    pages = {119 - 145}
}

@book{smith2000,
    author = {Peter Smith},
    title = {Book Title},
    year = {2011},
    volumes = {2},
    address = {New York},
    publisher = {Publisher},
    publisheraddon = {PUBLISHER ADDENDUM},
}

@phdthesis{smith1995,
    author = {Peter Smith},
    title = {PhD Title},
    year = {1995},
    school = {School},
    institutionaddon = {SCHOOL ADDENDUM},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\makeatletter
\renewbibmacro*{journal+sub}{%
  \iffieldundef{journaltitle}%
    {}%
    {\ifboolexpr{%
        not test {\iffieldundef{shortjournal}}%
        and
        ((
        test {\ifcitation}%
        and
        togl {cms@citejtabb}%
        )
        or
        (
        test {\ifbibliography}%
        and
        togl {cms@bibjtabb}%
        ))
      }%
      {\clearlist{location}\printtext[shortjournal]{%
          \printfield[jtsnoformat]{shortjournal}}}%
      {\printtext[journaltitle]{%
          \printfield[jtnoformat]{journaltitle}%
          \setunit{\addcolon\addspace}%
          \printfield[sjtnoformat]{journalsubtitle}}}%
     \setunit{\addcomma\addspace}%
     \printfield{journaltitleaddon}}}%

\renewbibmacro*{publ+loc+year}{% Revised for reprint
  \ifboolexpr{%
    togl {cms@reprint}%
    and
    not test {\ifentrytype{video}}%
  }%
  {\bibstring{reprint}%
    \newcunit}%
  {}%
  \printlist{location}%
  \iflistundef{publisher}%
    {\setunit*{\addcomma\addspace}}%
    {\setunit*{\addcolon\addspace}}%
  \printlist{publisher}%
  \setunit*{\addcomma\addspace}%
  \printfield{publisheraddon}%
  \setunit*{\addcomma\addspace}%
  \usebibmacro{date}%
}

\renewbibmacro*{type+inst+year}{%
  \printfield{type}%
  \newcunit
  \printlist{institution}%
  \setunit*{\addcomma\addspace}%
  \printfield{institutionaddon}%
  \setunit*{\addcomma\addspace}%
  \usebibmacro{cmsyear}}
\makeatother

\begin{document}
\printbibliography
\end{document}

enter image description here

5
  • Thank you very much @moewe, it looks very complicated but works like a charm! Thank you also for your insightful comment.
    – Rolch2015
    Jun 23, 2017 at 20:32
  • @Rolch2015 Yes, unfortunately, things escalated quickly. With one of the standard styles, we'd only need the .dbx file and we would have to modify a few macros. That could be done in 20-30 lines, and things would not look very complicated and would be pretty self-explanatory. Unfortunately biblatex-chicago needs a lot of code to properly implement the more complicate CMS rules, so sometimes if we have to modify stuff we can end up with lots more lines than in the standard styles. ...
    – moewe
    Jun 23, 2017 at 20:43
  • ... Another major headache was biblatex-chicago's wrapper package that for technical reasons doesn't support the datamodel option. So we had to copy basically the entire .sty to the preamble. The message is: Try to avoid having to modify heavily customised styles such as biblatex-chicago, biblatex-apa. They are purpose-built to follow one specific set of guidelines, any deviation from that can be very complicated to achieve even if it seems very simple (or is simple to achieve with the standard styles).
    – moewe
    Jun 23, 2017 at 20:45
  • I switched my OS to Ubuntu and suddenly the error message "Package etoolbox Error: Invalid boolean expression." popped up multiple times. I successfully narrowed the error down to the snippet ( test {\ifcitation}% and togl {cms@citejtabb}% ) or ( test {\ifbibliography}% and togl {cms@bibjtabb}% ) and solved it by wrapping both togl operators within atest{} operator. Maybe there were some changes in the etoolbox package or the package differs in Windows and Ubuntu @moewe.
    – Rolch2015
    Jul 15, 2017 at 20:37
  • @Rolch2015 Just checked the exact code of the MWE, I can run it without errors or warnings with an up-to-date system. The modification you did should actually not be necessary and could (I'm not sure) change the logic of the expression (to the point that things become useless). There should be no difference between the packages on Linux or Windows, but it could be a problem if your packages are outdated. The TeX live that ships in the Ubuntu repositories is often a bit behind. Please check the versions of the packages involved on your Ubuntu machine.
    – moewe
    Jul 16, 2017 at 16:35

You must log in to answer this question.

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