4

I am writing a genealogical document and am working on the bibliography.

Some of the sources I have used are encapsulated inside "bundles". An example:

Name of jurisdiction, box no. 2 containing cases 100 to 199, stored at National Archive, containing:

  • case no. 123, containing:
    • copy of interrogation transcript, dated so & so
    • statement from John Doe, dated etc
    • birth certificate of Jane Doe, dated & attested by pastor Name
    • police report, dated & signed etc.
    • other items, etc
  • case no. 124, containing:
    • other documents

Are there any biblatex styles or similar for such sources? I would prefer to keep each sub-source inside the "super-source" but still be able to cite each of them separately.


Update: As per comments below, I have created a custom entry type that has among other things a "contains" field:

\DeclareDatamodelFields[type=list, datatype=literal]{
    contains}

I can then populate that in my .bib file with contains = {ITEM1 and ITEM2}. However, I'd prefer to use comma-separated lists. As far as I can tell, this is done with [type=field, format=xsv] but using that causes biber to exit right after Found BibTeX data source without writing a .bbl file.

I've tried googling for working example, but no luck...


Update: Smallest working example I could make:

\documentclass{article}

\usepackage{filecontents}
\usepackage{csquotes}

\begin{filecontents}{\jobname.bib}
@archivalsource{Test,
    title = {Test Source},
    contains = {ITEM1 and ITEM2}}

@archivalitem{ITEM1,
    title = {Transcript},
    author = {J. Doe}}

@archivalitem{ITEM2,
    title = {Report},
    author = {J. Moe}}
\end{filecontents}

\begin{filecontents}{archival.dbx}
\DeclareDatamodelFields[type=list, datatype=literal]{
    contains}
\DeclareDatamodelEntryfields[archivalsource]{
    title,
    contains}
\DeclareDatamodelEntryfields[archivalitem]{
    author,
    title}
\end{filecontents}

\usepackage[datamodel=archival, backend=biber]{biblatex}

\addbibresource{\jobname.bib}

\DeclareBibliographyDriver{archivalitem}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \printnames{author} - %
  \printfield{title}%
  \usebibmacro{finentry}}

\DeclareListFormat{contains}{
  \item \entrydata{#1}{\usedriver{}{\thefield{entrytype}}}
}

\DeclareBibliographyDriver{archivalsource}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \printfield{title}. %
  \printtext{Contains:}%
  \begin{enumerate}%
  \printlist{contains}%
  \end{enumerate}%
  \iflistundef{contains}{\finentry}{}}

\begin{document}

Blah blah.\cite{Test}

\nocite{ITEM1, ITEM2} % otherwise they won't show up
\printbibliography[type=archivalsource]

\end{document}
8
  • Either you cobble something together with @unpublished (if you have only very few of those) or you try and roll your own entry type, a start might be the type @archive from Need help configuring entry type driver for biblatex-dw. Different citation style sa for different entry types.
    – moewe
    Jan 11, 2016 at 7:42
  • Thanks @moewe, that looks helpful. I'm thinking of an entry type something like: @archivalsource{NAME, Archive = {National archive}, Creator = {Jurisdiction}, Series = {Cases 1851–1959}, Packet = {2 (nos. 100-199)}, Number = {123}, Date = {1902-05-31/1902-06-03}, Title = {Copy of interrogation transcript}, Signed = {Officer Jackson} } for each sub-item, then try and collate them based on Archive/Creator/Series/Packet/Number when generating the bibliography
    – meide
    Jan 11, 2016 at 8:36
  • You probably have to roll up your own driver for that. If you want to cite both cases together, you can use the related field for that, it will allow you to nest them.
    – ienissei
    Jan 11, 2016 at 8:38
  • I got the basic skeleton working with a custom driver & entry types; currently I use contains = {ITEM1 and ITEM2} in the .bib file which is declared as \DeclareDatamodelFields[type=list, datatype=literal]{contains} in the .dbx file. However, I'd prefer to use comma-separated lists, but using format=xsv just stalls biber when running... Is there a working example somewhere I can compare to? Google wasn't helpful
    – meide
    Jan 11, 2016 at 17:39
  • It really would be helpful if you provided one than one line of code to go along with this question. It sounds like you have everything working except for one small problem. It would be easiest for others if they also had the exact same code that almost works.
    – jon
    Jan 11, 2016 at 18:39

1 Answer 1

4

Alright I got it working with the help in the comments. The code below renders as:

Example

\documentclass{article}

\usepackage{filecontents}
\usepackage{csquotes}

\begin{filecontents}{\jobname.bib}
@archivalsource{Test,
    title = {Test Source},
    contains = {ITEM1, ITEM2}}

@archivalitem{ITEM1,
    title = {Transcript},
    author = {J. Doe}}

@archivalitem{ITEM2,
    title = {Report},
    author = {J. Moe}}
\end{filecontents}

\begin{filecontents}{archival.dbx}
\DeclareDatamodelFields[type=field, format=xsv, datatype=entrykey]{
    contains}
\DeclareDatamodelEntryfields[archivalsource]{
    title,
    contains}
\DeclareDatamodelEntryfields[archivalitem]{
    author,
    title}
\end{filecontents}

\usepackage[datamodel=archival, backend=biber]{biblatex}

\addbibresource{\jobname.bib}

\DeclareBibliographyDriver{archivalitem}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \printnames{author} - %
  \printfield{title}%
  \usebibmacro{finentry}}

\newcommand{\entry}[1]{
    \item \entrydata{#1}{\usedriver{}{\thefield{entrytype}}}\adddot 
}

\DeclareFieldFormat{contains}{
  \printtext{Contains:}%
  \begin{enumerate}%
    \forcsvfield{\entry}{contains}
  \end{enumerate}%
}

\DeclareBibliographyDriver{archivalsource}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \printfield{title}. %
  \printfield{contains}%
  \iflistundef{contains}{\finentry}{}}

\begin{document}

Blah blah.\cite{Test}

\nocite{ITEM1, ITEM2} % otherwise they won't show up
\printbibliography[type=archivalsource]

\end{document}
2
  • 1
    Note that instead of putting a literal . after \printfield{title} you should use \printfield{title}\setunit{\addperiod\space}%. The same goes for \printnames{author} - % which should probably be \printnames{author}\setunit{\addspace\textemdash\space}% (or ``\textendash`) or something along those lines.
    – moewe
    Jan 12, 2016 at 15:10
  • Good call. I was actually just now working on making it more idiomatic :)
    – meide
    Jan 12, 2016 at 15:12

You must log in to answer this question.

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