Commit 25eec0cd authored by Maïeul Rouquette's avatar Maïeul Rouquette

Merge branch 'issue1'

parents 470e0409 dd77698c
......@@ -24,8 +24,8 @@
subtitle={New data fields},
email={maieul <at> maieul <dot> net},
author={Maïeul Rouquette},
revision={1.1.0},
date={07/06/2016},
revision={1.2.0},
date={24/02/2017},
url={https://git.framasoft.org/maieul/biblatex-subseries}}
% biblatex
......@@ -38,18 +38,24 @@
\tableofcontents
\section{Introduction}
Some publishers organize book series with subseries. In this case, two numbers are associated with one volume: the number inside the series and the number inside the subseries. That is the case of the series \emph{\foreignlanguage{latin}{Corpus Scriptorium Christianorum Orientalium}} published by Peeters.\footnote{\url{http://www.peeters-leuven.be/search_serie_book.asp?nr=94}}
Some publishers organize book series with subseries. In this case, two numbers are associated with one volume: the number inside the series and the number inside the subseries. That is the case, for example, of the series \emph{\foreignlanguage{latin}{Corpus Scriptorium Christianorum Orientalium}} published by Peeters.\footnote{\url{http://www.peeters-leuven.be/search_serie_book.asp?nr=94}.}
Sometime, there is also subsubseries, and number for subsubseries.
This package provides new fields to manage such system.
\section{Basic use}
\subsection{The .bib file}
You can use three more fields:
You can use six additional fields:
\begin{fieldlist}
\fielditem{shortsubseries}{literal\LFMark} The shorthand form of the subseries. Not used by default styles.
\fielditem{subnumber}{literal} The number of the book inside the subseries.
\fielditem{subseries}{literal} The subseries.
\fielditem{shortsubsubseries}{literal\LFMark} The shorthand form of the subsubseries. Not used by default styles.
\fielditem{subsubnumber}{literal} The number of the book inside the subsubseries.
\fielditem{subsubseries}{literal} The subsubseries.
\end{fieldlist}
......@@ -74,7 +80,9 @@ Here, an example of result with the default setting:
\section{Customization}
You can redefine \cmd{subseriesseparator} to change the separator between series and subseries.
If you want to customize the \verb+series+number+ bibmacro, do not forget to call the \verb|subseries+subnumber| bibmacro inside. You can also redefine it.
If you want to customize the \verb+series+number+ bibmacro, do not forget to call the \verb|subseries+subnumber| bibmacro inside.
You can also redefine this macro, and redefine the \verb+subsubseries+subsubnumber+ bibmacro which is called by the \verb|subseries+subnumber| bibmacro.
\section{Use with other packages which provide new fields}
......@@ -92,6 +100,10 @@ All issues can be submitted, in French or English, in the Framagit issues page.\
\begin{changelog}
\begin{release}{1.2.0}{2017-02-24}
\item Add \bibfield{subsubseries}, \bibfield{subsubnumber} and \bibfield{shortsubsubseries} fields.
\end{release}
\begin{release}{1.1.0}{2016-06-07}
\item Add error message to know more quickly break compatibility with new releases of biblatex.
\end{release}
......
......@@ -13,7 +13,7 @@
% The Current Maintainer of this work is Maïeul Rouquette
% This work consists of the files subseries.dbx, subseries.bbx
\ProvidesFile{subseries.dbx}
[2016/06/07 v1.1.0 biblatex bibliography style (MR)]
[2017/02/24 v1.2.0 biblatex bibliography style (MR)]%
\ifdef{\biblatexmultipledm@bibstyle}
{\RequireBibliographyStyle{\biblatexmultipledm@bibstyle}}
......@@ -21,16 +21,32 @@
\RequirePackage{xpatch}
\newcommand{\subseries@failtopatch}[1]{\PackageError{biblatex-subseries}{Unable to patch `#1` bibmacro}{}}
\xapptobibmacro{series+number}{\usebibmacro{subseries+subnumber}}{}{}%Patch the standard bibmacro series+number
\newcommand{\subseries@failtopatch}[1]{%
\PackageError{biblatex-subseries}{Unable to patch `#1` bibmacro}{}%
}%
%Patch the standard bibmacro series+number
\xapptobibmacro{series+number}%
{\usebibmacro{subseries+subnumber}}%
{}%
{\subseries@failtopatch{series+number}}%
\newbibmacro{subseries+subnumber}{%A default subseries+subnumber style
\setunit *{\subseriesseparator}%
\setunit*{\subseriesseparator}%
\printfield{subseries}%
\setunit *{\addspace}%
\setunit*{\addspace}%
\printfield{subnumber}%
\usebibmacro{subsubseries+subsubnumber}%
\newunit%
}
\newcommand{\subseriesseparator}{\addspace---\addspace}
\newbibmacro{subsubseries+subsubnumber}{%
\setunit*{\subsubseriesseparator}%
\printfield{subsubseries}%
\setunit*{\addspace}%
\printfield{subsubnumber}%
}%
\newcommand{\subseriesseparator}{\addspace---\addspace}%
\newcommand{\subsubseriesseparator}{\subseriesseparator}%
\endinput
%% Copyright 2014 Maïeul Rouquette
%% Copyright 2014-… Maïeul Rouquette
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
......@@ -13,11 +13,16 @@
% The Current Maintainer of this work is Maïeul Rouquette
% This work consists of the files subseries.dbx, subseries.bbx
\ProvidesFile{subseries.dbx}
[2015/05/14 v1.0.0a biblatex bibliography style (MR)]
[2017/02/24 v1.2.0 biblatex bibliography style (MR)]
\DeclareDatamodelFields[type=field,datatype=literal]{%
subnumber,%
subseries,%
subsubnumber,%
subsubseries,%
}
\DeclareDatamodelFields[type=field,datatype=literal,label=true]{%
shortsubseries,%
shortsubsubseries%
}
\DeclareDatamodelFields[type=field,datatype=literal,label=true]{shortsubseries}
\endinput
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment