biblatex-chicago 历史档案的 bib 条目和引文

biblatex-chicago 历史档案的 bib 条目和引文

我正在编写一本贡献章节的书,其中有些章节严重依赖档案记录的参考,例如国会连续出版物、博物馆档案中收藏的十九世纪铁器公司记录集以及华盛顿特区国家档案与记录管理局的资料。

该书要求使用作者-日期内联引用,每章都有自己的参考书目,因此我使用\usepackage[authordate,backend=biber]{biblatex-chicago}

内联引用(出现在作者手稿中)包括以下内容

(军械部合同,1812 年 9 月 27 日,华盛顿特区国家档案与记录管理局 [NARA],记录组 [RG] 156/条目 78/第 1 卷,第 5 页)

(威廉·西蒙兹写给汤森的信,1813 年 3 月 1 日,纽约州立图书馆手稿和特别收藏,奥尔巴尼 [NYSL, MSC],斯特林铁和铁路公司记录,1740-1918 [SIRC],SC14069,盒 1,页 1-2,编号 5)

(德西乌斯·沃兹沃斯写给汤森的信,1814 年 3 月 21 日 [SIRC,第 6 号])

(汤森致卡尔纳尔·欧文将军的信,1814 年 8 月 14 日,NARA,RG 156/E21/[框 5])。

斯特林福吉公司日记账(SIRC 6/612)

(W. 琼斯写给汤森的信,1814 年 10 月 17 日 [SIRC,第 7 号])

(众议院日记,第 16 届国会,第 1 届会议:236)

以及书目条目,例如:

战争部长(1819 年)。战争部长的信函,转交了 1818 年军需品总署、军械部、采购总署和工程部签订的合同声明,1819 年 2 月 24 日,第 15 届国会,第 2 届会议。[国会连续出版物 24 H.doc.148]。

引文针对的是档案馆藏中的各种文件和记录,以及此类历史研究的共同主要文献。不过,这不是我经常使用的引文类型。它们似乎遵循了芝加哥 16 风格,但我不知道如何将它们设置为.bib条目biblatex

例如,上文中的“西蒙兹致汤森”信件是一封日期为 1813 年 3 月 1 日的原始信件,该信件收录于纽约州奥尔巴尼纽约州立图书馆手稿和特藏馆的档案文件集(斯特林铁和铁路公司记录,1740-1918 年)。目录参考为“SC14069,盒子 1,文件夹 1-2)”,该信件是该收藏中的文档 #5。

另外还有 43 处材料引用之内该档案馆藏。每份单独的文件是否应出现在参考书目中,还是只出现在档案馆本身,并在文内引用中使用前置和后置来获取特定文件信息,例如,

\autocite[Decius Wadsworth to Townsend, letter, 21 March 1814][no. 6]{SIRC}

更令人困惑的是(至少对我来说),作者在参考书目中单独包含了一些档案材料(例如,“国会连续出版物”中的任何内容),但不一定是 NARA 记录组中的内容?

我认为对每个被引用的项目@MVCollection添加附加@Collection条目是可行的方法,但我找不到很多针对这些特定类型材料的 biblatex 样式示例。我可以使用@Misc,但无法将它们全部交叉引用到集合中。

所以,我的问题有两个:

  1. 关于根据芝加哥 16 条正确引用,档案文件的最佳做法是什么?
  2. 关于biblatex-chicago,什么是适合于结构化的条目类型和字段.bib

有人能推荐一下这些类型的材料的当前做法吗,或者至少推荐一个.bib我可以用作模板的条目示例来源吗?文档biblatex-chicago或示例补充中cms-dates-intro.pdf似乎没有任何内容与之匹配。

答案1

在我本人、章节作者和各位同事之间反复讨论之后,似乎这个问题确实没有合理的答案,即使是历史学家也是如此。部分问题在于,这些主要文献引文(例如档案馆藏、手稿等)根本不适合内联引文格式。

由于内联是出版商的要求,我们达成的妥协是,特定的文档检索信息(标识符、文档编号、文件框等)应该与内联引用一起出现,并且收藏是应该出现在所引用的参考书目/参考文献中的内容。

实现此目的的唯一好方法是使用@misc如下条目:

@misc{SIRC,
    author = {{Sterling Iron and Railway Company}},
    title = {Records, 1740-1918},
    shorthand = {SIRC},
    type = {SC14069, box 1, fol.1-2},
    institution = {New York State Library},
    organization = {Manuscripts and Special Collections},
    location = {Albany}
    }

正文如下:

\autocite[Decius Wadsworth to Townsend, letter, 21 March 1814][no. 6]{SIRC}

不幸的是,这确实导致LaTeX已发布的文档中的文字非常丑陋且非常脱节......

...这就是为什么它通常通过注释样式的引用而不是内联引用来完成。

所以,基本上,是的 - 可以做到,不是 - 做得不漂亮,而且 - 确实没有任何好的标准。找到一个好的折衷方案,并坚持最终保持一致。

答案2

使用自由格式文本字段的层次结构:

example

code


Biblatex 通用案例示例 - 数据驱动的解决方案

使用自定义自由格式的文本字段来保存数据,然后:

由于档案是分层结构,因此可以通过遍历该层次结构来定位档案中的项目(非常类似于地址)。

例如这是自上而下的

@archive{test1,
    level1 = {Museum of All Things},
    level2 = {Historical Collections Department},
    level3 = {Station Records 1790-1820},
    level4 = {cat AB 123/486},
    level5 = {box 2},
    level6 = {folders 4-5},
    level7 = {document 12},
...
}

可以为该项目指定一个描述(功能类似于名称)。

例如,在这里,就说:什么、谁和何时

@archive{test1,
...
  itemattr1 = {test1Letter},
  itemattr2 = {from Simon to the Pieman},
  itemattr3 = {15 February 1790},
...
}

而且,我们可以使用更方便的简短版本,而不必重复较长的位置。

例如

@archive{test1,
...
  shortarchive = {Pieman Letter},
}

这样,只要数据模型(通过文件)知道了 bib 条目类型和相关字段.dbx,就可以生成合适的引用命令(有多种形式),并使用字母地址措辞:

  • 姓名 + 自上而下的地址

  • 姓名 + 自下而上的地址

  • 自上而下的地址 + 名称

  • 自下而上的地址 + 名称

flavours

为了方便起见,“姓名”和“地址”可以分别检索:

location

同样,组件:

components


可以通过将层次结构一分为二来建立父子关系(例如,一个盒子和盒子的内容之间),

然后在父级related字段中列出子级条目

@archive{box2,
   title={All About Pies},
    level1 = {Museum of All Things},
    level2 = {Historical Collections Department},
    level3 = {Station Records 1790-1820},
    level4 = {cat AB 123/486},
    level5 = {box 2},
  related     = {box2a,box2b,box2c},
  relatedtype = {archive},
...
}

xref=并在孩子的字段中列出孩子的父母

@archive{box2a,
  level6 = {folders 1-2},
  itemattr1 = {Correspondence in Frensshe},
  xref = {box2},
...
  }

refs

