2

I'm working on a document which I submitted at university and now I have to change certain styles (mainly citations and the bibliography), which are set by the publisher where it will get published.

The given situation is as follows:
There are two kinds of bibliography entries:

  • sources, which are identified by the keyword primary in the corresponding bib entry, and
  • references, which are identified by the keyword secondary.

The different entries are within different bibliographies. The style change request should only affect the sources i.e. the entries with the keyword primary.

The request is basically, that the entries should start with the title and the editor should follow. Also the entries should be sorted by title.

The sorting by title I already achieved (see the MWE below). My current understanding is, that this request just affects the bib entries of type @book and @mvbook, since the other types which occur, already satisfy the criteria.
It may also be worth noting, that all the entries in the sources do not have an author.

Here is the MWE:

\documentclass{scrbook}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage{filecontents}
\begin{filecontents}{bibliography.bib}
    @book{adamofbremen_history_2002,
    title = {Adam of {{Bremen}}, {{History}} of the {{Archbishops}} of {{Hamburg-Bremen}}},
    editor = {Tschan, Francis J.},
    date = {2002},
    location = {{New York}},
    keywords = {2 PDF/Book,5: cited,primary}
    }

    @incollection{abbooffleury_passio_1972,
    title = {Abbo: Passio Sancti Eadmundi},
    booktitle = {Three Lives of English Saints},
    editor = {Winterbottom, Michael},
    date = {1972},
    pages = {67--87},
    location = {{Toronto}},
    langid = {latin},
    keywords = {2 PDF/Book,5: cited,primary}
    }

    @mvbook{friis-jensen_saxo_2014,
    title = {Saxo {{Grammaticus}}, {{Gesta Danorum}}. {{The History}} of the {{Danes}}},
    editor = {Friis-Jensen, Karsten},
    translator = {Fisher, Peter},
    date = {2014},
    series = {Oxford Medieval Texts},
    volume = {1},
    location = {{New York}},
    isbn = {978-0-19-820523-4},
    volumes = {2},
    keywords = {2 PDF/Book,5: cited,primary,Sources}
    }

    % secondary

    @book{adams_scandinavia_2004,
    title = {Scandinavia and {{Europe}} 800-1350: {{Contact}}, {{Conflict}}, and {{Coexistence}}},
    shorttitle = {Scandinavia and {{Europe}} 800 - 1350},
    editor = {Adams, Jonathan and Holman, Katherine},
    date = {2004},
    series = {Medieval Texts and Cultures of {{Northern Europe}}},
    number = {4},
    location = {{Turnhout}},
    isbn = {2-503-51085-X},
    pagetotal = {369},
    keywords = {1 get,2 PDF/Book,Context and Review,secondary}
    }
\end{filecontents}
\usepackage[backend=biber, style=ext-authortitle-ibid, isbn=false]{biblatex} % comment in when running reference analysis
\addbibresource{bibliography.bib}

\DeclareSortingScheme{byTitle}{
    \sort{\field{title}}
    \sort{\field{name}}
    \sort{\field{year}}
}

\renewbibmacro*{title+editor}{%
    \usebibmacro{title}%
    \newunit
    \printtext[parens]{\usebibmacro{byeditor+others}}%
    \clearname{editor}%
    \newunit
}

\begin{document}
    A primary source of type \emph{incollection}.\footnote{\cite{abbooffleury_passio_1972}.}

    A primary source of type \emph{book}.\footnote{\cite{adamofbremen_history_2002}.}

    A primary source of type \emph{mvbook}.\footnote{\cite{friis-jensen_saxo_2014}.}

    A secondary source.\footnote{\cite{adams_scandinavia_2004}.}

    \newrefcontext[sorting=byTitle]
    \printbibliography[keyword={primary}, title={Sources}, heading=subbibintoc]

    \newrefcontext[sorting=nyt]
    \printbibliography[keyword={secondary}, title={References}, heading=subbibintoc]
\end{document}

And this results in the following PDF:

enter image description here

The entry with type @incollection is basically what I need to achieve, without the "In:" before the title.

So for example the @book entry should then be:
Adam of Bremen, History of the Archbishops of Hamburg-Bremen. Ed. by Francis J. Tschan. New York, 2002.

PS: I already changed a lot of styles in the bibliography, which I left out to focus on the main task. But maybe those changes will negatively affect the result of given solutions, which I would then later mention and also edit my question.

2 Answers 2

2

You can set the per-entry option useeditor to false for the entries that shouldn't show the editor in primary name position.

\documentclass{scrbook}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage[backend=biber, style=ext-authortitle-ibid, isbn=false]{biblatex}

\DeclareSortingScheme{byTitle}{
  \sort{\field{title}}
  \sort{\field{name}}
  \sort{\field{year}}
}

