diff options
author | Karl Berry <karl@freefriends.org> | 2017-04-10 21:55:58 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-04-10 21:55:58 +0000 |
commit | 3813f353852891036ded396c3d78a8803c0b9385 (patch) | |
tree | aeb29d9ed3fd5456da0ba60d8a55d45ccca0a1a4 /Master | |
parent | c8cd8edf4451d006d810c0a699f9c6f746d06b66 (diff) |
biblatex-shortfields (10apr17)
git-svn-id: svn://tug.org/texlive/trunk@43738 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
13 files changed, 416 insertions, 1 deletions
diff --git a/Master/texmf-dist/doc/latex/biblatex-shortfields/README b/Master/texmf-dist/doc/latex/biblatex-shortfields/README new file mode 100644 index 00000000000..65ac0a7efc2 --- /dev/null +++ b/Master/texmf-dist/doc/latex/biblatex-shortfields/README @@ -0,0 +1,7 @@ +biblatex-shortfields +================== + +Use short version of fields (series, journal) when defined. + +Print a list of the short versions of the fields, mixing multiple fields type. +For example, a liste mixing short version of series field and short version of journal field. diff --git a/Master/texmf-dist/doc/latex/biblatex-shortfields/documentation/biblatex-shortfields-example.pdf b/Master/texmf-dist/doc/latex/biblatex-shortfields/documentation/biblatex-shortfields-example.pdf Binary files differnew file mode 100644 index 00000000000..63bafa98623 --- /dev/null +++ b/Master/texmf-dist/doc/latex/biblatex-shortfields/documentation/biblatex-shortfields-example.pdf diff --git a/Master/texmf-dist/doc/latex/biblatex-shortfields/documentation/biblatex-shortfields-example.tex b/Master/texmf-dist/doc/latex/biblatex-shortfields/documentation/biblatex-shortfields-example.tex new file mode 100644 index 00000000000..bf1b65bb99f --- /dev/null +++ b/Master/texmf-dist/doc/latex/biblatex-shortfields/documentation/biblatex-shortfields-example.tex @@ -0,0 +1,18 @@ +\documentclass{article} +\usepackage{libertineotf} +\usepackage{polyglossia} +\usepackage{csquotes} +\setmainlanguage{french} + +\usepackage[citestyle=verbose,bibstyle=claves]{biblatex} +\AddBiblatexClavis{BHG} +\AddBiblatexClavis{CPG} +\usepackage{biblatex-shortfields} +\addbibresource{biblatex-shortfields.bib} +\begin{document} +\nocite{*} +\printbibshortfields +\printbibliography + + +\end{document} diff --git a/Master/texmf-dist/doc/latex/biblatex-shortfields/documentation/biblatex-shortfields.bib b/Master/texmf-dist/doc/latex/biblatex-shortfields/documentation/biblatex-shortfields.bib new file mode 100644 index 00000000000..800fe3c1a59 --- /dev/null +++ b/Master/texmf-dist/doc/latex/biblatex-shortfields/documentation/biblatex-shortfields.bib @@ -0,0 +1,111 @@ +@article{Delehaye1907, + Author = {Hippolyte Delehaye}, + Date = {1907}, + Journaltitle = {Analecta Bollandiana}, + Number = {26}, + Shorttitle = {AB}, + Pages = {161-301}, + Title = {Saints de Chypre} +} + +@mvbook{BHG_3, + Address = {Bruxelles}, + Author = {François Halkin}, + Date = {1957}, + Edition = {3}, + Number = {81}, + Publisher = {{Société des Bollandistes}}, + Series = {Subsidia Hagiographica}, + Title = {Bibliotheca hagiographica graeca}, + Volumes = {3}} + +@book{BHG_auctarium, + Address = {Bruxelles}, + Author = {François Halkin}, + Date = {1969}, + Number = {47}, + Publisher = {{Société des Bollandistes}}, + Series = {Subsidia Hagiographica}, + Title = {Auctarium bibliothecae hagiographicae graecae}} + +@book{BHG_novum_auctarium, + Address = {Bruxelles}, + Author = {François Halkin}, + Date = {1984}, + Number = {65}, + Publisher = {{Société des Bollandistes}}, + Series = {Subsidia Hagiographica}, + Title = {Novum auctarium bibliothecae hagiographicae graecae}} +@set{BHG, + entryset={BHG_3,BHG_auctarium,BHG_novum_auctarium} +} +@mvbook{CPG, + Address = {Turnhout}, + Author = {Maurice Geerard}, + Date = {1974/2003}, + Publisher = {Brepols}, + Series = {Corpus Christianorum Series Graeca}, + Shortseries = {CCSG}, + Title = {Clavis Patrum Graecorum}, + Volumes = {5}} +@book{BHG410, + Author = {{Alexandre de Chypre}}, + Bhg = {410}, + Cpg = {7398}, + Number = {87.3}, + Pages = {4015-4076}, + Pagination = {column}, + Series = {Patrologia Graeca}, + Shortseries = {PG}, + Title = {De venerandae ac vivificae crucis inventione}} +@book{CCSG16, + Editor = {Edmond Voordeckers and Franz Tinnefeld}, + Number = {16}, + Series = {Corpus Christianorum Series Graeca}, + Shortseries = {CCSG}, + Title = {Iohannis Cantacuzeni Refutationes duae Prochori Cydonii et Disputatio cum Paulo patriarcha latino epistulis septem tradita} +} +@mvbook{Malamut1988, + Address = {Paris}, + Author = {Élisabeth Malamut}, + Date = {1988}, + Number = {8}, + Publisher = {Publications de la Sorbonne}, + Series = {Byzantina Sorbonensia}, + Subtitle = {\textsc{viii}-\textsc{xii}\textsuperscript{e} siècles}, + Title = {Les îles de l'Empire byzantin}, + Volumes = {2} +} +@book{CCSA4, + Editor = {Louis Leloir}, + Number = {4}, + Series = {Corpus Christianorum Series Apocryphorum}, + Shortseries = {CCSA}, + Subtitle = {Traduction de l'édition arménienne de Venise}, + Title = {Écrits apocryphes sur les apôtres}, + Volume = {2}} +@book{CCSG26, + Editor = {Van Deun, Peter and Jacques Noret}, + Number = {26}, + Series = {Corpus Christianorum Series Graeca}, + Shortseries = {CCSG}, + Title = {Hagiographica Cypria}} +@article{VanDeun1990, + Author = {Van Deun, Peter}, + Date = {1990}, + Journaltitle = {Analecta Bollandiana}, + Number = {108}, + Pages = {323-335}, + Shortjournal = {AB}, + Subtitle = {Édition et traduction}, + Title = {Un mémoire anonyme sur saint Barnabé (BHG 226e)}} +@article{James1905, + Author = {Montague Rhodes James}, + Date = {1905}, + Journaltitle = {The Journal of Theological Studies}, + Number = {24}, + Pages = {549-556}, + Shortjournal = {JThS}, + Title = {The Acts of Titus and the Acts of Paul}, + Volume = {6} +} diff --git a/Master/texmf-dist/doc/latex/biblatex-shortfields/documentation/biblatex-shortfields.pdf b/Master/texmf-dist/doc/latex/biblatex-shortfields/documentation/biblatex-shortfields.pdf Binary files differnew file mode 100644 index 00000000000..7b3e74a5375 --- /dev/null +++ b/Master/texmf-dist/doc/latex/biblatex-shortfields/documentation/biblatex-shortfields.pdf diff --git a/Master/texmf-dist/doc/latex/biblatex-shortfields/documentation/biblatex-shortfields.tex b/Master/texmf-dist/doc/latex/biblatex-shortfields/documentation/biblatex-shortfields.tex new file mode 100644 index 00000000000..e28866fef36 --- /dev/null +++ b/Master/texmf-dist/doc/latex/biblatex-shortfields/documentation/biblatex-shortfields.tex @@ -0,0 +1,111 @@ +\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} +\usepackage{csquotes} + +\setminted{breaklines} +\hypersetup{citecolor=black} +% Usefull commands +\newcommand{\biblatex}{biblatex\xspace} +\pretocmd{\bibfield}{\sloppy}{}{} +\pretocmd{\bibtype}{\sloppy}{}{} +\newcommand{\namebibstyle}[1]{\texttt{#1}} +% Meta-datas +\titlepage{% + title={Biblatex-shortfields}, + subtitle={Using short version of fields}, + email={maieul <at> maieul <dot> net}, + author={Maïeul Rouquette}, + revision={1.0.0}, + date={2017/04/09}, + url={https://git.framasoft.org/maieul/biblatex-shortfields}} + +% biblatex + + +\begin{document} + +\printtitlepage +\tableofcontents + + +\section{Aim of the package} + +The \biblatex\ package provide \bibfield{shortseries} and \bibfield{shortjournal} field, but default styles didn't use them. + +It also provides a mechanism to print the equivalence between short forms of fields and long fields (\cs{printbiblist}), but this mechanism does not allow to mix between different type of short fields, for example, between short forms of journal title and short forms of series title.\footnote{Cf.~\url{https://github.com/plk/biblatex/issues/317}.} + +This package provides solution to these two problems: +\begin{itemize} + \item If a \bibfield{shortjournal} field is defined, it prints it instead of the \cs{journal} field. + \item If a \bibfield{shortseries} field is defined, it prints it instead of the \cs{series} field. + \item It provides a \cs{printbibshortfields} command to print a list of the sort forms of the fields. + \item This list also includes the \emph{claves} defined with the \emph{biblatex-claves} package \textbf{v.~1.2 or later}. +\end{itemize} + +\section{Use} + +You must load the package after the \biblatex\ package. +\begin{minted}{latex} +\usepackage[…]{biblatex} +\usepackage{biblatex-shortfields} +\end{minted} + +You just need to put \cs{printbibshortfields} when you need to print the shortlist. The command take an optional argument, which could contain options in the optional argument of \cs{printbibliography}, except \opt{check} and \cs{env} options. + +For example, to change the title of this list, use: + +\begin{minted}{latex} +\printbibshortfields[title=List of shorthands] +\end{minted} + +The equivalence between short and long form of field are determined by the entries. +For example, if you want to tell that \enquote{Corpus Christianorum Series Apocryphorum} is abbreviated \enquote{CCSA}, your entries in this series must contains the following fields: +\begin{minted}{latex} +@entrytype{key, + Fields …, + Series = {Corpus Christianorum Series Apocryphorum}, + Shortseries = {CCSA} +} +\end{minted} + +The only exception is for \emph{claves}, which abbreviations are determined by the mechanism used in the \emph{biblatex-claves} package. + + +See the \href{./example-biblatex-shortfields.tex}{example file}. + +\section{Customization} + +You can change the width devoted to the abbreviations by redefining the \cs{shortfieldswidth} length, using \cs{setlength}. Default value is 4~em. + +For more customization, contact us. If your need is generic, we will add it in the package. + +\section{Credits} + + + +This package was created for Maïeul Rouquette's for Hélène Wiener's needs.\footnote{\url{http://geekographie.maieul.net/144\#forum1736}.} The original idea of the code is explained in Maïeul Rouquette's website.\footnote{\url{http://geekographie.maieul.net/99}.} + + +All issues can be submitted, in French or English, in the Framasoft's issues page\footnote{\url{https://git.framasoft.org/maieul/biblatex-shortfields/issues}.}. + + +\section{Change history} + + +\begin{changelog} + +\begin{release}{1.0.0}{2017-04-02} + \item First public release. +\end{release} + +\end{changelog} +\end{document} diff --git a/Master/texmf-dist/doc/latex/biblatex-shortfields/documentation/latexmkrc b/Master/texmf-dist/doc/latex/biblatex-shortfields/documentation/latexmkrc new file mode 100644 index 00000000000..d6cfc714fa5 --- /dev/null +++ b/Master/texmf-dist/doc/latex/biblatex-shortfields/documentation/latexmkrc @@ -0,0 +1,2 @@ +$pdflatex = "xelatex --shell-escape %S"; +$pdf_mode = "1"; diff --git a/Master/texmf-dist/doc/latex/biblatex-shortfields/documentation/makefile b/Master/texmf-dist/doc/latex/biblatex-shortfields/documentation/makefile new file mode 100644 index 00000000000..831057ac163 --- /dev/null +++ b/Master/texmf-dist/doc/latex/biblatex-shortfields/documentation/makefile @@ -0,0 +1,5 @@ +all: *tex *bib + latexmk biblatex-shortfields.tex + latexmk biblatex-shortfields-example.tex + + diff --git a/Master/texmf-dist/doc/latex/biblatex-shortfields/makefile b/Master/texmf-dist/doc/latex/biblatex-shortfields/makefile new file mode 100644 index 00000000000..465cdd1a994 --- /dev/null +++ b/Master/texmf-dist/doc/latex/biblatex-shortfields/makefile @@ -0,0 +1,17 @@ +dist: all + rm -rf biblatex-shortfields + mkdir biblatex-shortfields + ln README.md biblatex-shortfields/README + ln makefile *sty biblatex-shortfields + mkdir biblatex-shortfields/documentation + ln documentation/*tex documentation/*bib documentation/*pdf documentation/latexmkrc documentation/makefile biblatex-shortfields/documentation + $(RM) ../biblatex-shortfields.zip + zip -r ../biblatex-shortfields.zip biblatex-shortfields + + +clean: + $(MAKE) -C documentation clean + @$(RM) *.pdf *.toc *.aux *.out *.fdb_latexmk *.log *.bbl *.bcf *.blg *run.xml *.synctex.gz* + +all: documentation/biblatex-shortfields-example.tex documentation/biblatex-shortfields.tex documentation/biblatex-shortfields.bib documentation/latexmkrc + $(MAKE) -C documentation all diff --git a/Master/texmf-dist/tex/latex/biblatex-shortfields/biblatex-shortfields.sty b/Master/texmf-dist/tex/latex/biblatex-shortfields/biblatex-shortfields.sty new file mode 100644 index 00000000000..9359094a646 --- /dev/null +++ b/Master/texmf-dist/tex/latex/biblatex-shortfields/biblatex-shortfields.sty @@ -0,0 +1,143 @@ +%% Copyright 2017-… Maïeul Rouquette +% +% 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-shortfields}[2017/04/09 v1.0.0 Print unique list of short fields] +\providecommand{\biblatex@claves}{}% +% 1. Use short version of fields instead of long version +\renewbibmacro*{series+number}{% + \iffieldundef{shortseries}{\printfield{series}}{\printfield{shortseries}}% + \setunit*{\addspace}% + \printfield{number}% + \newunit} + +\renewbibmacro*{journal}{% + \iffieldundef{shortjournal}{% + \iffieldundef{journaltitle}% + {}% + {\printtext[journaltitle]{% + \printfield[titlecase]{journaltitle}% + \setunit{\subtitlepunct}% + \printfield[titlecase]{journalsubtitle}}}% + }{% + \printtext[journaltitle]{\printfield[titlecase]{shortjournal}}% + }% +}% + + +% 2. Custom sorting scheme + +\DeclareSortingScheme{shortfields}{ + \sort{ + \field{claves_definition} + \field{shortjournal} + \field{shortseries} + } + \sort{ + \field{series} + \field{journaltitle} + } +} + +%3. Bibcheck + +\defbibcheck{shortfields}{% + %First, the entrytype NOT corresponding to claves + \iffieldundef{claves_definition}% + {% If not the corresponding to a claves + \ifboolexpr{% + (test{\iffieldundef{shortseries}} or test{\iffieldundef{series}})% + and% + (test {\iffieldundef{shortjournal}} or test {\iffieldundef{journaltitle}})% + }{% + \skipentry% + }{% + %For series + \ifboolexpr{% + test {\iffieldundef{series}}% + and% + test {\iffieldundef{shortseries}}% + }{}% + {% + \ifcsdef{\strfield{shortseries}=\strfield{series}}{% + \skipentry% + }{% + \savefieldcs{series}{\strfield{shortseries}=\strfield{series}}% + }% + }% + % For journal + \ifboolexpr{% + test {\iffieldundef{journaltitle}}% + and% + test {\iffieldundef{shortjournal}}% + }{}% + {% + \ifcsdef{\strfield{shortjournal}=\strfield{journaltitle}}{% + \skipentry% + }{% + \savefieldcs{journaltitle}{\strfield{shortjournal}=\strfield{journaltitle}}% + }% + }% + }% + }% + {}% +}% + + +\newlength{\shortfieldswidth} +\setlength{\shortfieldswidth}{4em} +\defbibenvironment{shortfields} + {% + \let\old@blx@driver\blx@driver% + \ifdef{\clavesadddashinset}{% + \clavesadddashinset%Add the dash inside set (modify default style) + \renewcommand{\entrysetpunct}{\endgraf}%Break between set of an enty + }{}% + \renewcommand{\blx@driver}[1]{\blx@bbx@shortfields}% + \list{% + \iffieldundef{claves_definition}% + {% + \printfield{shortseries}% + \printfield[journaltitle]{shortjournal}% + }% + {\printfield[claves_definition]{entrykey}}% + }% + {% + \labelwidth\shortfieldswidth + \labelsep\biblabelsep + \leftmargin\labelwidth + \advance\leftmargin\labelsep + \itemsep\bibitemsep + \parsep\bibparsep + \def\makelabel##1{##1\hss}}} + {\endlist} + {\item} + +\DeclareBibliographyDriver{shortfields}{% + \iffieldundef{claves_definition}% + {% + \printfield{series}% + \printfield{journaltitle}% + }% + {\let\blx@driver\old@blx@driver\blx@driver{\thefield{entrytype}}}% +} + +% The use level command +\newcommand{\printbibshortfields}[1][title=\biblistname]{% + \begin{refcontext}[sorting=shortfields] + \printbibliography[check=shortfields,env=shortfields,#1]% + \end{refcontext} +} + + +\endinput diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check index c167fd72ad5..ef8cf217316 100755 --- a/Master/tlpkg/bin/tlpkg-ctan-check +++ b/Master/tlpkg/bin/tlpkg-ctan-check @@ -100,7 +100,7 @@ my @TLP_working = qw( biblatex-nature biblatex-nejm biblatex-nottsclassic biblatex-opcit-booktitle biblatex-philosophy biblatex-phys biblatex-publist - biblatex-realauthor biblatex-sbl biblatex-science + biblatex-realauthor biblatex-sbl biblatex-science biblatex-shortfields biblatex-source-division biblatex-subseries biblatex-swiss-legal biblatex-trad biblatex-true-citepages-omit bibleref bibleref-french bibleref-german bibleref-lds bibleref-mouth diff --git a/Master/tlpkg/tlpsrc/biblatex-shortfields.tlpsrc b/Master/tlpkg/tlpsrc/biblatex-shortfields.tlpsrc new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/Master/tlpkg/tlpsrc/biblatex-shortfields.tlpsrc diff --git a/Master/tlpkg/tlpsrc/collection-bibtexextra.tlpsrc b/Master/tlpkg/tlpsrc/collection-bibtexextra.tlpsrc index 86d8c5b061b..e3c6e21d1ff 100644 --- a/Master/tlpkg/tlpsrc/collection-bibtexextra.tlpsrc +++ b/Master/tlpkg/tlpsrc/collection-bibtexextra.tlpsrc @@ -57,6 +57,7 @@ depend biblatex-publist depend biblatex-realauthor depend biblatex-sbl depend biblatex-science +depend biblatex-shortfields depend biblatex-source-division depend biblatex-subseries depend biblatex-swiss-legal |