I need some help rewriting a bibliography driver. But lets start from the beginning:
I'm using biblatex
with the biblatex-dw
style. In the footnotes my cites appear as name
shorttitle
and page
Additionally to the usual literature i work with a lot of unpublished material from archives. My problem is the organization of these sources.
They do not have a name at all, but are handled alone by their signature. There is always the name of the archive, the category, the subcategory and the box number:
For example: Archiv Newtown
Dep 1
Ru 4
354
(No commata between the single parts)
So everytime such a unpublished source is used, the full signature has to appear in the footnote. And of course in the bibliography the sources should be in the right alphanumerical order.
Another point is, that in the citations within the text the Ibid.
function should work. I mean if use the same source two times in a row it should give out Ibid.
What i do not need is Ibid.
within the signature (If e.g. the category, subcategory or box changes).
So within the text it should look like
--------------------------------------------
1 ArchNew Ho1 Ru8 356.
2 Mueller 1994, p. 18.
3 ArchNew Ho1 Ru8 356.
4 Ibid.
5 ArchNew FAS Ru7 321
and in the bibliography
**Literature**
Mueller, Claus: Something. Berlin 1994
**Sources**
*Archive Newtown*
ArchNew Ho1 Ru8 356
ArchNew FAS Ru7 321
I found a thread with nearly the same problem and a solution here, but I I' afraid I couldn't rewrite the code over there to match my needs.
The difference is that in this solution over there, the sources also have names and are therefore handled both by their name AND their signature. I only need the signature.
Additionally i also need another subcategory since my signatures are longer. Maybe i could use the now free name field for this purpose?
Could anybody help me out here? I'd be really, really grateful.
The code i need to alter looks like this:
\documentclass{article}
\usepackage[ngerman]{babel}
\usepackage{xpatch}
\usepackage[
style=authortitle-dw,
firstfull=true
]{biblatex}
\DefineBibliographyStrings{ngerman}{
chapter = {Bd.}
}
\renewbibmacro*{cite}{%
\usebibmacro{cite:citepages}%
\global\boolfalse{cbx:loccit}%
\ifentrytype{unpublished}%
{\ifthenelse{\ifciteibid\and\not\iffirstonpage}%
{\usebibmacro{cite:ibid}}{\usebibmacro{cite:firstfull}}}%
{\ifbool{cbx:firstfull}%
{\ifciteseen%
{\usebibmacro{cite:normal}}
{\usebibmacro{cite:firstfull}}}
{\usebibmacro{cite:normal}}}%
\usebibmacro{savestuff}%
}
\newbibmacro{savestuff}{%
\savelist{institution}{\lastinstitution}%
\savelist{location}{\lastlocation}%
\savefield{chapter}{\lastchapter}}
\xapptobibmacro{finentry}{\usebibmacro{savestuff}}{}{}
\DeclareBibliographyDriver{unpublished}{%
\iffirstonpage{\def\lastinstitution{}%
\def\lastlocation{}%
\def\lastchapter{}}{}%
\usebibmacro{bibindex}%
\usebibmacro{begentry}%
\usebibmacro{title}%
\newunit
\usebibmacro{in:}%
\iflistequals{institution}{\lastinstitution}%
{\bibstring{ibidem}%
\newunit\newblock%
\iflistequals{location}{\lastlocation}%
{\iffieldequals{chapter}{\lastchapter}%
{}{\printfield{chapter}}}%
{\printlist{location}\newunit\newblock%
\iffieldequals{chapter}{\lastchapter}%
{\bibstring{ibidem}}%
{\printfield{chapter}}}%
}%
{\printlist{institution}\newunit\newblock%
\iflistequals{location}{\lastlocation}%
{\bibstring{ibidem}\newunit\newblock%
\iffieldequals{chapter}{\lastchapter}%
{}{\printfield{chapter}}}%
{\printlist{location}\newunit\newblock%
\iffieldequals{chapter}{\lastchapter}%
{\bibstring{ibidem}}%
{\printfield{chapter}}}%
}%
\newunit\newblock%
\setunit{\bibpagerefpunct}\newblock
\usebibmacro{pageref}%
\usebibmacro{finentry}}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@unpublished {test1,
title = {subcategory},
institution = {Archive 1},
location = {Category 1,
chapter = {Box1}
}
@unpublished {test2,
title = {subcategory},
institution = {Archive 1},
location = {Category 1},
chapter = {Box2}
}
@unpublished {test3,
title = {subcategory},
institution = {Archive 1,
location = {Category 2},
chapter = {Box2}
}
@article{test4,
title={Something},
author={Mueller, Claus}
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\footcite{test1}
\footcite{test1}
\footcite{test4}
\footcite{test1}
\footcite{test2}
\footcite{test3}
\footcite{test1}
\footcite{test4}
\clearpage
\footcite{test1}
\printbibliography
\end{document}
@archive
that can takearchivename
,category
,subcategory
andboxnumber
as fields (and allow for short versions of these fields if necessary). Theibid
part should be straightforward.chapter = {Bd.}
looks pretty fishy to me. Why do you need that?