\documentclass{ltxdockit}[2011/03/25]
\usepackage{btxdockit}
\usepackage{fontspec}
\usepackage[mono=false]{libertine}
\usepackage{microtype}
\usepackage[american]{babel}
\usepackage[strict]{csquotes}
\setmonofont[Scale=MatchLowercase]{DejaVu Sans Mono}
\usepackage{shortvrb}
\usepackage{pifont}
\usepackage{minted}
% Usefull commands
\newcommand{\biblatex}{biblatex\xspace}
\pretocmd{\bibfield}{\sloppy}{}{}
\pretocmd{\bibtype}{\sloppy}{}{}
\newcommand{\namebibstyle}[1]{\texttt{#1}}
% Meta-datas
\titlepage{%
	title={Book in @article and book in @incollection with biblatex},
	subtitle={New data types},
	email={maieul <at> maieul <dot> net},
	author={Maïeul Rouquette},
	revision={1.1.2},
	date={05/02/2015},
	url={https://github.com/maieul/biblatex-bookinarticle}}

% biblatex
\usepackage[citestyle=verbose]{biblatex}
\usepackage{biblatex-bookinarticle}
\addbibresource{example.bib}
\addbibresource{example-bookinincollection.bib}

\begin{document}

\printtitlepage
\tableofcontents

\section{Introduction}

In classical philology, it happens that ancient books are edited by modern scholar. So, when we refer to them, we have to not refer to the article, but, indeed, to the \emph{book which is in the article}.

This package allows to create entry which's type is \bibtype{bookinarticle}, and which are printed like this:

\begin{quotation}
\cite{BHG226e}
\end{quotation}

It also allows to create entry which's type is \bibtype{bookinincollection}, for book edited in a article of a collection. 

\begin{quotation}
  \cite{AcTiteLatin}
\end{quotation}

\section{Use}

\subsection{\bibtype{bookinarticle} Entry Type}

A new entrytype is defined: \bibtype{bookinarticle}. It use the standard fields of a \bibfield{article}, with those changes:

\begin{itemize}
	\item \bibfield{author} means the author of the ancient book.
	\item \textbf{\bibfield{bookauthor} means the author of the article where the book is edited, e.g. the modern editor of the book}.
	\item \bibfield{mainsubtitle} means the subtitle of the article where the book is edited.
	\item \bibfield{maintitle} means the title of the article where the book is edited. In our example \enquote{Un mémoire anonyme sur saint Barnabé (BHG 226e)}.
	\item \bibfield{pages} means the pages where the book is edited.
	\item \bibfield{substitle} means the subtitle of the edited book.
	\item \bibfield{title} means the title of the edited book. In our example \enquote{Mémoire sur le saint apôtre Barnabé}.


\end{itemize}


\subsection{\bibtype{bookinincollection} Entry Type}

A new entrytype is defined: \bibtype{bookinincollection}. It use the standard fields of a \bibfield{inincollection}, with those changes:

\begin{itemize}
	\item \bibfield{author} means the author of the ancient book.
	\item \textbf{\bibfield{bookauthor} means the author of the article where the book is edited, e.g. the modern editor of the book}.
	\item \bibfield{booksubtitle} means the subtitle of the article where the book is edited.
	\item \bibfield{booktitle} means the title of the article where the book is edited. 
	\item \bibfield{maintitle} means the title of the collection were the article is published.
	\item \bibfield{mainsubtitle} means the subtitle of the collection were the article is published.
	\item \bibfield{pages} means the pages where the book is edited.
	\item \bibfield{substitle} means the subtitle of the edited book.
	\item \bibfield{title} means the title of the edited book. In our example \enquote{Mémoire sur le saint apôtre Barnabé}.


\end{itemize}


\subsection{Crossref's use}

You can also use the Biber's crossref's facilities.

\subsubsection{For \bibtype{bookinarticle}}
The \bibfield{crossfield} of a \bibtype{bookinarticle} entry refering to a \bibtype{article} entry. The fields are inherited from \bibtype{article} following these rule:

\begin{itemize}
	\item \bibfield{author} becomes \bibfield{bookauthor}.
	\item \bibfield{title} becomes \bibfield{maintitle}.
	\item \bibfield{subtitle} becomes \bibfield{maisubtitle}.

\end{itemize}

See the following example:

\inputminted{latex}{example.bib}

\subsubsection{For \bibtype{bookinincollection}}

The \bibfield{crossfield} of a \bibtype{bookinincollection} entry refering to a \bibtype{inincollection} entry. The fields are inherited from \bibtype{inincollection} following these rule:

\begin{itemize}
	\item \bibfield{author} becomes \bibfield{bookauthor}.
	\item \bibfield{booktitle} becomes \bibfield{maintitle}.
	\item \bibfield{booksubtitle} becomes \bibfield{mainsubtitle}.
	\item \bibfield{title} becomes \bibfield{booktitle}.
	\item \bibfield{subtitle} becomes \bibfield{booksubtitle}.

\end{itemize}

See the following example:

\inputminted{latex}{example-bookinincollection.bib}
\subsection{\bibtype{inarticle} Entry Type}

The package also provides a \bibtype{inarticle} Entry Type, to show a section of an article with its own title. It's like \bibtype{bookinarticle}, but the \bibtype{title} field is printed with italic, and not with quotation marks.


\subsection{\bibtype{inincollection} Entry Type}

The package also provides a \bibtype{inincollection} Entry Type, to show a section of an article with its own title. It's like \bibtype{bookinincollection}, but the \bibtype{title} field is printed with italic, and not with quotation marks.

\subsection{Loading package}

The package must be loaded after the \biblatex package:
\begin{minted}{latex}
\usepackage[…]{biblatex}
\usepackage{biblatex-bookinarticle}
\end{minted}

\subsection{Loading package}

The package must be loaded after the \biblatex package:
\begin{minted}{latex}
\usepackage[…]{biblatex}
\usepackage{biblatex-bookinarticle}
\end{minted}

\subsection{Customization}

The ways which \bibtype{bookinarticle} and \bibtype{bookinincollection} are printed are derivated from the \emph{verbose} bibliographic style. You can customize it by overriding bibliographic macros or bibliographic driver. Look at the file \verb+biblatex-bookinarticle+.

\section{Credits}

This package was created for Maïeul Rouquette's phd dissertation\footnote{\url{http://apocryphes.hypothese.org}.} in 2014. It is licensed on the \emph{\LaTeX\ Project Public License}\footnote{\url{http://latex-project.org/lppl/lppl-1-3c.html}.}. 


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


\section{Change history}


\begin{changelog}

\begin{release}{1.1.2}{2015-02-05}
\item Use the \bibfield{shortauthor} field to define the \bibfield{labelname} field (useful for some citation style, like authortitle).
\end{release}

\begin{release}{1.1.1}{2014-11-03}
\item Delete a false and not need test in the driver.
\item Compatibility with biblatex-dw family's styles.
\end{release}
\begin{release}{1.1.0}{2014-10-09}
\item Add \bibtype{bookinincollection} and \bibtype{inincollection}.
\end{release}

\begin{release}{1.0.0}{2014-07-02}
\item First public release.
\end{release}
\end{changelog}
\end{document}
