Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- documentclass{memoir}
- usepackage{csquotes}
- makeindex
- usepackage{xpatch}
- usepackage[indexing=true,authordate,backend=biber,language=auto,autolang=other]{biblatex-chicago}
- usepackage{filecontents}
- renewbibmacro*{bibindex}{%
- ifbibindex
- {indexnames{author}%
- indexnames{editor}%
- indexnames{translator}%
- indexnames{commentator}%
- ifkeyword{pri}{indexfield{indextitle}}{}
- }
- {}}
- renewbibmacro*{citeindex}{%
- ifciteindex
- {indexnames{author}%
- indexnames{editor}%
- indexnames{translator}%
- indexnames{commentator}%
- ifkeyword{pri}{indexfield{indextitle}}{}
- }
- {}}
- begin{filecontents}{pri.bib}
- @misc{Kuṭṭanīmata,
- entrysubtype = {classical},
- author = {Dāmodaragupta},
- title = {Kuṭṭanīmata},
- related = {DezsoGoodall2012},
- relatedoptions = {dataonly,useeditor=false,usetranslator=false}
- }
- end{filecontents}
- begin{filecontents}{sec.bib}
- @book{DezsoGoodall2012,
- title = {Dāmodaraguptaviracitaṃ Kuṭṭanīmatam},
- subtitle = {The Bawd’s Counsel, Being an Eighth-century Verse Novel in Sanskrit by Dāmodaragupta, Newly Edited and Translated into English},
- editor = {Csaba Dezső and Dominic Goodall},
- translator = {Csaba Dezső and Dominic Goodall},
- series = {Groningen Oriental Studies},
- number = {23},
- location = {Groningen},
- publisher = {Egbert Forsten},
- year = {2012}
- }
- end{filecontents}
- addbibresource{pri.bib}
- addbibresource{sec.bib}
- DeclareSourcemap{
- maps{
- map{
- perdatasource{pri.bib}
- step[fieldset=keywords, fieldvalue=pri]
- step[fieldsource=title, final]
- step[fieldset=sortkey, origfieldval]
- }
- }
- }
- DeclareFieldFormat[misc]{title}{mkbibemph{#1}isdot}
- newbibmacro*{pri:titleofauthor}{%
- ifentrytype{misc}
- {iffieldequalstr{entrysubtype}{classical}
- {ifbibliography
- {printfield{title}%
- ifnameundef{author}
- {}
- {setunit*{addspace}%
- bibstring{of}%
- setunit*{addspace}%
- printnames{author}%
- clearname{author}}%
- clearfield{title}}
- {printtext[bibhyperref]{printfield[citetitle]{title}}%
- ifnameundef{labelname}
- {}
- {setunit*{addspace}%
- bibstring{of}%
- setunit*{addspace}%
- printnames{labelname}}%
- clearfield{labeltitle}%
- clearname{labelname}}}
- {}}
- {}}
- xpretobibmacro{cite}
- {usebibmacro{pri:titleofauthor}}
- {}
- {}
- xpatchbibdriver{misc}
- {usebibmacro{bibindex}}
- {usebibmacro{bibindex}usebibmacro{pri:titleofauthor}}
- {}
- {}
- begin{document}
- Filler text autocite{Kuṭṭanīmata}.
- Filler text autocite{DezsoGoodall2012}.
- printbibliography[title=Primary Sources, keyword=pri,heading=subbibliography]
- printbibliography[title=Secondary Sources, notkeyword=pri,heading=subbibliography]
- printindex
- end{document}
- renewbibmacro*{bibindex}{%
- ifbibindex
- {indexnames{author}%
- indexnames{editor}%
- indexnames{translator}%
- indexnames{commentator}%
- ifkeyword{pri}{indexfield{indextitle}}{}}
- {}}
- renewbibmacro*{citeindex}{%
- ifciteindex
- {indexnames{author}%
- indexnames{editor}%
- indexnames{translator}%
- indexnames{commentator}%
- ifkeyword{pri}{indexfield{indextitle}}{}}
- {}}
- newbibmacro*{bothindex}{%
- indexnames{author}%
- indexnames{editor}%
- indexnames{translator}%
- indexnames{commentator}%
- ifkeyword{pri}{indexfield{indextitle}}{}}
- renewbibmacro*{bibindex}{%
- ifbibindex
- {usebibmacro{bothindex}}
- {}}
- renewbibmacro*{citeindex}{%
- ifciteindex
- {usebibmacro{bothindex}}
- {}}
Add Comment
Please, Sign In to add comment