父级中的relatedtype = {archive},是新的,指向一个小的自定义宏\newbibmacro*{related:archive}

代码如何工作

主引用命令和参考书目驱动程序都运行(相同的)一系列宏,最终printfield{...}对每个存档字段执行操作并添加一些基本标点符号。

然后,参考书目驱动程序遍历所有相关(=子)条目,添加--、清除标点缓冲区\printfield并按顺序进行。ext-authoryear使用 Biblatex 样式是因为它可以方便地在子条目的正确位置使用换行符作为分隔符。(相比之下,该oxnotes样式以分号分隔相关条目,适用于小集合,例如 <4-5 个相关项目。)

要使同一档案项目既是子条目又是独立条目,需要在此模型中复制 bib 数据。(请参阅test1ffdoc12。)

此处子级别的格式化仅用于演示。

微波束

% arara: lualatex
% arara: biber
% arara: lualatex
% arara: lualatex


\begin{filecontents}[overwrite]{archive.bib}

@archive{folders45,
   title={The Pieman Letters},
   sorttitle={Pieman Letters},
    level1 = {Museum of All Things},
    level2 = {Historical Collections Department},
    level3 = {Station Records 1790-1820},
    level4 = {cat AB 123/486},
    level5 = {box 2},
    level6 = {folders 4-5},
  related = {ffdoc1,ffdoc2, ffdoc3, ffdoc4, ffdoc12},
  relatedtype = {archive},
  keywords = {mv},
}


@archive{box2,
   title={All About Pies},
    level1 = {Museum of All Things},
    level2 = {Historical Collections Department},
    level3 = {Station Records 1790-1820},
    level4 = {cat AB 123/486},
    level5 = {box 2},
  related     = {box2a,box2b,box2c},
  relatedtype = {archive},
  keywords = {mv},
}





@archive{test1,
    level1 = {Museum of All Things},
    level2 = {Historical Collections Department},
    level3 = {Station Records 1790-1820},
    level4 = {cat AB 123/486},
    level5 = {box 2},
    level6 = {folders 4-5},
    level7 = {document 12},
  itemattr1 = {test1Letter},
  itemattr2 = {from Simon to the Pieman},
  itemattr3 = {15 February 1790},
  shortarchive  ={Pieman Letter},
}


    @archive{box2a,
    level6 = {folders 1-2},
  itemattr1 = {Correspondence in Frensshe},
  xref = {box2},
options = {dataonly},
  keywords = {mv},
  }


@archive{box2b,
    level6 = {folder 3},
  itemattr1 = {Pastry recipes},
  xref = {box2},
options = {dataonly},
  keywords = {mv},
  }


@archive{box2c,
    level6 = {folders 4-5},
  itemattr1 = {The Pieman Letters},
  xref = {box2},
options = {dataonly},
  keywords = {mv},
  }


@archive{ffdoc4,
    level7 = {\ldots},
  itemattr1 = {: various other sundry letters},
%  itemattr2 = {from Simon to the Pieman},
%  itemattr3 = {15 February 1790},
  xref = {folders45},
%   options = {dataonly},
  keywords = {mv},
  }


@archive{ffdoc12,
    level7 = {document 12},
  itemattr1 = {ffdoc12Letter},
  itemattr2 = {from Simon to the Pieman},
  itemattr3 = {15 February 1790},
  xref = {folders45},
%   options = {dataonly},
  keywords = {mv},
  }

@archive{ffdoc1,
    level7 = {document 1},
  itemattr1 = {Letter},
  itemattr2 = {from Simon to the Pieman},
  itemattr3 = {12 February 1790},
  xref = {folders45},
options = {dataonly},
  keywords = {mv},
  }

@archive{ffdoc2,
    level7 = {document 2},
  itemattr1 = {Letter},
  itemattr2 = {from Simon to the Pieman},
  itemattr3 = {14 February 1790},
  xref = {folders45},
options = {dataonly},
  keywords = {mv},
  }

@archive{ffdoc3,
    level7 = {document 3},
  itemattr1 = {Letter},
  itemattr2 = {from Simon to the Pieman},
  itemattr3 = {15 March 1790},
  xref = {folders45},
    options = {dataonly},
  keywords = {mv},
  }
  
@book{abook,author={An Author},title={A Title},publisher={A Publisher},date={1795},location={Paris and London},}
\end{filecontents}


%--------------------------------

\begin{filecontents}[overwrite]{bibdm_archive.dbx}

\DeclareDatamodelEntrytypes{archive}

\DeclareDatamodelFields[type=field, datatype=literal]{
  level1,
  level2,
  level3,
  level4,
  level5,
  level6,
  level7,
  level8,
  level9,
  level10,
  level11,
  level12,
  shortarchive,
  itemattr1,
  itemattr2,
  itemattr3,
  } 

%======================================
\DeclareDatamodelEntryfields[archive]{%
  level1,
  level2,
  level3,
  level4,
  level5,
  level6,
  level7,
  level8,
  level9,
  level10,
  level11,
  level12,
  shortarchive,
  itemattr1,
  itemattr2,
  itemattr3,
  }



\end{filecontents}

%--------------------------------



\documentclass{article}

\usepackage{xcolor}
\pagecolor{green!3}

