3

I previously asked a question here and received a very useful reply which solved (most of) my dilemma. I have realised, however, that the bibliography is not printing when I use crossref in a 'master' entry in my .bib file. These 'master' or 'dummy' entries are used for those sources which would otherwise make duplicate bibliography entries simply due to their broad nature.

Below is my minimum working example showing two source citation entries - one which prints and one which does not - and the master source citation.

MWE:

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage{filecontents}
\begin{filecontents}{freeform.dbx}
\DeclareDatamodelEntrytypes{freeform}
\DeclareDatamodelFields[type=field,datatype=literal]{
  bibliography,
  cite,
  firstcite,
}
\DeclareDatamodelEntryfields[freeform]{
  bibliography,
  cite,
  firstcite,
  sortkey,
}
\end{filecontents}

\usepackage[style=verbose, backend=biber, datamodel=freeform]{biblatex}

\DeclareBibliographyDriver{freeform}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \printfield{bibliography}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \newunit\newblock
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \usebibmacro{finentry}}


\renewbibmacro*{cite:full}{%
  \ifentrytype{freeform}
    {\iffieldundef{firstcite}
       {\usebibmacro{cite:short}}
       {\printfield{firstcite}}}
    {\usebibmacro{cite:full:citepages}%
     \printtext[bibhypertarget]{%
       \usedriver
         {\DeclareNameAlias{sortname}{default}}
         {\thefield{entrytype}}}%
     \usebibmacro{shorthandintro}}}

\renewbibmacro*{cite:short}{%
  \ifentrytype{freeform}
    {\printfield{cite}}
    {\printnames{labelname}%
     \setunit*{\printdelim{nametitledelim}}%
     \printtext[bibhyperlink]{%
       \printfield[citetitle]{labeltitle}}}}

\DeclareSourcemap{
  \maps[datatype=bibtex,overwrite=false]{
    \map{
      \pertype{freeform}
      \step[fieldsource=bibliography]
      \step[fieldset=sortkey, origfieldval]
    }
  }
}

