summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-10-24 20:30:14 +0000
committerKarl Berry <karl@freefriends.org>2018-10-24 20:30:14 +0000
commit33a39ade6f653864998d0ce54a94f6e09df2bd89 (patch)
treee1baf7cb83f4c202512b9d1b3d67d45ced5cc114 /Master/texmf-dist
parent5eaeb0a62717f47efd6054e4390f8b707e9cf584 (diff)
biblatex-opcit-booktitle (24oct18)
git-svn-id: svn://tug.org/texlive/trunk@48983 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/biblatex-opcit-booktitle/documentation/biblatex-opcit-booktitle-example.pdfbin27720 -> 27666 bytes
-rw-r--r--Master/texmf-dist/doc/latex/biblatex-opcit-booktitle/documentation/biblatex-opcit-booktitle.pdfbin76860 -> 78491 bytes
-rw-r--r--Master/texmf-dist/doc/latex/biblatex-opcit-booktitle/documentation/biblatex-opcit-booktitle.tex33
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-opcit-booktitle/biblatex-opcit-booktitle.sty67
4 files changed, 82 insertions, 18 deletions
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
index f2ef312f7c2..f446173afd1 100644
--- 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
Binary files differ
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
index d0668943a2d..1794bcd2c34 100644
--- 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
Binary files 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
index 52310e91e7b..ec85cc37cdb 100644
--- 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
@@ -13,6 +13,7 @@
\hypersetup{citecolor=black}
% Usefull commands
\newcommand{\biblatex}{biblatex\xspace}
+\newcommand{\meta}[1]{\texttt{<#1>}}
\pretocmd{\bibfield}{\sloppy}{}{}
\pretocmd{\bibtype}{\sloppy}{}{}
\newcommand{\namebibstyle}[1]{\texttt{#1}}
@@ -22,8 +23,8 @@
subtitle={Abbreviated references},
email={maieul <at> maieul <dot> net},
author={Maïeul Rouquette},
- revision={1.8.0},
- date={2017/03/27},
+ revision={1.9.0},
+ date={2018/10/24},
url={https://git.framasoft.org/maieul/biblatex-opcit-booktitle}}
% biblatex
@@ -139,12 +140,12 @@ In order to know when two entry share the same \bibfield{booktitle}, you must us
There is not other thing to do!
-The feature works with these entrytypes: \bibtype{inbook}, \bibtype{incollection}, \bibtype{inproceedings}, \bibtype{bookinbook}.
+The feature works with these entrytypes: \bibtype{inbook}, \bibtype{incollection}, \bibtype{inproceedings}, \bibtype{bookinbook}.
If you define a \bibfield{shorttitle} in the main entry, it will be used instead of the full title when we need an abbreviated form.
\subsection{Limits}
-We have not implemented options to use abbreviation like \verb+ibid+, because we want to have not ambiguous abbreviated forms.
+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}
@@ -158,6 +159,17 @@ by:
\usebibmacro{cite:test:ifrelated}
\end{minted}
+\subsection{Use in final bibliography}\label{bibliography}
+
+The package has a \opt{bibliography=<value>} option. \meta{value} can be:
+\begin{description}
+ \item[shorttitle] the final bibliography will print the short form of \bibfield{booktitle} field, and not the full form;
+ \item[onlyshortitle] like the previous one, but also clear the field related to the main entry (except the editor), like the location, the date, the publisher.
+\end{description}
+If loaded, the final bibliography will print the short form of \bibfield{booktitle} field, and not the full form.
+
+
+
\subsection{Use with own citation style}
If you have created your own citation style file (\verb.+cbx.), you must create a bibliographic driver called \verb+inbook:rel:<yourcitationstyle>+. You can look at the model \verb+inbook:rel:verbose-trad-xxx+ in the .sty file, or just use \cs{DeclareBibliographyAlias} to use an already existing model.
@@ -174,7 +186,7 @@ You can change the \verb+inbook:rel:verbose-trad-xxx+ bibliographic driver to cu
\subsection{Use with new entrytypes}
If you create new entrytypes, as the \emph{biblatex-bookintother} package does, you can let know to \emph{biblatex-opcit-booktitle} that these entry types are concerned by using short form of the main entry.
-
+
To do it, just add in your \verb+.bbx+ or \verb+.dbx+ file:
\begin{minted}{latex}
@@ -198,7 +210,7 @@ Depending of the fields of the new entry, you could have to modify the \verb+inb
-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}.}.
+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}.}.
@@ -209,11 +221,16 @@ All issues can be submitted, in French or English, in the Framasoft issues page\
\begin{changelog}
-\begin{release}{1.8.0}{2016-03-27}
+\begin{release}{1.9.0}{2018-10-24}
+ \item Add \opt{bibliography} option to the package. See~\ref{bibliography}.
+ \item Avoid side effect when mixing entries with direct booktitle and entry with inherited booktitle.
+\end{release}
+
+\begin{release}{1.8.0}{2017-03-27}
\item Add support entrytype where you don't need to print volume number.
\end{release}
-\begin{release}{1.7.0}{2016-09-08}
+\begin{release}{1.7.0}{2017-02-08}
\item Add support for the \option{citetracker=context} option of \biblatex.
\end{release}
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
index 04f3b58428a..fb5063f624d 100644
--- 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
@@ -1,5 +1,5 @@
% Copyright 2015-... Maïeul Rouquette
-%
+%
% Inspired by Paul Stanley http://tex.stackexchange.com/a/172777/7712
%
%
@@ -12,14 +12,20 @@
% 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}[2017/03/27 v1.8.0 Manage op. cit. when using subentry]
+\ProvidesPackage{biblatex-opcit-booktitle}[2018/10/24 v1.9.0 Manage op. cit. when using subentry]
\RequirePackage{xpatch}
+\RequirePackage{xkeyval}%
+
+\newtoggle{opcit@booktitle@bibliography@shorttitle}%
+\newtoggle{opcit@booktitle@bibliography@onlyshorttitle}%
+\DeclareOptionX{bibliography}[]{\toggletrue{opcit@booktitle@bibliography@#1}}%
+\ProcessOptionsX%
+% Declaration of the entries concerned. Some package could have already add their own entry
\def\opcit@booktitle@entrytypes@novolume{}
-% Declaration of the entry concerned. Some package could have already add their own entry
\listadd\opcit@booktitle@entrytypes{inbook}
\listadd\opcit@booktitle@entrytypes{incollection}
\listadd\opcit@booktitle@entrytypes{inproceedings}
@@ -61,7 +67,7 @@
{#1}%
}%
}%
-
+
\RequirePackage{ltxcmds}
@@ -116,20 +122,33 @@
\usebibmacro{cite:seen:related}%
\usebibmacro{cite:full}%
}}%
- {\usebibmacro{related:info}}}}
-
-\newbibmacro*{related:info}{%
- % Here an hack to use the short form of the booktitle without recurring to a .dbx file in order to define new fields (because recurring to a .dbx file for such feature is complex for a little feature)
+ {\usebibmacro{related:info}}}}
+
+% Here an hack to use the short form of the booktitle without recurring to a .dbx file in order to define new fields (because recurring to a .dbx file for such feature is complex for a little feature).
+% The related:info:booktitle macro change the booktitle field to the shorttitle field of the parent entry.
+% The related:info calls this macro and them call the driver of the main entry.
+
+\newbibmacro*{related:info:booktitle}{%
+ \undef\shortbooktitle%
+ \undef\bookentrytype%
\entrydata{\thefield{crossref}}{%
\savefield{shorttitle}{\shortbooktitle}%
\savefield{entrytype}{\bookentrytype}%
}%
\ifdef{\shortbooktitle}%
+ {%
+ \iffieldundef{crossref}%
+ {}%
{%
\restorefield{booktitle}{\shortbooktitle}%
\clearfield{booksubtitle}%
}%
- {}%
+ }%
+ {}%
+}%
+
+\newbibmacro*{related:info}{%
+ \usebibmacro{related:info:booktitle}%
\usebibmacro{cite:full:citepages}%
\printtext[bibhypertarget]{\usedriver%
{\DeclareNameAlias{sortname}{default}}%
@@ -275,4 +294,32 @@
\setunit{\labelnamepunct}\newblock%
}%
}
+
+% Patching begenentry macro to apply bibliography option
+\xpretobibmacro{begentry}%
+ {%
+ \ifbibliography%
+ {\usebibmacro{opcitbooktitle:bibliography}}%
+ {}%
+ }%
+ {}%
+ {\opcit@booktitle@failpatch{begentry}{standard.bbx}}%
+
+\newbibmacro{opcitbooktitle:bibliography}{%
+ \iftoggle{opcit@booktitle@bibliography@shorttitle}%
+ {\usebibmacro{related:info:booktitle}}%
+ {}%
+ \iftoggle{opcit@booktitle@bibliography@onlyshorttitle}{%
+ \usebibmacro{related:info:booktitle}%
+ \iffieldundef{crossref}{}{%
+ \clearlist{publisher}%
+ \clearlist{location}%
+ \clearfield{series}%
+ \clearfield{number}%
+ \clearfield{year}%
+ \clearfield{month}%
+ \clearfield{day}%
+ }%
+ }{}%
+}%
\endinput