\usepackage{fontspec}
\setmainfont{Noto Serif}
\newcommand{\cmm}[1]{{\large\ttfamily\color{blue}\textbackslash#1}}


\usepackage[style=british]{csquotes}
\usepackage[
    datamodel=bibdm_archive,  
    style=ext-authoryear,%numeric,%oxnotes, 
    minxrefs=1,
    locallabelwidth=true,
    citecounter=true,
    citetracker=true,
    datecirca=true,
    date=long, 
    minxrefs=1,   
    backend=biber,
    sorting=nyt,
        ]{biblatex}
        

%============  bib overrides
%\DeclareNameAlias{sortname}{given-family}
%%============  bib resources
\addbibresource{archive.bib}

%============  bibliography commands



\newcommand\showcmnd[1]{%
\textbackslash\texttt{#1}%
}


\newcommand\bibhlcolour{red}
\newcommand\bibhlformat[1]{\sffamily\bfseries\textcolor{\bibhlcolour}{#1}}


\newtoggle{littleendian}
\toggletrue{littleendian}


\DeclareFieldFormat{level1}{#1}
\DeclareFieldFormat{level2}{%
    \ifboolexpr{
    test {\ifbibliography}
    and
     test {\iffieldundef{level1}}
     }
    {{\bibhlformat{#1}}}% T
    {#1}% F
}%

\DeclareFieldFormat{level3}{%
    \ifboolexpr{
    test {\ifbibliography}
    and
     test {\iffieldundef{level2}}
     }
    {{\bibhlformat{#1}}}% T
    {#1}% F
}%

\DeclareFieldFormat{level4}{%
    \ifboolexpr{
    test {\ifbibliography}
    and
     test {\iffieldundef{level3}}
     }
    {{\bibhlformat{#1}}}% T
    {#1}% F
}%

\DeclareFieldFormat{level5}{%
    \ifboolexpr{
    test {\ifbibliography}
    and
     test {\iffieldundef{level4}}
     }
    {{\bibhlformat{#1}}}% T
    {#1}% F
}%

\DeclareFieldFormat{level6}{%
    \ifboolexpr{
    test {\ifbibliography}
    and
     test {\iffieldundef{level5}}
     }
    {{\bibhlformat{#1}}}% T
    {#1}% F
}

\DeclareFieldFormat{level7}{%
    \ifboolexpr{
    test {\ifbibliography}
    and
     test {\iffieldundef{level6}}
     }
    {{\bibhlformat{#1}}}% T
    {#1}% F
}




\DeclareFieldFormat{level8}{%
    \ifboolexpr{
    test {\ifbibliography}
    and
     test {\iffieldundef{level7}}
     }
    {{\bibhlformat{#1}}}% T
    {#1}% F
}%

\DeclareFieldFormat{level9}{%
    \ifboolexpr{
    test {\ifbibliography}
    and
     test {\iffieldundef{level8}}
     }
    {{\bibhlformat{#1}}}% T
    {#1}% F
}%

\DeclareFieldFormat{level10}{%
    \ifboolexpr{
    test {\ifbibliography}
    and
     test {\iffieldundef{level9}}
     }
    {{\bibhlformat{#1}}}% T
    {#1}% F
}%

\DeclareFieldFormat{level11}{%
    \ifboolexpr{
    test {\ifbibliography}
    and
     test {\iffieldundef{level10}}
     }
    {{\bibhlformat{#1}}}% T
    {#1}% F
}%

\DeclareFieldFormat{level12}{#1}

\DeclareFieldFormat{shortarchive}{\mkbibemph{#1}}
\DeclareFieldFormat{itemattr1}{#1}
\DeclareFieldFormat{itemattr2}{#1}
\DeclareFieldFormat{itemattr3}{#1}

%~~~~~~~~~~~~~~~~~~~
% bibmacros
%======================= getshortarchive
\newbibmacro{getshortarchive}{%
        \iffieldundef{shortarchive}{}{\printfield{shortarchive}}%
}

\newcommand\relateditemdelim{\setunit*{\addcomma\addspace}}%

%======================= getarchiveall
\newbibmacro{getarchiveall}{%
      \usebibmacro{getarchive1}%
        \relateditemdelim%
      \usebibmacro{getarchive2}%
        \relateditemdelim%
      \usebibmacro{getarchive3}%
        \relateditemdelim%
      \usebibmacro{getarchive4}%
        \relateditemdelim%
      \usebibmacro{getarchive5}%
        \relateditemdelim%
      \usebibmacro{getarchive6}%
        \relateditemdelim%
      \usebibmacro{getarchive7}%
        \relateditemdelim%
      \usebibmacro{getarchive8}%
        \relateditemdelim%
      \usebibmacro{getarchive9}%
        \relateditemdelim%
      \usebibmacro{getarchive10}%
        \relateditemdelim%
      \usebibmacro{getarchive11}%
        \relateditemdelim%
      \usebibmacro{getarchive12}%
}


%======================= getitemattrall
\newbibmacro{getitemattrall}{%
      \usebibmacro{getitemattr1}%
        \relateditemdelim%
      \usebibmacro{getitemattr2}%
        \relateditemdelim%
      \usebibmacro{getitemattr3}%
}


%======================= getarchive
\newbibmacro{getarchive}{%
        \newunit%
        \iftoggle{littleendian}%
        {\usebibmacro{getitemattrall}}{\usebibmacro{getarchiveall}}%
        \newunit%
        \setunit*{\addcolon\addspace}%
        \iftoggle{littleendian}%
        {\usebibmacro{getarchiveall}}{\usebibmacro{getitemattrall}}%
        \newunit%
}

    
%======================= getarchivegeneral
\newbibmacro{getarchivegeneral}[1]{%
        \iffieldundef{level#1}{}{\printfield{level#1}}%
}

%======================= getitemattrgeneral
\newbibmacro{getitemattrgeneral}[1]{%
        \iffieldundef{itemattr#1}{}{\printfield{itemattr#1}}%
}


%======================= getarchive1-12
\newbibmacro{getarchive1}{\usebibmacro{getarchivegeneral}{1}}
\newbibmacro{getarchive2}{\usebibmacro{getarchivegeneral}{2}}
\newbibmacro{getarchive3}{\usebibmacro{getarchivegeneral}{3}}
\newbibmacro{getarchive4}{\usebibmacro{getarchivegeneral}{4}}
\newbibmacro{getarchive5}{\usebibmacro{getarchivegeneral}{5}}
\newbibmacro{getarchive6}{\usebibmacro{getarchivegeneral}{6}}
\newbibmacro{getarchive7}{\usebibmacro{getarchivegeneral}{7}}
\newbibmacro{getarchive8}{\usebibmacro{getarchivegeneral}{8}}
\newbibmacro{getarchive9}{\usebibmacro{getarchivegeneral}{9}}
\newbibmacro{getarchive10}{\usebibmacro{getarchivegeneral}{10}}
\newbibmacro{getarchive11}{\usebibmacro{getarchivegeneral}{11}}
\newbibmacro{getarchive12}{\usebibmacro{getarchivegeneral}{12}}

%======================= getitemattr1-3
\newbibmacro{getitemattr1}{\usebibmacro{getitemattrgeneral}{1}}
\newbibmacro{getitemattr2}{\usebibmacro{getitemattrgeneral}{2}}
\newbibmacro{getitemattr3}{\usebibmacro{getitemattrgeneral}{3}}


%++++++++++++++++++++++++++++++++++++++ reverse
%======================= getarchiveallrev
\newbibmacro{getarchiveallrev}{%
      \usebibmacro{getarchive12}%
        \relateditemdelim%
      \usebibmacro{getarchive11}%
        \relateditemdelim%
      \usebibmacro{getarchive10}%
        \relateditemdelim%
      \usebibmacro{getarchive9}%
        \relateditemdelim%
      \usebibmacro{getarchive8}%
        \relateditemdelim%
      \usebibmacro{getarchive7}%
        \relateditemdelim%
      \usebibmacro{getarchive6}%
        \relateditemdelim%
      \usebibmacro{getarchive5}%
        \relateditemdelim%
      \usebibmacro{getarchive4}%
        \relateditemdelim%
      \usebibmacro{getarchive3}%
        \relateditemdelim%
      \usebibmacro{getarchive2}%
        \relateditemdelim%
      \usebibmacro{getarchive1}%
}

%======================= getarchiveallreva
\newbibmacro{getarchiveallreva}{%
      \newunit%
        \iftoggle{littleendian}{\addcolon}{}%
      \usebibmacro{getarchiveallrev}%
}




%======================= getarchiverev
\newbibmacro{getarchiverev}{%
        \newunit%
        \iftoggle{littleendian}
        {\usebibmacro{getitemattrall}}{\usebibmacro{getarchiveallreva}}%
        \newunit%
        \setunit*{\addcolon\addspace}%
        \iftoggle{littleendian}
        {\usebibmacro{getarchiveallreva}}{\usebibmacro{getitemattrall}}%
        \newunit%
}

    






\newbibmacro*{related:archive}[1]{%
  \entrydata*{#1}{%
  {%
        \togglefalse{littleendian}%
    \printtext{--}%
    \nopunct%
    \usebibmacro{getarchive}%
     }%
}}


%===
\DeclareCiteCommand{\archive}{% prenote
    \usebibmacro{prenote}%
}
{%loopcode
    \ifciteseen%
    {%
        \usebibmacro{getshortarchive}%
    }%
    {\usebibmacro{getarchive}}%
}
{   %sepcode
    \multicitedelim%
}
{%postnote
\usebibmacro{postnote}%
}



%-----------------------------------------
\DeclareCiteCommand{\archiverev}{% prenote
    \usebibmacro{prenote}%
}
{%loopcode
    \ifciteseen
    {%
        \usebibmacro{getshortarchive}%
    }%
    {\usebibmacro{getarchiverev}}%
}
{   %sepcode
    \multicitedelim%
}
{%postnote
\usebibmacro{postnote}%
}


%-----------------------------------------
\DeclareCiteCommand{\parenarchive}[\mkbibparens]{% prenote
    \usebibmacro{prenote}%
}
{%loopcode
    \ifciteseen
    {%
        \usebibmacro{getshortarchive}%
    }%
    {\usebibmacro{getarchive}}%
}
{%sepcode
    \multicitedelim%
}
{%postnote
\usebibmacro{postnote}%
}



%-----------------------------------------
\DeclareCiteCommand{\bracketarchive}[\mkbibbrackets]{% prenote
    \usebibmacro{prenote}%
}
{%loopcode
    \ifciteseen
    {%
        \usebibmacro{getshortarchive}%
    }%
    {\usebibmacro{getarchive}}%
}
{%sepcode
    \multicitedelim%
}
{%postnote
\usebibmacro{postnote}%
}



%-----------------------------------------
\DeclareCiteCommand{\footarchive}[\mkbibfootnote]{% prenote
    \usebibmacro{prenote}%
}
{%loopcode
    \usebibmacro{getarchive}%
}
{   %sepcode
    \multicitedelim%
}
{%postnote
\usebibmacro{postnote}%
}



%-----------------------------------------
\DeclareMultiCiteCommand{\archives}%
{\archive}{\multicitedelim}
\DeclareMultiCiteCommand{\parenarchives}[\mkbibparens]%
{\parenarchive}{\multicitedelim}
\DeclareMultiCiteCommand{\footarchives}[\mkbibfootnote]%
{\footarchive}{\multicitedelim}



%-----------------------------------------
\DeclareCiteCommand{\archivea}{\usebibmacro{prenote}}{\usebibmacro{getarchive1}}{\multicitedelim}{\usebibmacro{postnote}}
\DeclareCiteCommand{\archiveb}{\usebibmacro{prenote}}{\usebibmacro{getarchive2}}{\multicitedelim}{\usebibmacro{postnote}}
\DeclareCiteCommand{\archivec}{\usebibmacro{prenote}}{\usebibmacro{getarchive3}}{\multicitedelim}{\usebibmacro{postnote}}
\DeclareCiteCommand{\archived}{\usebibmacro{prenote}}{\usebibmacro{getarchive4}}{\multicitedelim}{\usebibmacro{postnote}}
\DeclareCiteCommand{\archivee}{\usebibmacro{prenote}}{\usebibmacro{getarchive5}}{\multicitedelim}{\usebibmacro{postnote}}
\DeclareCiteCommand{\archivef}{\usebibmacro{prenote}}{\usebibmacro{getarchive6}}{\multicitedelim}{\usebibmacro{postnote}}
\DeclareCiteCommand{\archiveg}{\usebibmacro{prenote}}{\usebibmacro{getarchive7}}{\multicitedelim}{\usebibmacro{postnote}}
\DeclareCiteCommand{\archiveh}{\usebibmacro{prenote}}{\usebibmacro{getarchive8}}{\multicitedelim}{\usebibmacro{postnote}}
\DeclareCiteCommand{\archivei}{\usebibmacro{prenote}}{\usebibmacro{getarchive9}}{\multicitedelim}{\usebibmacro{postnote}}
\DeclareCiteCommand{\archivej}{\usebibmacro{prenote}}{\usebibmacro{getarchive10}}{\multicitedelim}{\usebibmacro{postnote}}
\DeclareCiteCommand{\archivek}{\usebibmacro{prenote}}{\usebibmacro{getarchive11}}{\multicitedelim}{\usebibmacro{postnote}}
\DeclareCiteCommand{\archivel}{\usebibmacro{prenote}}{\usebibmacro{getarchive12}}{\multicitedelim}{\usebibmacro{postnote}}


\DeclareCiteCommand{\archiveattra}{\usebibmacro{prenote}}{\usebibmacro{getitemattr1}}{\multicitedelim}{\usebibmacro{postnote}}
\DeclareCiteCommand{\archiveattrb}{\usebibmacro{prenote}}{\usebibmacro{getitemattr2}}{\multicitedelim}{\usebibmacro{postnote}}
\DeclareCiteCommand{\archiveattrc}{\usebibmacro{prenote}}{\usebibmacro{getitemattr3}}{\multicitedelim}{\usebibmacro{postnote}}




%-----------------------------------------
\DeclareBibliographyDriver{archive}{%
    \usebibmacro{begentry}%
    \iffieldundef{title}{}{\printfield{title}}%
    \usebibmacro{getarchive}%
\iftoggle{bbx:related}{%
\setunit*{\addperiod}\printtext{\enspace}
\newline\usebibmacro{related:init}\usebibmacro{related}%
  }%
  {}%
    \usebibmacro{finentry}%
}


\DeclareSortingTemplate{bytitle}{%
\sort{
        \field{sorttitle}
        \field{title}
        \field{itemattr1}
}
\sort{
        \field{itemattr2}
}
\sort{
        \field{itemattr3}
}
}

\DeclareRefcontext{rcbytitle}{sorting=bytitle}



%-----------------------------------------
\DeclareCiteCommand{\archiveitem}{% prenote
    \usebibmacro{prenote}%
}
{%loopcode
        \usebibmacro{getitemattrall}%
}
{   %sepcode
    \multicitedelim%
}
{%postnote
\usebibmacro{postnote}%
}



%-----------------------------------------
\DeclareCiteCommand{\archiveloc}{% prenote
    \usebibmacro{prenote}%
}
{%loopcode
        \usebibmacro{getarchiveall}%
}
{   %sepcode
    \multicitedelim%
}
{%postnote
\usebibmacro{postnote}%
}


%-----------------------------------------
\DeclareCiteCommand{\archivelocrev}{% prenote
    \usebibmacro{prenote}%
}
{%loopcode
        \usebibmacro{getarchiveallrev}%
}
{   %sepcode
    \multicitedelim%
}
{%postnote
\usebibmacro{postnote}%
}







%============  document 
\begin{document}


\citetrackerfalse
..., which had a profound impact  (\archive{ffdoc2} in the \citetitle{folders45} collection).

Meanwhile, in another series of developments from \archiveattrc{ffdoc3} onwards (\citetitle{folders45}, \archiveg{ffdoc3}), ...
\citetrackertrue

\begin{verbatim}
..., which had a profound impact  
(\archive{ffdoc2} in the \citetitle{folders45} collection).

Meanwhile, in another series of developments from 
\archiveattrc{ffdoc3} 
onwards 
(\citetitle{folders45}, \archiveg{ffdoc3}), ...
\end{verbatim}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\medskip
\cmm{archive}

\medskip
(A) Big Endian:
 
\togglefalse{littleendian}

\noindent First cite: \archive{test1}

Second cite: \archive{test1}

\medskip
(B) Little Endian:
\toggletrue{littleendian}

\citetrackerfalse
\noindent First cite: \archive{test1}

\citetrackertrue
Second cite: \archive{test1}

%%%%% reverse direction: bottom up

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\bigskip
\cmm{archiverev}

\medskip
(C) Big Endian: Reverse
 
\togglefalse{littleendian}

\citetrackerfalse
\noindent First cite: \archiverev{test1}

\citetrackertrue
Second cite: \archiverev{test1}

\medskip
(D) Little Endian: Reverse
\toggletrue{littleendian}

\citetrackerfalse
\noindent First cite: \archiverev{test1}

\citetrackertrue
Second cite: \archiverev{test1}





%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\bigskip
\cmm{archiveitem}

\medskip
\archiveitem{test1}



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\bigskip
\cmm{archiveloc}

\medskip
\archiveloc{test1}



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\bigskip
\cmm{archivelocrev}

\medskip
\archivelocrev{test1}



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\bigskip
\cmm{parenarchive}

\medskip
\citetrackerfalse
\parenarchive{test1}

\citetrackertrue
Second cite: \parenarchive{test1}



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\bigskip
\cmm{bracketarchive}

\medskip
\citetrackerfalse
\bracketarchive{test1}

\citetrackertrue
Second cite: \bracketarchive{test1}

\medskip
\bracketarchive[See][leaf 4]{test1}




%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\bigskip
\cmm{footarchive}

\medskip
text\footarchive{test1}



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\bigskip
\cmm{archivea} = \archivea{test1}

\cmm{archiveb} = \archiveb{test1}

\cmm{archivec} = \archivec{test1}

\cmm{archived} = \archived{test1}

\cmm{archivee} = \archivee{test1}

\cmm{archivef} = \archivef{test1}

\cmm{archiveg} = \archiveg{test1}

\cmm{archiveh} = \archiveh{test1}

\cmm{archivei} = \archivei{test1}

\cmm{archivej} = \archivej{test1}

\cmm{archivek} = \archivek{test1}

\cmm{archivel} = \archivel{test1}

\cmm{archiveattra} = \archiveattra{test1}

\cmm{archiveattrb} = \archiveattrb{test1}

\cmm{archiveattrc} = \archiveattrc{test1}


\medskip
---

Box 2 (\verb|\archive{box2}|): \par\archive{box2}.

\medskip
One of the items in box 2 (\verb|\archive{box2a}| + \verb|\citetitle{box2}|): \par\archive{box2a} in the \citetitle{box2} archive.

\medskip
Folders4-5 (\verb|\archive{folders45}|): \par\archive{folders45}.

\medskip
A document (\verb|\archive{ffdoc2}| + \verb|\citetitle{folders45}|): \par\archive{ffdoc2}, in the \citetitle{folders45} collection.

%A book: \cite{abook}.

\newpage
\begin{refcontext}{rcbytitle}
\printbibliography
\end{refcontext}



\end{document}

答案3

(继续) ...

biblatex-chicago版本如下所示:

biblatex-chicago

只需一行代码更改和最新的分发。

请注意,也可以使用现有的定义字段,如、、name=等-可能需要根据需求将它们添加到排序模板中,并且可能使用适当的命令将它们插入到引用命令和参考书目驱动程序中(其中= 字段、列表、名称、日期)。date=publisher=url=\print...{}...

或者可以定义和使用附加字段。

微波束

% arara: lualatex
% arara: biber
% arara: lualatex
% arara: lualatex


\begin{filecontents}[overwrite]{archive.bib}

@archive{folders45,
   title={The Pieman Letters},
   sorttitle={Pieman Letters},
    level1 = {Museum of All Things},
    level2 = {Historical Collections Department},
    level3 = {Station Records 1790-1820},
    level4 = {cat AB 123/486},
    level5 = {box 2},
    level6 = {folders 4-5},
  related = {ffdoc1,ffdoc2, ffdoc3, ffdoc4, ffdoc12},
  relatedtype = {archive},
  keywords = {mv},
}


@archive{box2,
   title={All About Pies},
    level1 = {Museum of All Things},
    level2 = {Historical Collections Department},
    level3 = {Station Records 1790-1820},
    level4 = {cat AB 123/486},
    level5 = {box 2},
  related     = {box2a,box2b,box2c},
  relatedtype = {archive},
  keywords = {mv},
}





@archive{test1,
    level1 = {Museum of All Things},
    level2 = {Historical Collections Department},
    level3 = {Station Records 1790-1820},
    level4 = {cat AB 123/486},
    level5 = {box 2},
    level6 = {folders 4-5},
    level7 = {document 12},
  itemattr1 = {test1Letter},
  itemattr2 = {from Simon to the Pieman},
  itemattr3 = {15 February 1790},
  shortarchive  ={Pieman Letter},
}


    @archive{box2a,
    level6 = {folders 1-2},
  itemattr1 = {Correspondence in Frensshe},
  xref = {box2},
options = {dataonly},
  keywords = {mv},
  }


@archive{box2b,
    level6 = {folder 3},
  itemattr1 = {Pastry recipes},
  xref = {box2},
options = {dataonly},
  keywords = {mv},
  }


@archive{box2c,
    level6 = {folders 4-5},
  itemattr1 = {The Pieman Letters},
  xref = {box2},
options = {dataonly},
  keywords = {mv},
  }


@archive{ffdoc4,
    level7 = {\ldots},
  itemattr1 = {: various other sundry letters},
%  itemattr2 = {from Simon to the Pieman},
%  itemattr3 = {15 February 1790},
  xref = {folders45},
%   options = {dataonly},
  keywords = {mv},
  }


@archive{ffdoc12,
    level7 = {document 12},
  itemattr1 = {ffdoc12Letter},
  itemattr2 = {from Simon to the Pieman},
  itemattr3 = {15 February 1790},
  xref = {folders45},
%   options = {dataonly},
  keywords = {mv},
  }

@archive{ffdoc1,
    level7 = {document 1},
  itemattr1 = {Letter},
  itemattr2 = {from Simon to the Pieman},
  itemattr3 = {12 February 1790},
  xref = {folders45},
options = {dataonly},
  keywords = {mv},
  }

@archive{ffdoc2,
    level7 = {document 2},
  itemattr1 = {Letter},
  itemattr2 = {from Simon to the Pieman},
  itemattr3 = {14 February 1790},
  xref = {folders45},
options = {dataonly},
  keywords = {mv},
  }

@archive{ffdoc3,
    level7 = {document 3},
  itemattr1 = {Letter},
  itemattr2 = {from Simon to the Pieman},
  itemattr3 = {15 March 1790},
  xref = {folders45},
    options = {dataonly},
  keywords = {mv},
  }
  
@book{abook,author={An Author},title={A Title},publisher={A Publisher},date={1795},location={Paris and London},}
\end{filecontents}


%--------------------------------

\begin{filecontents}[overwrite]{bibdm_archive.dbx}

\DeclareDatamodelEntrytypes{archive}

\DeclareDatamodelFields[type=field, datatype=literal]{
  level1,
  level2,
  level3,
  level4,
  level5,
  level6,
  level7,
  level8,
  level9,
  level10,
  level11,
  level12,
  shortarchive,
  itemattr1,
  itemattr2,
  itemattr3,
  } 

%======================================
\DeclareDatamodelEntryfields[archive]{%
  level1,
  level2,
  level3,
  level4,
  level5,
  level6,
  level7,
  level8,
  level9,
  level10,
  level11,
  level12,
  shortarchive,
  itemattr1,
  itemattr2,
  itemattr3,
  }



\end{filecontents}

%--------------------------------



\documentclass{article}

\usepackage{xcolor}
\pagecolor{green!3}

\usepackage{fontspec}
\setmainfont{Noto Serif}
\newcommand{\cmm}[1]{{\large\ttfamily\color{blue}\textbackslash#1}}


%\PassOptionsToPackage{<options>}{<package>}\RequirePackage{<package>}

\usepackage[style=british]{csquotes}
\usepackage[
    datamodel=bibdm_archive,  
%   style=ext-authoryear,%numeric,%oxnotes, 
    minxrefs=1,
    locallabelwidth=true,
    citecounter=true,
    citetracker=true,
    datecirca=true,
    date=long, 
    minxrefs=1,   
    backend=biber,
    sorting=nyt,
        ]{biblatex-chicago}
%       ]{biblatex}
        

%============  bib overrides
%\DeclareNameAlias{sortname}{given-family}
%%============  bib resources
\addbibresource{archive.bib}

%============  bibliography commands



\newcommand\showcmnd[1]{%
\textbackslash\texttt{#1}%
}


\newcommand\bibhlcolour{red}
\newcommand\bibhlformat[1]{\sffamily\bfseries\textcolor{\bibhlcolour}{#1}}


\newtoggle{littleendian}
\toggletrue{littleendian}


\DeclareFieldFormat{level1}{#1}
\DeclareFieldFormat{level2}{%
    \ifboolexpr{
    test {\ifbibliography}
    and
     test {\iffieldundef{level1}}
     }
    {{\bibhlformat{#1}}}% T
    {#1}% F
}%

\DeclareFieldFormat{level3}{%
    \ifboolexpr{
    test {\ifbibliography}
    and
     test {\iffieldundef{level2}}
     }
    {{\bibhlformat{#1}}}% T
    {#1}% F
}%

\DeclareFieldFormat{level4}{%
    \ifboolexpr{
    test {\ifbibliography}
    and
     test {\iffieldundef{level3}}
     }
    {{\bibhlformat{#1}}}% T
    {#1}% F
}%

\DeclareFieldFormat{level5}{%
    \ifboolexpr{
    test {\ifbibliography}
    and
     test {\iffieldundef{level4}}
     }
    {{\bibhlformat{#1}}}% T
    {#1}% F
}%

\DeclareFieldFormat{level6}{%
    \ifboolexpr{
    test {\ifbibliography}
    and
     test {\iffieldundef{level5}}
     }
    {{\bibhlformat{#1}}}% T
    {#1}% F
}

\DeclareFieldFormat{level7}{%
    \ifboolexpr{
    test {\ifbibliography}
    and
     test {\iffieldundef{level6}}
     }
    {{\bibhlformat{#1}}}% T
    {#1}% F
}




\DeclareFieldFormat{level8}{%
    \ifboolexpr{
    test {\ifbibliography}
    and
     test {\iffieldundef{level7}}
     }
    {{\bibhlformat{#1}}}% T
    {#1}% F
}%

\DeclareFieldFormat{level9}{%
    \ifboolexpr{
    test {\ifbibliography}
    and
     test {\iffieldundef{level8}}
     }
    {{\bibhlformat{#1}}}% T
    {#1}% F
}%

\DeclareFieldFormat{level10}{%
    \ifboolexpr{
    test {\ifbibliography}
    and
     test {\iffieldundef{level9}}
     }
    {{\bibhlformat{#1}}}% T
    {#1}% F
}%

\DeclareFieldFormat{level11}{%
    \ifboolexpr{
    test {\ifbibliography}
    and
     test {\iffieldundef{level10}}
     }
    {{\bibhlformat{#1}}}% T
    {#1}% F
}%

\DeclareFieldFormat{level12}{#1}

\DeclareFieldFormat{shortarchive}{\mkbibemph{#1}}
\DeclareFieldFormat{itemattr1}{#1}
\DeclareFieldFormat{itemattr2}{#1}
\DeclareFieldFormat{itemattr3}{#1}

%~~~~~~~~~~~~~~~~~~~
% bibmacros
%======================= getshortarchive
\newbibmacro{getshortarchive}{%
        \iffieldundef{shortarchive}{}{\printfield{shortarchive}}%
}

\newcommand\relateditemdelim{\setunit*{\addcomma\addspace}}%

%======================= getarchiveall
\newbibmacro{getarchiveall}{%
      \usebibmacro{getarchive1}%
        \relateditemdelim%
      \usebibmacro{getarchive2}%
        \relateditemdelim%
      \usebibmacro{getarchive3}%
        \relateditemdelim%
      \usebibmacro{getarchive4}%
        \relateditemdelim%
      \usebibmacro{getarchive5}%
        \relateditemdelim%
      \usebibmacro{getarchive6}%
        \relateditemdelim%
      \usebibmacro{getarchive7}%
        \relateditemdelim%
      \usebibmacro{getarchive8}%
        \relateditemdelim%
      \usebibmacro{getarchive9}%
        \relateditemdelim%
      \usebibmacro{getarchive10}%
        \relateditemdelim%
      \usebibmacro{getarchive11}%
        \relateditemdelim%
      \usebibmacro{getarchive12}%
}


%======================= getitemattrall
\newbibmacro{getitemattrall}{%
      \usebibmacro{getitemattr1}%
        \relateditemdelim%
      \usebibmacro{getitemattr2}%
        \relateditemdelim%
      \usebibmacro{getitemattr3}%
}


%======================= getarchive
\newbibmacro{getarchive}{%
        \newunit%
        \iftoggle{littleendian}%
        {\usebibmacro{getitemattrall}}{\usebibmacro{getarchiveall}}%
        \newunit%
        \setunit*{\addcolon\addspace}%
        \iftoggle{littleendian}%
        {\usebibmacro{getarchiveall}}{\usebibmacro{getitemattrall}}%
        \newunit%
}

    
%======================= getarchivegeneral
\newbibmacro{getarchivegeneral}[1]{%
        \iffieldundef{level#1}{}{\printfield{level#1}}%
}

%======================= getitemattrgeneral
\newbibmacro{getitemattrgeneral}[1]{%
        \iffieldundef{itemattr#1}{}{\printfield{itemattr#1}}%
}


%======================= getarchive1-12
\newbibmacro{getarchive1}{\usebibmacro{getarchivegeneral}{1}}
\newbibmacro{getarchive2}{\usebibmacro{getarchivegeneral}{2}}
\newbibmacro{getarchive3}{\usebibmacro{getarchivegeneral}{3}}
\newbibmacro{getarchive4}{\usebibmacro{getarchivegeneral}{4}}
\newbibmacro{getarchive5}{\usebibmacro{getarchivegeneral}{5}}
\newbibmacro{getarchive6}{\usebibmacro{getarchivegeneral}{6}}
\newbibmacro{getarchive7}{\usebibmacro{getarchivegeneral}{7}}
\newbibmacro{getarchive8}{\usebibmacro{getarchivegeneral}{8}}
\newbibmacro{getarchive9}{\usebibmacro{getarchivegeneral}{9}}
\newbibmacro{getarchive10}{\usebibmacro{getarchivegeneral}{10}}
\newbibmacro{getarchive11}{\usebibmacro{getarchivegeneral}{11}}
\newbibmacro{getarchive12}{\usebibmacro{getarchivegeneral}{12}}

%======================= getitemattr1-3
\newbibmacro{getitemattr1}{\usebibmacro{getitemattrgeneral}{1}}
\newbibmacro{getitemattr2}{\usebibmacro{getitemattrgeneral}{2}}
\newbibmacro{getitemattr3}{\usebibmacro{getitemattrgeneral}{3}}


%++++++++++++++++++++++++++++++++++++++ reverse
%======================= getarchiveallrev
\newbibmacro{getarchiveallrev}{%
      \usebibmacro{getarchive12}%
        \relateditemdelim%
      \usebibmacro{getarchive11}%
        \relateditemdelim%
      \usebibmacro{getarchive10}%
        \relateditemdelim%
      \usebibmacro{getarchive9}%
        \relateditemdelim%
      \usebibmacro{getarchive8}%
        \relateditemdelim%
      \usebibmacro{getarchive7}%
        \relateditemdelim%
      \usebibmacro{getarchive6}%
        \relateditemdelim%
      \usebibmacro{getarchive5}%
        \relateditemdelim%
      \usebibmacro{getarchive4}%
        \relateditemdelim%
      \usebibmacro{getarchive3}%
        \relateditemdelim%
      \usebibmacro{getarchive2}%
        \relateditemdelim%
      \usebibmacro{getarchive1}%
}

%======================= getarchiveallreva
\newbibmacro{getarchiveallreva}{%
      \newunit%
        \iftoggle{littleendian}{\addcolon}{}%
      \usebibmacro{getarchiveallrev}%
}




%======================= getarchiverev
\newbibmacro{getarchiverev}{%
        \newunit%
        \iftoggle{littleendian}
        {\usebibmacro{getitemattrall}}{\usebibmacro{getarchiveallreva}}%
        \newunit%
        \setunit*{\addcolon\addspace}%
        \iftoggle{littleendian}
        {\usebibmacro{getarchiveallreva}}{\usebibmacro{getitemattrall}}%
        \newunit%
}

    






\newbibmacro*{related:archive}[1]{%
  \entrydata*{#1}{%
  {%
        \togglefalse{littleendian}%
    \printtext{--}%
    \nopunct%
    \usebibmacro{getarchive}%
     }%
}}


%===
\DeclareCiteCommand{\archive}{% prenote
    \usebibmacro{prenote}%
}
{%loopcode
    \ifciteseen%
    {%
        \usebibmacro{getshortarchive}%
    }%
    {\usebibmacro{getarchive}}%
}
{   %sepcode
    \multicitedelim%
}
{%postnote
\usebibmacro{postnote}%
}



%-----------------------------------------
\DeclareCiteCommand{\archiverev}{% prenote
    \usebibmacro{prenote}%
}
{%loopcode
    \ifciteseen
    {%
        \usebibmacro{getshortarchive}%
    }%
    {\usebibmacro{getarchiverev}}%
}
{   %sepcode
    \multicitedelim%
}
{%postnote
\usebibmacro{postnote}%
}


%-----------------------------------------
\DeclareCiteCommand{\parenarchive}[\mkbibparens]{% prenote
    \usebibmacro{prenote}%
}
{%loopcode
    \ifciteseen
    {%
        \usebibmacro{getshortarchive}%
    }%
    {\usebibmacro{getarchive}}%
}
{%sepcode
    \multicitedelim%
}
{%postnote
\usebibmacro{postnote}%
}



%-----------------------------------------
\DeclareCiteCommand{\bracketarchive}[\mkbibbrackets]{% prenote
    \usebibmacro{prenote}%
}
{%loopcode
    \ifciteseen
    {%
        \usebibmacro{getshortarchive}%
    }%
    {\usebibmacro{getarchive}}%
}
{%sepcode
    \multicitedelim%
}
{%postnote
\usebibmacro{postnote}%
}



%-----------------------------------------
\DeclareCiteCommand{\footarchive}[\mkbibfootnote]{% prenote
    \usebibmacro{prenote}%
}
{%loopcode
    \usebibmacro{getarchive}%
}
{   %sepcode
    \multicitedelim%
}
{%postnote
\usebibmacro{postnote}%
}



%-----------------------------------------
\DeclareMultiCiteCommand{\archives}%
{\archive}{\multicitedelim}
\DeclareMultiCiteCommand{\parenarchives}[\mkbibparens]%
{\parenarchive}{\multicitedelim}
\DeclareMultiCiteCommand{\footarchives}[\mkbibfootnote]%
{\footarchive}{\multicitedelim}



%-----------------------------------------
\DeclareCiteCommand{\archivea}{\usebibmacro{prenote}}{\usebibmacro{getarchive1}}{\multicitedelim}{\usebibmacro{postnote}}
\DeclareCiteCommand{\archiveb}{\usebibmacro{prenote}}{\usebibmacro{getarchive2}}{\multicitedelim}{\usebibmacro{postnote}}
\DeclareCiteCommand{\archivec}{\usebibmacro{prenote}}{\usebibmacro{getarchive3}}{\multicitedelim}{\usebibmacro{postnote}}
\DeclareCiteCommand{\archived}{\usebibmacro{prenote}}{\usebibmacro{getarchive4}}{\multicitedelim}{\usebibmacro{postnote}}
\DeclareCiteCommand{\archivee}{\usebibmacro{prenote}}{\usebibmacro{getarchive5}}{\multicitedelim}{\usebibmacro{postnote}}
\DeclareCiteCommand{\archivef}{\usebibmacro{prenote}}{\usebibmacro{getarchive6}}{\multicitedelim}{\usebibmacro{postnote}}
\DeclareCiteCommand{\archiveg}{\usebibmacro{prenote}}{\usebibmacro{getarchive7}}{\multicitedelim}{\usebibmacro{postnote}}
\DeclareCiteCommand{\archiveh}{\usebibmacro{prenote}}{\usebibmacro{getarchive8}}{\multicitedelim}{\usebibmacro{postnote}}
\DeclareCiteCommand{\archivei}{\usebibmacro{prenote}}{\usebibmacro{getarchive9}}{\multicitedelim}{\usebibmacro{postnote}}
\DeclareCiteCommand{\archivej}{\usebibmacro{prenote}}{\usebibmacro{getarchive10}}{\multicitedelim}{\usebibmacro{postnote}}
\DeclareCiteCommand{\archivek}{\usebibmacro{prenote}}{\usebibmacro{getarchive11}}{\multicitedelim}{\usebibmacro{postnote}}
\DeclareCiteCommand{\archivel}{\usebibmacro{prenote}}{\usebibmacro{getarchive12}}{\multicitedelim}{\usebibmacro{postnote}}


\DeclareCiteCommand{\archiveattra}{\usebibmacro{prenote}}{\usebibmacro{getitemattr1}}{\multicitedelim}{\usebibmacro{postnote}}
\DeclareCiteCommand{\archiveattrb}{\usebibmacro{prenote}}{\usebibmacro{getitemattr2}}{\multicitedelim}{\usebibmacro{postnote}}
\DeclareCiteCommand{\archiveattrc}{\usebibmacro{prenote}}{\usebibmacro{getitemattr3}}{\multicitedelim}{\usebibmacro{postnote}}




%-----------------------------------------
\DeclareBibliographyDriver{archive}{%
    \usebibmacro{begentry}%
    \iffieldundef{title}{}{\printfield{title}}%
    \usebibmacro{getarchive}%
%\iftoggle{bbx:related}{%
%\setunit*{\addperiod}\printtext{\enspace}
%\newline\usebibmacro{related:init}\usebibmacro{related}%
%  }%
%  {}%
\iffieldundef{related}{}{%
\setunit*{\addperiod}\printtext{\enspace}
\newline\usebibmacro{related:init}\usebibmacro{related}%
  }%
    \usebibmacro{finentry}%
}


\DeclareSortingTemplate{bytitle}{%
\sort{
        \field{sorttitle}
        \field{title}
        \field{itemattr1}
}
\sort{
        \field{itemattr2}
}
\sort{
        \field{itemattr3}
}
}

\DeclareRefcontext{rcbytitle}{sorting=bytitle}



%-----------------------------------------
\DeclareCiteCommand{\archiveitem}{% prenote
    \usebibmacro{prenote}%
}
{%loopcode
        \usebibmacro{getitemattrall}%
}
{   %sepcode
    \multicitedelim%
}
{%postnote
\usebibmacro{postnote}%
}



%-----------------------------------------
\DeclareCiteCommand{\archiveloc}{% prenote
    \usebibmacro{prenote}%
}
{%loopcode
        \usebibmacro{getarchiveall}%
}
{   %sepcode
    \multicitedelim%
}
{%postnote
\usebibmacro{postnote}%
}


%-----------------------------------------
\DeclareCiteCommand{\archivelocrev}{% prenote
    \usebibmacro{prenote}%
}
{%loopcode
        \usebibmacro{getarchiveallrev}%
}
{   %sepcode
    \multicitedelim%
}
{%postnote
\usebibmacro{postnote}%
}







%============  document 
\begin{document}


\citetrackerfalse
..., which had a profound impact  (\archive{ffdoc2} in the \citetitle{folders45} collection).

Meanwhile, in another series of developments from \archiveattrc{ffdoc3} onwards (\citetitle{folders45}, \archiveg{ffdoc3}), ...
\citetrackertrue

\begin{verbatim}
..., which had a profound impact  
(\archive{ffdoc2} in the \citetitle{folders45} collection).

Meanwhile, in another series of developments from 
\archiveattrc{ffdoc3} 
onwards 
(\citetitle{folders45}, \archiveg{ffdoc3}), ...
\end{verbatim}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\medskip
\cmm{archive}

\medskip
(A) Big Endian:
 
\togglefalse{littleendian}

\noindent First cite: \archive{test1}

Second cite: \archive{test1}

\medskip
(B) Little Endian:
\toggletrue{littleendian}

\citetrackerfalse
\noindent First cite: \archive{test1}

\citetrackertrue
Second cite: \archive{test1}

%%%%% reverse direction: bottom up

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\bigskip
\cmm{archiverev}

\medskip
(C) Big Endian: Reverse
 
\togglefalse{littleendian}

\citetrackerfalse
\noindent First cite: \archiverev{test1}

\citetrackertrue
Second cite: \archiverev{test1}

\medskip
(D) Little Endian: Reverse
\toggletrue{littleendian}

\citetrackerfalse
\noindent First cite: \archiverev{test1}

\citetrackertrue
Second cite: \archiverev{test1}





%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\bigskip
\cmm{archiveitem}

\medskip
\archiveitem{test1}



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\bigskip
\cmm{archiveloc}

\medskip
\archiveloc{test1}



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\bigskip
\cmm{archivelocrev}

\medskip
\archivelocrev{test1}



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\bigskip
\cmm{parenarchive}

\medskip
\citetrackerfalse
\parenarchive{test1}

\citetrackertrue
Second cite: \parenarchive{test1}



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\bigskip
\cmm{bracketarchive}

\medskip
\citetrackerfalse
\bracketarchive{test1}

\citetrackertrue
Second cite: \bracketarchive{test1}

\medskip
\bracketarchive[See][leaf 4]{test1}




%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\bigskip
\cmm{footarchive}

\medskip
text\footarchive{test1}



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\bigskip
\cmm{archivea} = \archivea{test1}

\cmm{archiveb} = \archiveb{test1}

\cmm{archivec} = \archivec{test1}

\cmm{archived} = \archived{test1}

\cmm{archivee} = \archivee{test1}

\cmm{archivef} = \archivef{test1}

\cmm{archiveg} = \archiveg{test1}

\cmm{archiveh} = \archiveh{test1}

\cmm{archivei} = \archivei{test1}

\cmm{archivej} = \archivej{test1}

\cmm{archivek} = \archivek{test1}

\cmm{archivel} = \archivel{test1}

\cmm{archiveattra} = \archiveattra{test1}

\cmm{archiveattrb} = \archiveattrb{test1}

\cmm{archiveattrc} = \archiveattrc{test1}


\medskip
---

Box 2 (\verb|\archive{box2}|): \par\archive{box2}.

\medskip
One of the items in box 2 (\verb|\archive{box2a}| + \verb|\citetitle{box2}|): \par\archive{box2a} in the \citetitle{box2} archive.

\medskip
Folders4-5 (\verb|\archive{folders45}|): \par\archive{folders45}.

\medskip
A document (\verb|\archive{ffdoc2}| + \verb|\citetitle{folders45}|): \par\archive{ffdoc2}, in the \citetitle{folders45} collection.

%A book: \cite{abook}.

\newpage
\begin{refcontext}{rcbytitle}
\printbibliography
\end{refcontext}



\end{document}

相关内容