From 02f01f7ec631cb85a67d59c9be5ab48e9d936d30 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 14 Jun 2015 17:53:25 +0000 Subject: biblatex-opcit-booktitle (6jun15) git-svn-id: svn://tug.org/texlive/trunk@37533 c570f23f-e606-0410-a88d-b1316a301751 --- .../doc/latex/biblatex-opcit-booktitle/README | 8 + .../biblatex-opcit-booktitle-example.bib | 71 ++++++++ .../biblatex-opcit-booktitle-example.pdf | Bin 0 -> 20152 bytes .../biblatex-opcit-booktitle-example.tex | 28 +++ .../documentation/biblatex-opcit-booktitle.pdf | Bin 0 -> 70187 bytes .../documentation/biblatex-opcit-booktitle.tex | 190 +++++++++++++++++++++ .../documentation/latexmkrc | 2 + .../documentation/makefile | 5 + .../doc/latex/biblatex-opcit-booktitle/makefile | 16 ++ .../biblatex-opcit-booktitle.sty | 94 ++++++++++ Master/tlpkg/bin/tlpkg-ctan-check | 6 +- .../tlpkg/tlpsrc/biblatex-opcit-booktitle.tlpsrc | 0 Master/tlpkg/tlpsrc/collection-bibtexextra.tlpsrc | 1 + 13 files changed, 419 insertions(+), 2 deletions(-) create mode 100644 Master/texmf-dist/doc/latex/biblatex-opcit-booktitle/README create mode 100644 Master/texmf-dist/doc/latex/biblatex-opcit-booktitle/documentation/biblatex-opcit-booktitle-example.bib create mode 100644 Master/texmf-dist/doc/latex/biblatex-opcit-booktitle/documentation/biblatex-opcit-booktitle-example.pdf create mode 100644 Master/texmf-dist/doc/latex/biblatex-opcit-booktitle/documentation/biblatex-opcit-booktitle-example.tex create mode 100644 Master/texmf-dist/doc/latex/biblatex-opcit-booktitle/documentation/biblatex-opcit-booktitle.pdf create mode 100644 Master/texmf-dist/doc/latex/biblatex-opcit-booktitle/documentation/biblatex-opcit-booktitle.tex create mode 100644 Master/texmf-dist/doc/latex/biblatex-opcit-booktitle/documentation/latexmkrc create mode 100644 Master/texmf-dist/doc/latex/biblatex-opcit-booktitle/documentation/makefile create mode 100644 Master/texmf-dist/doc/latex/biblatex-opcit-booktitle/makefile create mode 100644 Master/texmf-dist/tex/latex/biblatex-opcit-booktitle/biblatex-opcit-booktitle.sty create mode 100644 Master/tlpkg/tlpsrc/biblatex-opcit-booktitle.tlpsrc diff --git a/Master/texmf-dist/doc/latex/biblatex-opcit-booktitle/README b/Master/texmf-dist/doc/latex/biblatex-opcit-booktitle/README new file mode 100644 index 00000000000..11f59929694 --- /dev/null +++ b/Master/texmf-dist/doc/latex/biblatex-opcit-booktitle/README @@ -0,0 +1,8 @@ +When citing subentry, use also the op. cit. for the title of the main entry + + +Maïeul Rouquette - 2015… - LPPL 1.3, from Paul Stanley 2014 (http://tex.stackexchange.com/a/172777/7712) + +http://latex-project.org/lppl/lppl-1-3c.html + +Feature requests and bug reports can be made in https://git.framasoft.org/maieul/biblatex-opcit-booktitle/issues \ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/biblatex-opcit-booktitle/documentation/biblatex-opcit-booktitle-example.bib b/Master/texmf-dist/doc/latex/biblatex-opcit-booktitle/documentation/biblatex-opcit-booktitle-example.bib new file mode 100644 index 00000000000..ba9bd9ffd5c --- /dev/null +++ b/Master/texmf-dist/doc/latex/biblatex-opcit-booktitle/documentation/biblatex-opcit-booktitle-example.bib @@ -0,0 +1,71 @@ + + +@incollection{Klausner1997, + Author = {David N. Klausner}, + Crossref = {Izydorczyk1997}, + Pages = {403-425}, + Title = {The \emph{Gospel of Nicodemus} in the Literature of Medieval Wales}} + +@incollection{Ogorman1997, + Author = {Richard O'Gorman}, + Crossref = {Izydorczyk1997}, + Pages = {103-131}, + Title = {The \emph{Gospel of Nicodemus} in the Vernacular Literatur of Medieval France}} + +@collection{Izydorczyk1997, + Address = {Tempe}, + Editor = {Izydorczyk, Zbigniew}, + Publisher = {Medieval \& Renaissance Texts \& Studies}, + Subtitle = {Texts, Intertexts, and Contexts in Western Europe}, + Title = {The Medieval \emph{Gospel of Nicodemus}}, + Year = {1997}} + +@book{Pleiade2, + Address = {Paris}, + Number = {516}, + Publisher = {Gallimard}, + Series = {Bibliothèque de la Pléiade}, + Title = {Écrits apocryphes chrétiens}, + Volume = {2}, + Year = {2005}} + +@bookinbook{Pleiade_Barnabe, + Annotator = {Enrico Norelli}, + Crossref = {Pleiade2}, + Pages = {627-642}, + Title = {Actes de Barnabé}, + Translator = {Enrico Norelli}} + +@bookinbook{Pleiade_Tite, + Annotator = {Willy Rordorf}, + Bhg = {1850z}, + Crossref = {Pleiade2}, + Pages = {609-615}, + Title = {Actes de Tite}, + Translator = {Willy Rordorf}} + +@book{Schermann1907, + Address = {Leipzig}, + Editor = {Theodor Schermann}, + Publisher = {Teubner}, + Title = {Prophetarum vitae fabulosae indices apostolorum discipulorumque Domini Dorotheo · Epiphanio · Hippolyto aliisque vindicata}, + Year = {1907} +} + +@bookinbook{Pseudo-Hippolyte, + Author = {{Pseudo-Hippolyte}}, + Crossref = {Schermann1907}, + Pages = {163-170}, + Title = {Index apostolorum discipulorumque Domini}} + +@bookinbook{Pseudo-Epiphane, + Author = {{Pseudo-Épiphane}}, + Crossref = {Schermann1907}, + Pages = {107-126}, + Title = {Index apostolorum discipulorumque Domini}} + +@bookinbook{Pseudo-Dorothee, + Author = {{Pseudo-Dorothée}}, + Crossref = {Schermann1907}, + Pages = {131-160}, + Title = {Index apostolorum discipulorumque Domini}} diff --git a/Master/texmf-dist/doc/latex/biblatex-opcit-booktitle/documentation/biblatex-opcit-booktitle-example.pdf b/Master/texmf-dist/doc/latex/biblatex-opcit-booktitle/documentation/biblatex-opcit-booktitle-example.pdf new file mode 100644 index 00000000000..e8bfc692e73 Binary files /dev/null and b/Master/texmf-dist/doc/latex/biblatex-opcit-booktitle/documentation/biblatex-opcit-booktitle-example.pdf differ diff --git a/Master/texmf-dist/doc/latex/biblatex-opcit-booktitle/documentation/biblatex-opcit-booktitle-example.tex b/Master/texmf-dist/doc/latex/biblatex-opcit-booktitle/documentation/biblatex-opcit-booktitle-example.tex new file mode 100644 index 00000000000..9c4e11394e2 --- /dev/null +++ b/Master/texmf-dist/doc/latex/biblatex-opcit-booktitle/documentation/biblatex-opcit-booktitle-example.tex @@ -0,0 +1,28 @@ +\documentclass{article} +\usepackage{fontspec} +\usepackage{polyglossia} +\setmainlanguage{french} +\usepackage[bibstyle=verbose,citestyle=verbose-trad2,citepages=omit]{biblatex} +\usepackage{biblatex-opcit-booktitle} +\bibliography{biblatex-opcit-booktitle-example.bib} +\renewcommand{\mkibid}[1]{\emph{#1}} +\begin{document} + + +\cite{Klausner1997} + + + +\cite{Pleiade_Barnabe} + +\cite{Klausner1997} + +\cite[23]{Pseudo-Epiphane} + +\cite{Ogorman1997} + +\cite{Pleiade_Tite} + +\cite[22]{Pseudo-Hippolyte} +\end{document} + diff --git a/Master/texmf-dist/doc/latex/biblatex-opcit-booktitle/documentation/biblatex-opcit-booktitle.pdf b/Master/texmf-dist/doc/latex/biblatex-opcit-booktitle/documentation/biblatex-opcit-booktitle.pdf new file mode 100644 index 00000000000..aa248ae4b32 Binary files /dev/null and b/Master/texmf-dist/doc/latex/biblatex-opcit-booktitle/documentation/biblatex-opcit-booktitle.pdf differ diff --git a/Master/texmf-dist/doc/latex/biblatex-opcit-booktitle/documentation/biblatex-opcit-booktitle.tex b/Master/texmf-dist/doc/latex/biblatex-opcit-booktitle/documentation/biblatex-opcit-booktitle.tex new file mode 100644 index 00000000000..16b24823565 --- /dev/null +++ b/Master/texmf-dist/doc/latex/biblatex-opcit-booktitle/documentation/biblatex-opcit-booktitle.tex @@ -0,0 +1,190 @@ +\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} +\setminted{breaklines} + +% Usefull commands +\newcommand{\biblatex}{biblatex\xspace} +\pretocmd{\bibfield}{\sloppy}{}{} +\pretocmd{\bibtype}{\sloppy}{}{} +\newcommand{\namebibstyle}[1]{\texttt{#1}} +% Meta-datas +\titlepage{% + title={\emph{Op. cit.} for booktitle field}, + subtitle={Abbreviated references}, + email={maieul maieul net}, + author={Maïeul Rouquette}, + revision={1.0.2}, + date={2015/06/05}, + url={https://git.framasoft.org/maieul/biblatex-opcit-booktitle}} + +% biblatex +\usepackage[citestyle=verbose-trad2]{biblatex} +\addbibresource{biblatex-opcit-booktitle-example.bib} +\usepackage{biblatex-opcit-booktitle} + +\begin{document} + +\printtitlepage +\tableofcontents + + +\section{Aim of the package} + +The default citation styles \verb+verbose-trad1+;\verb+verbose-trad2+;\verb+verbose-trad3+ use the \emph{op. cit.} form in order to have shorter reference when a title have been already cited. + +However, when you cite two entries which share the same \bibfield{booktitle} but not the same \bibfield{title}, the \emph{op. cit.} mechanism does not work. + +For example we obtain the following example: + +\begin{quotation} +\makeatletter +\cite{Pleiade_Barnabe} + +\csundef{blx@bsee@\the\c@refsection} + +\cite{Pseudo-Hippolyte} + +\csundef{blx@bsee@\the\c@refsection} + +\cite{Pleiade_Tite} + +\csundef{blx@bsee@\the\c@refsection} + +\cite{Pseudo-Epiphane} +\makeatother +\end{quotation} + +While we would like to obtain: + +\citereset + + +\begin{quotation} + +\cite{Pleiade_Barnabe} + +\cite{Pseudo-Hippolyte} + +\cite{Pleiade_Tite} + +\cite{Pseudo-Epiphane} +\end{quotation} + +The aim of this package is to enable such abbreviation. + +\section{Use} + +The \verb+biblatex-opcit-booktitle+ package must be loaded after the \verb+biblatex+ package. You must use a \verb+verbose-trad+ citation style. For example: + +\begin{minted}{latex} +\usepackage[bibstyle=verbose,citestyle=verbose-trad1,citepages=omit]{biblatex} +\usepackage{biblatex-opcit-booktitle} +\end{minted} + +In order to know when two entry share the same \bibfield{booktitle}, you must use the crossref mechanism of \biblatex. In the case of the previous example, we used: +\begin{minted}{latex} +@book{Pleiade2, + Address = {Paris}, + Number = {516}, + Publisher = {Gallimard}, + Series = {Bibliothèque de la Pléiade}, + Title = {Écrits apocryphes chrétiens}, + Volume = {2}, + Year = {2005}} + +@bookinbook{Pleiade_Barnabe, + Annotator = {Enrico Norelli}, + Crossref = {Pleiade2}, + Pages = {627-642}, + Title = {Actes de Barnabé}, + Translator = {Enrico Norelli}} + +@bookinbook{Pleiade_Tite, + Annotator = {Willy Rordorf}, + Bhg = {1850z}, + Crossref = {Pleiade2}, + Pages = {609-615}, + Title = {Actes de Tite}, + Translator = {Willy Rordorf}} + +@book{Schermann1907, + Address = {Leipzig}, + Editor = {Theodor Schermann}, + Publisher = {Teubner}, + Title = {Prophetarum vitae fabulosae indices apostolorum discipulorumque Domini Dorotheo · Epiphanio · Hippolyto aliisque vindicata}, + Year = {1907} +} + +@bookinbook{Pseudo-Hippolyte, + Author = {{Pseudo-Hippolyte}}, + Crossref = {Schermann1907}, + Pages = {163-170}, + Title = {Index apostolorum discipulorumque Domini}} + +@bookinbook{Pseudo-Epiphane, + Author = {{Pseudo-Épiphane}}, + Crossref = {Schermann1907}, + Pages = {107-126}, + Title = {Index apostolorum discipulorumque Domini}} +\end{minted} + +There is not other thing to do! + +The feature works with these entrytypes: \bibtype{inbook}, \bibtype{incollection}, \bibtype{inproceedings}, \bibtype{bookinbook}. + +\subsection{Limits} + +We have not implemented options to use abbreviation like \verb+ibid+, because we want to have not ambiguous abbreviated forms. + +If you have redefined the \verb+cite+ bibliographic macro, you must changes: +\begin{minted}{latex} +\usebibmacro{cite:full}% + \usebibmacro{cite:save} +\end{minted} + +by: + +\begin{minted}{latex} +\usebibmacro{cite:test:ifrelated} +\end{minted} + +\subsection{Customization} + +You can change the \verb+inbook:rel+ bibliographic driver to customize the way the main title is printed. + +\section{Credits} + +This package was created for Maïeul Rouquette's phd dissertation\footnote{\url{http://apocryphes.hypothese.org}.} in 2015. It is freely inspired by Paul Stanley code.\footnote{\url{http://tex.stackexchange.com/a/172777/7712}.} 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 Framasoft issues page\footnote{\url{https://git.framasoft.org/maieul/biblatex-opcit-booktitle/issues}.}. + + +\section{Change history} + + +\begin{changelog} + +\begin{release}{1.0.2}{2015-06-05} +\item Wrap \enquote{op. cit} in \cmd{mkibid}. +\end{release} + +\begin{release}{1.0.1}{2015-06-03} +\item Correct order of name's part (first name / last name). +\end{release} + +\begin{release}{1.0.0}{2015-05-31} +\item First public release. +\end{release} + +\end{changelog} +\end{document} diff --git a/Master/texmf-dist/doc/latex/biblatex-opcit-booktitle/documentation/latexmkrc b/Master/texmf-dist/doc/latex/biblatex-opcit-booktitle/documentation/latexmkrc new file mode 100644 index 00000000000..d6cfc714fa5 --- /dev/null +++ b/Master/texmf-dist/doc/latex/biblatex-opcit-booktitle/documentation/latexmkrc @@ -0,0 +1,2 @@ +$pdflatex = "xelatex --shell-escape %S"; +$pdf_mode = "1"; diff --git a/Master/texmf-dist/doc/latex/biblatex-opcit-booktitle/documentation/makefile b/Master/texmf-dist/doc/latex/biblatex-opcit-booktitle/documentation/makefile new file mode 100644 index 00000000000..f35a8a7bfa2 --- /dev/null +++ b/Master/texmf-dist/doc/latex/biblatex-opcit-booktitle/documentation/makefile @@ -0,0 +1,5 @@ +all: *tex *bib + latexmk biblatex-opcit-booktitle.tex + latexmk biblatex-opcit-booktitle-example.tex + + diff --git a/Master/texmf-dist/doc/latex/biblatex-opcit-booktitle/makefile b/Master/texmf-dist/doc/latex/biblatex-opcit-booktitle/makefile new file mode 100644 index 00000000000..0ed77a116ce --- /dev/null +++ b/Master/texmf-dist/doc/latex/biblatex-opcit-booktitle/makefile @@ -0,0 +1,16 @@ +dist: all + rm -rf biblatex-opcit-booktitle + mkdir biblatex-opcit-booktitle + ln README makefile *sty biblatex-opcit-booktitle + mkdir biblatex-opcit-booktitle/documentation + ln documentation/*tex documentation/*bib documentation/*pdf documentation/latexmkrc documentation/makefile biblatex-opcit-booktitle/documentation + $(RM) ../biblatex-opcit-booktitle.zip + zip -r ../biblatex-opcit-booktitle.zip biblatex-opcit-booktitle + + +clean: + $(MAKE) -C documentation clean + @$(RM) *.pdf *.toc *.aux *.out *.fdb_latexmk *.log *.bbl *.bcf *.blg *run.xml *.synctex.gz* + +all: documentation/biblatex-opcit-booktitle-example.tex documentation/biblatex-opcit-booktitle.tex documentation/biblatex-opcit-booktitle-example.bib documentation/latexmkrc + $(MAKE) -C documentation all diff --git a/Master/texmf-dist/tex/latex/biblatex-opcit-booktitle/biblatex-opcit-booktitle.sty b/Master/texmf-dist/tex/latex/biblatex-opcit-booktitle/biblatex-opcit-booktitle.sty new file mode 100644 index 00000000000..90cb51fa48c --- /dev/null +++ b/Master/texmf-dist/tex/latex/biblatex-opcit-booktitle/biblatex-opcit-booktitle.sty @@ -0,0 +1,94 @@ +% Copyright 2015-... Maïeul Rouquette +% +% Inspired by Paul Stanley http://tex.stackexchange.com/a/172777/7712 +% +% +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either version 1.3 +% of this license or (at your option) any later version. +% The latest version of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2005/12/01 or later. +% +% This work has the LPPL maintenance status `maintained'. +% +% The Current Maintainer of this work is Maïeul Rouquette +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{biblatex-opcit-booktitle}[2015/06/05 v1.0.2 Manage op. cit. when using subentry] +\RequirePackage{xpatch} + +\newbibmacro*{cite:seen:related}{% + {\xifinlistcs{\thefield{crossref}}{blx@bsee@\the\c@refsection} + {} + {\listcsxadd{blx@bsee@\the\c@refsection}{\thefield{crossref}}}}} + +\newcommand{\ifrelatedunseen}[2]{% + \xifinlistcs{\thefield{crossref}}{blx@bsee@\the\c@refsection} + {#2} + {#1}} + +\xpatchbibmacro{cite}% + {\usebibmacro{cite:full}% + \usebibmacro{cite:save}}% + {\usebibmacro{cite:test:ifrelated}}% + {}% + {}% + + +\newbibmacro*{cite:test:ifrelated}% + {\ifboolexpr { + test {\iffieldundef{crossref}} + or not ( test {\ifentrytype{inbook}} + or test {\ifentrytype{incollection}} + or test {\ifentrytype{inproceedings}} + or test {\ifentrytype{bookinbook}} ) } + {\usebibmacro{cite:full}% + \usebibmacro{cite:save}} + {\ifrelatedunseen + {\usebibmacro{cite:seen:related}% + \usebibmacro{cite:full}% + \usebibmacro{cite:save}} + {\usebibmacro{related:info}}}} + +\newbibmacro*{related:info}{% + \usebibmacro{cite:full:citepages}% + \usedriver% + {\DeclareNameAlias{sortname}{default}}% + {inbook:rel} +} + +\DeclareBibliographyDriver{inbook:rel}{% + \usebibmacro{bibindex}% + \usebibmacro{begentry}% + \usebibmacro{author/translator+others}% + \setunit{\labelnamepunct}\newblock + \usebibmacro{title}% + \newunit + \printlist{language}% + \newunit\newblock + \usebibmacro{byauthor}% + \newunit\newblock + \usebibmacro{in:}% + \usebibmacro{maintitle+booktitle}% + \newunit\newblock + \usebibmacro{byeditor+others}% + \newunit% + \iffieldundef{maintitle}% + {\printfield{volume}% + \printfield{part}} + {}% + \newunit% + \bibstring[\mkibid]{opcit}% + \newunit\newblock + \usebibmacro{chapter+pages}% + \newunit\newblock + \setunit{\bibpagerefpunct}\newblock + \usebibmacro{pageref}% + \newunit\newblock + \iftoggle{bbx:related} + {\usebibmacro{related:init}% + \usebibmacro{related}} + {}% + \usebibmacro{finentry}} +\endinput diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check index 3f452fc7a3e..4f300c34ac6 100755 --- a/Master/tlpkg/bin/tlpkg-ctan-check +++ b/Master/tlpkg/bin/tlpkg-ctan-check @@ -82,8 +82,10 @@ my @TLP_working = qw( biblatex-dw biblatex-fiwi biblatex-gost biblatex-historian biblatex-ieee biblatex-juradiss biblatex-luh-ipw biblatex-manuscripts-philology - biblatex-mla biblatex-musuos biblatex-nature biblatex-nejm - biblatex-multiple-dm biblatex-philosophy biblatex-phys biblatex-publist + biblatex-mla biblatex-multiple-dm biblatex-musuos + biblatex-nature biblatex-nejm + biblatex-opcit-booktitle + biblatex-philosophy biblatex-phys biblatex-publist biblatex-realauthor biblatex-science biblatex-source-division biblatex-subseries biblatex-swiss-legal biblatex-trad biblatex-true-citepages-omit diff --git a/Master/tlpkg/tlpsrc/biblatex-opcit-booktitle.tlpsrc b/Master/tlpkg/tlpsrc/biblatex-opcit-booktitle.tlpsrc new file mode 100644 index 00000000000..e69de29bb2d diff --git a/Master/tlpkg/tlpsrc/collection-bibtexextra.tlpsrc b/Master/tlpkg/tlpsrc/collection-bibtexextra.tlpsrc index 581e7ae56b7..6c02fe09006 100644 --- a/Master/tlpkg/tlpsrc/collection-bibtexextra.tlpsrc +++ b/Master/tlpkg/tlpsrc/collection-bibtexextra.tlpsrc @@ -37,6 +37,7 @@ depend biblatex-multiple-dm depend biblatex-musuos depend biblatex-nature depend biblatex-nejm +depend biblatex-opcit-booktitle depend biblatex-philosophy depend biblatex-phys depend biblatex-publist -- cgit v1.2.3