\begin{filecontents}{sample.bib}
@freeform{baptism,
  cite         = {Church of England (Spondon, Derbs.), Parish Registers, vol.\ 9, p.\ 1, Thompson (9 June 1824).},
  firstcite    = {Church of England (Spondon, Derbyshire, England), Parish Registers, vol.\ 9, p.\ 1, baptism of Emma Thompson (9 June 1824); digital images, Ancestry.com (\url{http://ancestry.com.au}: accessed 4 July 2018), citing Derbyshire Record Office, Matlock.},
  bibliography = {Church of England (Spondon, Derbyshire, England). Parish Registers. Digital images. \textit{Ancestry.com}. \url{http://ancestry.com.au}: 2018},
  keywords     = {church}
}
@freeform{marriage,
  cite         = {Church of England (Derby, Derbs.), Parish Registers, vol.\ 4, p.\ 3, Smith-Bloggs (20 January 1815).},
  firstcite    = {Church of England (Derby, Derbyshire, England), Parish Registers, vol.\ 4, p.\ 3, marriage of John Smith and Jane Bloggs (20 January 1815); digital images, Ancestry.com (\url{http://ancestry.com.au}: accessed 1 July 2018), citing Derbyshire Record Office, Matlock.},
  options      = {skipbib},
  crossref     = {coe:derb}
}
@freeform{coe:derb,
  bibliography = {Church of England (Derby, Derbyshire, England). Parish Registers. Digital images. Ancestry.com. \url{http://ancestry.com.au}: 2018},
  keywords     = {church}
}
\end{filecontents}

\addbibresource{sample.bib}


\begin{document}
Lorem\footcite{marriage} ipsum\footcite{baptism}
\printbibliography[keyword=church, title={Church Records}]
\end{document}

Output:

output

How do I get the 'master' source to print in my bibliography?

(I'm still a newbie, so please excuse any glaring errors or oversights!)

S. Bell
  • 95
  • What would be the expected output? The two 'master' files have explicit skipbib options that exclude them from being shown in the bibliography. In their stead you get to see the coe:derb entry. – moewe Jul 04 '18 at 12:54
  • @moewe The expected output is to see the coe:derb bibliography entry in addition to the other entry which has not specified skipbib. Instead I am only seeing that entry when I want to see it AND coe:derb. I should have two items in my bibliography, Church of England (Derby, Derbyshire, England)... and Church of England (Spondon, Derbyshire, England)... – S. Bell Jul 04 '18 at 12:56
  • Ah I see. Very odd indeed. Let me investigate... – moewe Jul 04 '18 at 13:02

1 Answers1

2

If you use crossref = {coe:derb} to refer to coe:derb from an entry, then coe:derb will only be added to the bibliography if it was crossref'd more often at least mincrossrefs times, where mincrossrefs is a biblatex option, whose value you can choose freely. The default value is mincrossrefs=2, that's why we got to see coe:derb in How to set up BibLaTeX for use with 'freeform' citations but not here.

The solution is simple: Load biblatex with the option mincrossrefs=1.

MWE

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage{filecontents}
\begin{filecontents}{freeform.dbx}
\DeclareDatamodelEntrytypes{freeform}
\DeclareDatamodelFields[type=field,datatype=literal]{
  bibliography,
  cite,
  firstcite,
}
\DeclareDatamodelEntryfields[freeform]{
  bibliography,
  cite,
  firstcite,
  sortkey,
}
\end{filecontents}

\usepackage[style=verbose, backend=biber, datamodel=freeform, mincrossrefs=1]{biblatex}

\DeclareBibliographyDriver{freeform}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \printfield{bibliography}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \newunit\newblock
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \usebibmacro{finentry}}


\renewbibmacro*{cite:full}{%
  \ifentrytype{freeform}
    {\iffieldundef{firstcite}
       {\usebibmacro{cite:short}}
       {\printfield{firstcite}}}
    {\usebibmacro{cite:full:citepages}%
     \printtext[bibhypertarget]{%
       \usedriver
         {\DeclareNameAlias{sortname}{default}}
         {\thefield{entrytype}}}%
     \usebibmacro{shorthandintro}}}

\renewbibmacro*{cite:short}{%
  \ifentrytype{freeform}
    {\printfield{cite}}
    {\printnames{labelname}%
     \setunit*{\printdelim{nametitledelim}}%
     \printtext[bibhyperlink]{%
       \printfield[citetitle]{labeltitle}}}}

\DeclareSourcemap{
  \maps[datatype=bibtex,overwrite=false]{
    \map{
      \pertype{freeform}
      \step[fieldsource=bibliography]
      \step[fieldset=sortkey, origfieldval]
    }
  }
}

\begin{filecontents}{sample.bib}
@freeform{baptism,
  cite         = {Church of England (Spondon, Derbs.), Parish Registers, vol.\ 9, p.\ 1, Thompson (9 June 1824).},
  firstcite    = {Church of England (Spondon, Derbyshire, England), Parish Registers, vol.\ 9, p.\ 1, baptism of Emma Thompson (9 June 1824); digital images, Ancestry.com (\url{http://ancestry.com.au}: accessed 4 July 2018), citing Derbyshire Record Office, Matlock.},
  bibliography = {Church of England (Spondon, Derbyshire, England). Parish Registers. Digital images. \textit{Ancestry.com}. \url{http://ancestry.com.au}: 2018},
  keywords     = {church}
}
@freeform{marriage,
  cite         = {Church of England (Derby, Derbs.), Parish Registers, vol.\ 4, p.\ 3, Smith-Bloggs (20 January 1815).},
  firstcite    = {Church of England (Derby, Derbyshire, England), Parish Registers, vol.\ 4, p.\ 3, marriage of John Smith and Jane Bloggs (20 January 1815); digital images, Ancestry.com (\url{http://ancestry.com.au}: accessed 1 July 2018), citing Derbyshire Record Office, Matlock.},
  options      = {skipbib},
  crossref     = {coe:derb}
}
@freeform{coe:derb,
  bibliography = {Church of England (Derby, Derbyshire, England). Parish Registers. Digital images. Ancestry.com. \url{http://ancestry.com.au}: 2018},
  keywords     = {church}
}
\end{filecontents}

\addbibresource{sample.bib}


\begin{document}
Lorem\footcite{marriage} ipsum\footcite{baptism}
\printbibliography[keyword=church, title={Church Records}]
\end{document}

enter image description here

moewe
  • 175,683
  • Thank you once again! I suppose I wouldn't have otherwise noticed the issue because eventually I will have all the crossrefs (i.e. more than 2) in place... alas! – S. Bell Jul 04 '18 at 14:00
  • @S.Bell Better we discover this quirk now, than not seeing it later in a large list of entries. I have edited the other answer to include the mincrossrefs=1 since that is essential for 'split entries'. – moewe Jul 04 '18 at 14:04