\documentclass[11pt]{article} \usepackage{geometry} \geometry{a4paper} \usepackage{fontspec} \setmainfont{TeX Gyre Termes} \setmonofont{TeX Gyre Cursor} \usepackage{csquotes} \usepackage{polyglossia} \setdefaultlanguage[variant=british]{english} \usepackage{setspace} \doublespacing \usepackage[hidelinks]{hyperref} % adds loads of hyperlinks \setlength{\parindent}{0em} \setlength{\parskip}{1em} \usepackage[style=authoryear-ibid,alldates=long,giveninits=true,dashed=false,datelabel=year,datecirca=true,mergedate=maximum,maxbibnames=10,ibidpage=true]{biblatex} \renewbibmacro*{volume+number+eid}{ % puts issue number in brackets \printfield{volume} \printfield{number} \setunit{\addcomma\space} \printfield{eid}} \DeclareFieldFormat[article]{number}{\mkbibparens{#1}} \renewbibmacro{in:}{ % gets rid of In for journal articles \ifentrytype{article} {} {\printtext{\bibstring{in}\intitlepunct}}} \DefineBibliographyStrings{english}{ % changes visited on to accessed urlseen={Accessed}, } \DeclareFieldFormat[article]{pages}{#1} % gets rid of pp. for journal articles \DeclareNameAlias{sortname}{family-given} % stops 2nd author being listed first last \renewcommand*{\intitlepunct}{\space} % deletes colon after In \AtEveryBibitem{\uspunctuation} % fixes full stop placement \renewcommand*{\postnotedelim}{\addcolon} % replaces p. in text with colons \DeclareFieldFormat{postnote}{#1} \DeclareFieldFormat{multipostnote}{#1} \DeclareFieldFormat{origdate}{\mkbibbrackets{#1}} % year first published \renewbibmacro*{cite:labeldate+extradate}{% \iffieldundef{origyear} {} {\printorigdate \setunit{\addspace}}% \iffieldundef{labelyear} {} {\printtext[bibhyperref]{\printlabeldateextra}}} \DeclareCiteCommand{\citeorigyear} {\boolfalse{citetracker}% \boolfalse{pagetracker}% \usebibmacro{prenote}} {\printfield{origyear}} {\multicitedelim} {\usebibmacro{postnote}} \renewbibmacro*{date+extradate}{% \iffieldundef{origyear} {} {\printorigdate \setunit{\addspace}}% \iffieldundef{labelyear} {} {\printtext[parens]{% \iflabeldateisdate {\printdateextra} {\printlabeldateextra}}}} \DeclareSourcemap{ \maps[datatype=bibtex]{ \map[overwrite=false]{ \step[fieldsource=year] \step[fieldset=sortyear, origfieldval, final] \step[fieldsource=sortyear, match={c. }, replace={}] } } } \bibliography{bib} \nocite{*} \begin{document} \section*{Draft bibliography for Cornish} \printbibliography[title={Introductions and general histories},keyword=corn:gen] \printbibliography[title={Old Cornish literature},keyword=corn:oc] \printbibliography[title={Middle Cornish literature},keyword=corn:mc] \printbibliography[title={Late Cornish literature},keyword=corn:lc] \printbibliography[title={Revived Cornish literature},keyword=corn:revc] \printbibliography[title={Linguistic works on traditional Cornish},keyword=corn:tradling] \printbibliography[title={Linguistic works on revived Cornish},keyword=corn:revling] \printbibliography[title={The decline of Cornish},keyword=corn:decl] \printbibliography[title={Textbooks, dictionaries, grammars: Unified Cornish/Unified Cornish Revised/Kernowek Standard},keyword=corn:ucmat] \printbibliography[title={Textbooks, dictionaries, grammars: Kernewek Kemmyn},keyword=corn:kkmat] \printbibliography[title={Textbooks, dictionaries, grammars: Modern Cornish},keyword=corn:rlcmat] \printbibliography[title={Textbooks, dictionaries, grammars: SWF},keyword=corn:swfmat] \printbibliography[title={Textbooks, dictionaries, grammars: Early and other varieties},keyword=corn:altmat] \printbibliography[title={Spelling/varieties debate 1: Pre-Kernewek Kemmyn},keyword=corn:orth1] \printbibliography[title={Spelling/varieties debate 2: Post-Kernewek Kemmyn},keyword=corn:orth2] \printbibliography[title={Spelling/varieties debate 3: The SWF era},keyword=corn:orth3] \printbibliography[title={Accounts of the early revival},keyword=corn:factrev] \printbibliography[title={Critical accounts of the later revival and contemporary situation},keyword=corn:critrev2] \printbibliography[title={Language policy and Cornish in society},keyword=corn:pol] \printbibliography[title={Language technology},keyword=corn:tech] \printbibliography[title={For popular audiences},keyword=corn:pop] \printbibliography[title={Cornwall and Brittany},keyword=corn:bret] \printbibliography[title={A selection of non-language-focused works},keyword=corn:nonling] \end{document} %%% Local Variables: %%% mode: latex %%% TeX-master: t %%% End: