texlive[41298] Master/texmf-dist: biblatex-realauthor (5jun16)
commits+karl at tug.org
commits+karl at tug.org
Tue Jun 7 00:57:41 CEST 2016
Revision: 41298
http://tug.org/svn/texlive?view=revision&revision=41298
Author: karl
Date: 2016-06-07 00:57:41 +0200 (Tue, 07 Jun 2016)
Log Message:
-----------
biblatex-realauthor (5jun16)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/biblatex-realauthor/documentation/biblatex-realauthor.pdf
trunk/Master/texmf-dist/doc/latex/biblatex-realauthor/documentation/biblatex-realauthor.tex
trunk/Master/texmf-dist/doc/latex/biblatex-realauthor/documentation/example-realauthor.bib
trunk/Master/texmf-dist/doc/latex/biblatex-realauthor/documentation/example-realauthor.pdf
trunk/Master/texmf-dist/doc/latex/biblatex-realauthor/documentation/example-realauthor.tex
trunk/Master/texmf-dist/tex/latex/biblatex-realauthor/realauthor.bbx
trunk/Master/texmf-dist/tex/latex/biblatex-realauthor/realauthor.dbx
Modified: trunk/Master/texmf-dist/doc/latex/biblatex-realauthor/documentation/biblatex-realauthor.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/biblatex-realauthor/documentation/biblatex-realauthor.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/biblatex-realauthor/documentation/biblatex-realauthor.tex 2016-06-06 22:57:03 UTC (rev 41297)
+++ trunk/Master/texmf-dist/doc/latex/biblatex-realauthor/documentation/biblatex-realauthor.tex 2016-06-06 22:57:41 UTC (rev 41298)
@@ -20,8 +20,8 @@
subtitle={New data field},
email={maieul <at> maieul <dot> net},
author={Maïeul Rouquette},
- revision={2.3.0},
- date={03/11/2016},
+ revision={2.4.0},
+ date={06/05/2016},
url={https://github.com/maieul/biblatex-realauthor}}
% biblatex
@@ -36,6 +36,8 @@
The standard biblatex fields allow to describe the author of a work, with the so called \bibfield{authors} field. However, some works are published without name, or with pseudonyme, but the scholars know the real author. This package adds a new field \bibfield{realauthor}, to specify the knew real author.
+It also add a new field \bibfield{realeditor}, to specify the knew real editor.
+
\section{Basic use}
\subsection{Requirement}
@@ -43,7 +45,7 @@
The packages require \biblatex~3.3 or later.
\subsection{The .bib file}
-Basically, you just have to add the real author name in the field \bibfield{realauthor}, like in the two following examples:
+Basically, you just have to add the real author / editor name in the field \bibfield{realauthor} / \bibfield{realdeditor}, like in the following examples:
\inputminted{tex}{example-realauthor.bib}
@@ -55,7 +57,19 @@
\usepackage[citestyle=verbose,bibstyle=realauthor]{biblatex}
\end{minted}
-Not that the package patches \verb+author+ and \verb+author/editor+others/translator+others+ macro. If you redefine them, don't forget the patches\footnote{We suppose that, if you redefine them, you could understand the packages.}.
+Not that the package patches some bibmacro.
+If you redefine them, don't forget the patches\footnote{We suppose that, if you redefine them, you could understand the packages.}.
+Here the list of macro patched:
+\begin{itemize}
+ \item author;
+ \item author/editor+others;
+ \item author/translator+others;
+ \item author/editor+others/translator+others;
+ \item bbx:editor;
+ \item byeditor;
+ \item byeditor+others;
+ \item cite:name (patched at the beginning of the document);
+\end{itemize}
\subsection{Example of result}
@@ -80,13 +94,15 @@
Used in a bibliography macro or driver, \cmd{ifuserealauthor}\mprm{true}\mprm{false} expands to \prm{true} if the \opt{userealauthor} option is enabled (either globally or for the current entry), and \prm{false} otherwise.
+There is also a \verb+userealeditor+ option and a \cmd{ifuserealeditor} field, similar, but for \bibfield{realeditor} field.
+
\subsection{Sorting}\label{sorting}
The default sorting schemes \verb+nty+ is problematic, because it doesn't consider the \bibfield{realauthor} field as a name. That is why the package provides two sorting scheme:
\begin{itemize}
- \item \verb|anonymous|, which but considers the \bibfield{realauthor} field to sort list by authors' name. If an entry has both \bibfield{realauthor} and \bibfield{author}, only the \bibfield{author} field we be used.
- \item \verb|anonymous+realauthor|, which push the anonymous texts at the begininng of the list (as the \verb+anonymous+ sorting of the \emph{biblatex-anonymous+} package), but considers the \bibfield{realauthor} field to sort list by authors' name (as the \verb+realauthor+ sorting).
+ \item \verb|realauthor|, which but considers the \bibfield{realauthor} and \bibfield{realeditor} fields to sort list by authors' name. If an entry has both \bibfield{realauthor} and \bibfield{author}, only the \bibfield{author} field will be used.
+ \item \verb|anonymous+realauthor|, which push the anonymous texts at the beginning of the list (as the \verb+anonymous+ sorting of the \emph{biblatex-anonymous+} package), but considers the \bibfield{realauthor} and \bibfield{realeditor} fields to sort list by authors' name (as the \verb+realauthor+ sorting).
\end{itemize}
See the example file to have an illustration.
@@ -98,9 +114,10 @@
\begin{itemize}
\item Disable use of \bibfield{realauthor} as label name.
\item Disable use of \bibfield{realauthor} for sorting.
- \item With the default style, and contrary to the \verb+useauthor+ option, also disable printing of \bibfield{realauthor}.
+ \item Before the version 2.4.0. with the default style, and contrary to the \verb+useauthor+ option, also disabled printing of \bibfield{realauthor}. From version 2.4.0, if you don't want to print the field, don't use the package\ldots.
\end{itemize}
+The same is true for \opt{realeditor} option for the \bibfield{realeditor}.
\section{Customization}
@@ -116,6 +133,8 @@
\newcommand{\realauthorequalsign}{\addnbthinspace=\addnbthinspace}
\end{minted}
+There are also \cmd{mkrealeditor}, which by default calls \cmd{mkrealauthor}, and \cmd{realeditorequalsign}, which by default calls \cmd{realauthorequalsign}.
+
For more customization, you have to redefine the macros defined in \file{realauthor.bbx}.
@@ -136,6 +155,12 @@
\begin{changelog}
+ \begin{release}{2.4.0}{2016-06-05}
+ \item Adds \bibfield{realeditor}.
+ \item Restores normal behavior of \opt{userealeditor}.
+ \item Uses \bibfield{realauthor} / \bibfield{realeditor} in the abreviatted form of citation.
+ \end{release}
+
\begin{release}{2.3.0}{2016-03-11}
\item Compatibility with biblatex 3.3.
\end{release}
Modified: trunk/Master/texmf-dist/doc/latex/biblatex-realauthor/documentation/example-realauthor.bib
===================================================================
--- trunk/Master/texmf-dist/doc/latex/biblatex-realauthor/documentation/example-realauthor.bib 2016-06-06 22:57:03 UTC (rev 41297)
+++ trunk/Master/texmf-dist/doc/latex/biblatex-realauthor/documentation/example-realauthor.bib 2016-06-06 22:57:41 UTC (rev 41298)
@@ -17,6 +17,15 @@
sur l'Histoire Critique du Vieux Testament},
Year = {1686}}
+
+ at book{Nausea1531,
+ Address = {Cologne},
+ Pagination = {folio},
+ Publisher = {Quentel},
+ Realeditor = {Friedrich Nausea},
+ Title = {Anonymi Philalethi Eusebiani in vitas, miracula, passionesque Apostolorum Rhapsodiae},
+ Year = {1531}
+}
@book{noauthor-norealauthor,
Title = {Here an anonymous work},
}
Modified: trunk/Master/texmf-dist/doc/latex/biblatex-realauthor/documentation/example-realauthor.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/biblatex-realauthor/documentation/example-realauthor.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/biblatex-realauthor/documentation/example-realauthor.tex 2016-06-06 22:57:03 UTC (rev 41297)
+++ trunk/Master/texmf-dist/doc/latex/biblatex-realauthor/documentation/example-realauthor.tex 2016-06-06 22:57:41 UTC (rev 41298)
@@ -1,6 +1,7 @@
\documentclass{article}
-\usepackage[bibstyle=verbose, citestyle=verbose-trad2,bibstyle=realauthor]{biblatex}
+\usepackage[citestyle=verbose-trad2,bibstyle=realauthor]{biblatex}
+\usepackage{libertineotf}
\bibliography{example-realauthor.bib}
@@ -20,6 +21,8 @@
\cite{noauthor-norealauthor2}
+\cite{Nausea1531}
+
\newrefcontext[sorting=nty]
\printbibliography[title={Default sorting (nty)}]
Modified: trunk/Master/texmf-dist/tex/latex/biblatex-realauthor/realauthor.bbx
===================================================================
--- trunk/Master/texmf-dist/tex/latex/biblatex-realauthor/realauthor.bbx 2016-06-06 22:57:03 UTC (rev 41297)
+++ trunk/Master/texmf-dist/tex/latex/biblatex-realauthor/realauthor.bbx 2016-06-06 22:57:41 UTC (rev 41298)
@@ -13,7 +13,7 @@
% The Current Maintainer of this work is Maïeul Rouquette
% This work consists of the files realauthor.dbx, realauthor.bbx
\ProvidesFile{realauthor.dbx}
-[2016/03/11 v2.3.0 biblatex bibliography style (MR)]
+[2016/06/05 v2.4.0 biblatex bibliography style (MR)]
\ifdef{\biblatexmultipledm at bibstyle}
{\RequireBibliographyStyle{\biblatexmultipledm at bibstyle}}
@@ -30,6 +30,7 @@
\field{realauthor}
\field{shorteditor}
\field{editor}
+ \field{realeditor}%
\field{translator}}
% Command for being redefined
@@ -42,6 +43,13 @@
\newcommand{\mkrealauthor}[1]{\mkbibbrackets{#1}}
\newcommand{\realauthorequalsign}{\addnbthinspace=\addnbthinspace}
+\newcommand{\mkbibrealeditor}[1]{%
+ \ifnameundef{editor}%
+ {\mkrealeditor{#1}}%
+ {\mkrealeditor{\realeditorequalsign#1}}%
+}
+\newcommand{\mkrealeditor}[1]{\mkrealauthor{#1}}%
+\newcommand{\realeditorequalsign}{\realauthorequalsign}%
% A format which could be overrided
\DeclareNameFormat{realauthor}{%
@@ -58,16 +66,28 @@
}%
\usebibmacro{name:andothers}}}
+\DeclareNameFormat{realeditor}{%
+ \nameparts{#1}%
+ \mkbibrealeditor{%
+ \ifboolexpr{test {\ifbibliography} and test {\ifnameundef{editor}}}%
+ {\ifgiveninits%
+ {\usebibmacro{name:family-given}{\namepartfamily}{\namepartgiveni}{\namepartprefix}{\namepartsuffix}}%
+ {\usebibmacro{name:family-given}{\namepartfamily}{\namepartgiven}{\namepartprefix}{\namepartsuffix}}%
+ }%
+ {\ifgiveninits%
+ {\usebibmacro{name:given-family}{\namepartfamily}{\namepartgiveni}{\namepartprefix}{\namepartsuffix}}%
+ {\usebibmacro{name:given-family}{\namepartfamily}{\namepartgiven}{\namepartprefix}{\namepartsuffix}}%
+ }%
+ \usebibmacro{name:andothers}}}
% Patching some standard bibmacros
%% For the drivers
\xapptobibmacro{author}{%
- \ifuserealauthor{%
\ifnameundef{author}{}{%
- \ifnameundef{realauthor}{}{\addspace\nopunct}%
+ \ifnameundef{realauthor}{}{\addspace\nopunct}%
}%
\printnames{realauthor}%
- }{}%
+ {}%
}{}{}
\xpatchbibmacro{author/editor+others}
@@ -89,20 +109,128 @@
{}
{}
+
+\xpatchbibmacro{author/editor+others/translator+others}
+ {\ifboolexpr{
+ test \ifuseeditor
+ and
+ not test {\ifnameundef{editor}}
+ }%
+ }
+ {\ifboolexpr{
+ (test \ifuseeditor%
+ and
+ not test {\ifnameundef{editor}}%
+ )
+ or
+ (test \ifuserealeditor%
+ and
+ not test {\ifnameundef{realeditor}}%
+ )%
+ }%
+ }
+{}{}
+
+
+
+
+\xpatchbibmacro{bbx:editor}
+ {\ifboolexpr{
+ test \ifuseeditor
+ and
+ not test {\ifnameundef{editor}}
+ }}
+ {\ifboolexpr{
+ (test \ifuseeditor%
+ and
+ not test {\ifnameundef{editor}}%
+ )
+ or
+ (test \ifuserealeditor%
+ and
+ not test {\ifnameundef{realeditor}}%
+ )%
+ }%
+ }
+{}{}
+\xpatchbibmacro{bbx:editor}
+ {\clearname{editor}}
+ {\clearname{editor}
+ \clearname{realeditor}
+ }
+{}{}
+
+\xpatchbibmacro{bbx:editor}
+ {\printnames{editor}}%
+ {\printnames{editor}%
+ \usebibmacro{printeditor}%
+ }%
+{}{}
+
+
+\xpatchbibmacro{byeditor}
+ {\ifnameundef{editor}}%
+ {\ifboolexpr{test{\ifnameundef{editor}} and test{\ifnameundef{realeditor}}}}%
+{}{}
+
+\xpatchbibmacro{byeditor}
+ {\printnames[byeditor]{editor}}%
+ {\usebibmacro{printbyeditor+realeditor}}
+{}{}
+
+\xpatchbibmacro{byeditor+others}
+ {\ifnameundef{editor}}%
+ {\ifboolexpr{test{\ifnameundef{editor}} and test{\ifnameundef{realeditor}}}}%
+{}{}
+
+\xpatchbibmacro{byeditor+others}
+ {\printnames[byeditor]{editor}}%
+ {\usebibmacro{printbyeditor+realeditor}}
+{}{}
+
+\newbibmacro{printbyeditor+realeditor}{%
+ \printnames[byeditor]{editor}%
+ \ifnameundef{editor}{}{%
+ \ifnameundef{realeditor}{}{\addspace\nopunct}%
+ }%
+ \printnames{realeditor}%
+}
+
+\newbibmacro{printeditor}{%
+ \ifnameundef{editor}{}{%
+ \ifnameundef{realeditor}{}{\addspace\nopunct}%
+ }%
+ \printnames{realeditor}%
+}
+
%% For the shorter version
\newbibmacro{realauthor:as:labelname}{%
- \ifnamesequal{labelname}{realauthor}%
- {\printnames{realauthor}}%
- {\printnames{labelname}%
- \ifnameundef{realauthor}{}{\addspace\nopunct}%
- \printnames{realauthor}%
- }%
+ \ifboolexpr{%
+ test {\ifnamesequal{labelname}{realauthor}}%
+ or
+ test {\ifnamesequal{labelname}{realeditor}}%
+ }{%
+ \ifnamesequal{labelname}{realauthor}%
+ {\printnames{realauthor}}%
+ {\printnames{realeditor}}%
+ }%
+ {%
+ \printnames{labelname}%
+ \ifnamesequal{labelname}{author}{%
+ \ifnameundef{realauthor}{}{\addspace\nopunct}%
+ \printnames{realauthor}%
+ }{}%
+ \ifnamesequal{labelname}{editor}{%
+ \ifnameundef{realeditor}{}{\addspace\nopunct}%
+ \printnames{realeditor}%
+ }{}%
+ }%
}
-\xpatchbibmacro{cite:name}{\printnames{labelname}}{\usebibmacro{realauthor:as:labelname}}{}{}
+\AtBeginDocument{%
+ \xpatchbibmacro{cite:name}{\printnames{labelname}}{\usebibmacro{realauthor:as:labelname}}{}{}
+}
-
-
% Sorting
@@ -118,6 +246,7 @@
\field{author}
\field{realauthor}
\field{editor}
+ \field{realeditor}
\field{translator}
\field{sorttitle}
\field{title}
@@ -148,6 +277,7 @@
\field{author}
\field{realauthor}
\field{editor}
+ \field{realeditor}
\field{translator}
\literal{0000}
}
Modified: trunk/Master/texmf-dist/tex/latex/biblatex-realauthor/realauthor.dbx
===================================================================
--- trunk/Master/texmf-dist/tex/latex/biblatex-realauthor/realauthor.dbx 2016-06-06 22:57:03 UTC (rev 41297)
+++ trunk/Master/texmf-dist/tex/latex/biblatex-realauthor/realauthor.dbx 2016-06-06 22:57:41 UTC (rev 41298)
@@ -13,8 +13,8 @@
% The Current Maintainer of this work is Maïeul Rouquette
% This work consists of the files realauthor.dbx, realauthor.bbx
\ProvidesFile{realauthor.dbx}
-[2016/03/11 v2.3.0 biblatex bibliography style (MR)]
+[2016/06/05 v2.4.0 biblatex bibliography style (MR)]
-\DeclareDatamodelFields[type=list,datatype=name]{realauthor}
-\DeclareDatamodelEntryfields{realauthor}
+\DeclareDatamodelFields[type=list,datatype=name]{realauthor,realeditor}
+\DeclareDatamodelEntryfields{realauthor,realeditor}
\endinput
\ No newline at end of file
More information about the tex-live-commits
mailing list