\documentclass{ltxdockit}[2011/03/25]
\usepackage{btxdockit}
\usepackage[main=english,french,latin]{babel}
\usepackage[bibstyle=verbose,citestyle=verbose]{biblatex}
\addbibresource{biblatex-source-division.bib}
\usepackage{biblatex-source-division}
\usepackage{fontspec}
\usepackage[mono=false]{libertine}
\usepackage{microtype}
\usepackage[strict]{csquotes}
\setmonofont[Scale=MatchLowercase]{DejaVu Sans Mono}
\usepackage{shortvrb}
\usepackage{minted}
\usepackage{pifont}

% Usefull commands
\newcommand{\biblatex}{biblatex\xspace}
\pretocmd{\bibfield}{\sloppy}{}{}
\pretocmd{\bibtype}{\sloppy}{}{}
\newcommand{\bibkey}[1]{\texttt #1}
% Meta-datas
\titlepage{%
	title={Source division with biblatex},
	email={maieul <at> maieul <dot> net},
	author={Maïeul Rouquette},
	subtitle={},
	revision={2.4.2},
	date={21/09/2017},
	url={https://github.com/maieul/biblatex-source-division}}
% Hyphen
\hyphenation{Ma-de-lei-ne}

\begin{document}

\printtitlepage

\tableofcontents
\section{Introduction}
\subsection{Goals}
The \biblatex package allows to refer to a precise page number when citing a reference:
\begin{minted}{latex}
\cite[23]{key}
\end{minted}

Means \enquote{cite the entry {\bibkey key}, and precise this we are referring to the p.~23 of this entry.}

However, historian or philologist can want to precise an other information: the source division, which for an old text is independent of the edition. Mostly, this source division is something like: book, chapter, section, but it can have an other scheme. The source division is printed after the book name, but before the publication information (translator, address, publisher). The book division doesn't prevent printing the page number. 

For example,  citing the work of Augustine \emph{De Doctrina Christiana} in the book~II, chapter~\textsc{viii} section~13 in French translation of the \emph{\selectlanguage{french}Bibliothèque Augustinienne}:

\begin{quotation}
\cite[(II, \textsc{viii}, 13)152-154]{Augustin_DeDoctChr_BA}
\end{quotation}

And the same passage in the edition of the \emph{\selectlanguage{latin}Corpus Christianorum Series Latina}:
\begin{quotation}
\cite[(II, \textsc{viii}, 13)39-40]{Augustin_DeDoctChr_CCSL}
\end{quotation}

As you can see, the passage is the same, but the pagination is not the same.
However, the biblatex package doesn't provide easy tools to change both the page number and the source division. That is the aim of this package.
\subsection{Credits}

This package was created for Maïeul Rouquette's phd dissertation\footnote{\url{http://apocryphes.hypothese.org}.} in 2013. It is licensed on the \emph{\LaTeX\ Project Public License}\footnote{\url{http://latex-project.org/lppl/lppl-1-3c.html}.}. 
Its code is freely inspired of a contribution of Andrey Boruvka\footnote{\url{http://tex.stackexchange.com/q/95110/}.}.

All issues can be submitted, in French or English, in the GitHub issues page\footnote{\url{https://github.com/maieul/biblatex-source-division/issues}.}.

\section{Usage}

The package is to be used in combination of \biblatex citestyle of the \emph{verbose} family.
It must be loaded after the \biblatex package.
\begin{minted}{tex}
\usepackage[citestyle=verbose-***,...]{biblatex}
\usepackage{biblatex-source-division}
\end{minted}

When citing a reference (with \cmd{cite}, \cmd{footcite} or other citation command),  the division of source is added in parenthesis in the \opt{postnote} arg. The syntax of the rest of the \opt{postnote} arg is the normal syntax of \biblatex.

For example, our \file{.bib} used for texts in this documentation introduction is:

\inputminted{tex}{biblatex-source-division.bib}

And we called them with :

\begin{minted}{latex}
\cite[(II, \textsc{viii}, 13)152-154]{Augustin_DeDoctChr_BA}

\cite[(II, \textsc{viii}, 13)39-40]{Augustin_DeDoctChr_CCSL}
\end{minted}

\subsection{Option}

\label{after}If a \bibfield{maintitle} field is defined for an entry, the source division will be print after it. However, you can load the package with \verb+after=title+ option to print the source division after the \bibfield{title} field.

\subsection{Styling}

The division of source is put on the \bibfield{titleaddon} field. 
However, if a \bibfield{maintitle} field is used and if the \verb+after+ option is not set to \verb+title+, the division source is put on the \bibfield{maintitleaddon} field.

So you can stylise it with all the tools of biblatex.



\section{Revision History}
\begin{changelog}

\begin{release}{2.4.2}{2017-09-21}
  \item Fix bug with \biblatex option \option{ibidpage} when there is not any source division.
  \item Fix potential conflicts with other package.
\end{release}

\begin{release}{2.4.1}{2016-06-07}
  \item Fix bug when using \cs{volcite} command and related.
\end{release}


\begin{release}{2.4.0}{2016-06-07}
  \item Add error message to know more quickly break compatibility with new releases of biblatex.
\end{release}

\begin{release}{2.3.1}{2015-07-07}
\item Fix compatibility with op. cit. form when using bibstyle `verbose-trad1'.
\end{release}

\begin{release}{2.3.0}{2015-05-15}
\item Add \verb+after+ package option. \see{after}
\end{release}

\begin{release}{2.2.2}{2015-05-12}
\item Fix spurious field separator when source division is used without page number.
\end{release}

\begin{release}{2.2.1}{2014-06-28}
\item Add the source division after the short form of a work, when entry has \bibfield{maintitle} field.
\end{release}

\begin{release}{2.2.0}{2014-06-17}
\item Add the source division after the short form of a work when using verbose citestyle.
\end{release}

\begin{release}{2.1.1}{2014-03-25}
\item Warning if the package is loaded after \emph{bibla­tex-true-citepages-omit}.
\end{release}

\begin{release}{2.1.0}{2014-03-17}
\item Compatibility with \cs{<x>volcites} commands.
\item Add the source division after \emph{maintitle} when using a multi-volume book.
\item Use \cmd{AtEveryCitekey} instead of patching \verb+prenote+ macro.
\end{release}


\begin{release}{2.0.0}{2014-03-15}
\item Use the \emph{xpatch} package to prevent overriding of the  \verb+prenote+ macro.
\item Add the source division after \emph{op. cit.} and \emph{ibid.}.
\end{release}


\begin{release}{1.1.0}{2014-01-19}
\item Compatibility with \cs{<x>volcite} commands.
\end{release}

\begin{release}{1.0.3}{2014-01-16}
\item Fixes bug when no postnote arg is used.
\end{release}

\begin{release}{1.0.2}{2014-01-16}
\item Fixes spurious spaces.
\end{release}

\begin{release}{1.0.1}{2014-01-15}
\item Debug when using in tabular.
\end{release}


\begin{release}{1.0.0}{2013-12-07}
\item First public release.
\end{release}

\end{changelog}
\end{document}