\begin{filecontents}{\jobname.bib}
@book{adamofbremen_history_2002,
  title    = {Adam of {Bremen}, {History} of the {Archbishops} of {Hamburg-Bremen}},
  editor   = {Tschan, Francis J.},
  date     = {2002},
  location = {New York},
  keywords = {2 PDF/Book,5: cited,primary},
  options   = {useeditor=false},
}
@incollection{abbooffleury_passio_1972,
  title     = {Abbo: Passio Sancti Eadmundi},
  booktitle = {Three Lives of English Saints},
  editor    = {Winterbottom, Michael},
  date      = {1972},
  pages     = {67--87},
  location  = {Toronto},
  langid    = {latin},
  keywords  = {2 PDF/Book,5: cited,primary},
}
@mvbook{friis-jensen_saxo_2014,
  title      = {Saxo {Grammaticus}, {Gesta Danorum}. {The History} of the {Danes}},
  editor     = {Friis-Jensen, Karsten},
  translator = {Fisher, Peter},
  date       = {2014},
  series     = {Oxford Medieval Texts},
  volume     = {1},
  location   = {New York},
  isbn       = {978-0-19-820523-4},
  volumes    = {2},
  keywords   = {2 PDF/Book,5: cited,primary,Sources},
  options    = {useeditor=false},
}
% secondary
@book{adams_scandinavia_2004,
  title      = {Scandinavia and {Europe} 800-1350: {Contact}, {Conflict}, and {Coexistence}},
  shorttitle = {Scandinavia and {Europe} 800 - 1350},
  editor     = {Adams, Jonathan and Holman, Katherine},
  date       = {2004},
  series     = {Medieval Texts and Cultures of {Northern Europe}},
  number     = {4},
  location   = {Turnhout},
  isbn       = {2-503-51085-X},
  pagetotal  = {369},
  keywords   = {1 get,2 PDF/Book,Context and Review,secondary}
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
  A primary source of type \emph{incollection}.\footnote{\cite{abbooffleury_passio_1972}.}

  A primary source of type \emph{book}.\footnote{\cite{adamofbremen_history_2002}.}

  A primary source of type \emph{mvbook}.\footnote{\cite{friis-jensen_saxo_2014}.}

  A secondary source.\footnote{\cite{adams_scandinavia_2004}.}

  \newrefcontext[sorting=byTitle]
  \printbibliography[keyword={primary}, title={Sources}, heading=subbibintoc]

  \newrefcontext[sorting=nyt]
  \printbibliography[keyword={secondary}, title={References}, heading=subbibintoc]
\end{document}

“Abbo: Passio Sancti Eadmundi”. In: Three Lives of English Saints. Ed. by Michael Winterbottom. Toronto, 1972, pp. 67–87.
Adam of Bremen, History of the Archbishops of Hamburg-Bremen. Ed. by Francis J. Tschan. New York, 2002.
Saxo Grammaticus, Gesta Danorum. The History of the Danes. Ed. by Karsten Friis-Jensen. Trans. by Peter Fisher. Vol. 1. 2 vols. Oxford Medieval Texts. New York, 2014.

You could also set this option on a per-type basis, but then you need to make sure to use the correct entry type @collection for works like adams_scandinavia_2004.

\documentclass{scrbook}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage[backend=biber, style=ext-authortitle-ibid, isbn=false]{biblatex}

\DeclareSortingScheme{byTitle}{
  \sort{\field{title}}
  \sort{\field{name}}
  \sort{\field{year}}
}

\ExecuteBibliographyOptions[book,mvbook]{useeditor=false}

\begin{filecontents}{\jobname.bib}
@book{adamofbremen_history_2002,
  title    = {Adam of {Bremen}, {History} of the {Archbishops} of {Hamburg-Bremen}},
  editor   = {Tschan, Francis J.},
  date     = {2002},
  location = {New York},
  keywords = {2 PDF/Book,5: cited,primary},
}
@incollection{abbooffleury_passio_1972,
  title     = {Abbo: Passio Sancti Eadmundi},
  booktitle = {Three Lives of English Saints},
  editor    = {Winterbottom, Michael},
  date      = {1972},
  pages     = {67--87},
  location  = {Toronto},
  langid    = {latin},
  keywords  = {2 PDF/Book,5: cited,primary},
}
@mvbook{friis-jensen_saxo_2014,
  title      = {Saxo {Grammaticus}, {Gesta Danorum}. {The History} of the {Danes}},
  editor     = {Friis-Jensen, Karsten},
  translator = {Fisher, Peter},
  date       = {2014},
  series     = {Oxford Medieval Texts},
  volume     = {1},
  location   = {New York},
  isbn       = {978-0-19-820523-4},
  volumes    = {2},
  keywords   = {2 PDF/Book,5: cited,primary,Sources},
}
% secondary
@collection{adams_scandinavia_2004,
  title      = {Scandinavia and {Europe} 800--1350},
  subtitle   = {Contact, Conflict, and Coexistence},
  editor     = {Adams, Jonathan and Holman, Katherine},
  date       = {2004},
  series     = {Medieval Texts and Cultures of {Northern Europe}},
  number     = {4},
  location   = {Turnhout},
  isbn       = {2-503-51085-X},
  pagetotal  = {369},
  keywords   = {1 get,2 PDF/Book,Context and Review,secondary}
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
  A primary source of type \emph{incollection}.\footnote{\cite{abbooffleury_passio_1972}.}

  A primary source of type \emph{book}.\footnote{\cite{adamofbremen_history_2002}.}

  A primary source of type \emph{mvbook}.\footnote{\cite{friis-jensen_saxo_2014}.}

  A secondary source.\footnote{\cite{adams_scandinavia_2004}.}

  \newrefcontext[sorting=byTitle]
  \printbibliography[keyword={primary}, title={Sources}, heading=subbibintoc]

  \newrefcontext[sorting=nyt]
  \printbibliography[keyword={secondary}, title={References}, heading=subbibintoc]
\end{document}
0
0

Based on the solution provided by @moewe I conditionally added the option useeditor=false in the following way within the .tex file:

\DeclareSourcemap{
    \maps[datatype = bibtex]{
        \map{
            % select only entries with a keyword `primary`
            \step[fieldsource = keywords, match = \regexp{\bprimary\b}, final]
            % Restricts all \steps to type `book` and `mvbook`
            \pertype{book}
            \pertype{mvbook}
            % add a key `options` to the bib entry with the value `useeditor=false`
            \step[fieldset=options, fieldvalue={useeditor=false}]
        }
    }
}

I did this, so that the datasource of the bibliography (which comes from an external tool) has no information about the formatting of the entries, since the datasource is used for multiple branches for different publications with different formatting.

You must log in to answer this question.

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