diff options
author | Karl Berry <karl@freefriends.org> | 2013-12-10 23:18:10 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-12-10 23:18:10 +0000 |
commit | 7e38f53708fe271b07ec84b89dd8861f4bf622d0 (patch) | |
tree | e00e4a03508d7430f06014a26e37859bfca91045 | |
parent | 567ded3bf9deecffd24992783eea1cc19976abab (diff) |
biblatex-source-division (10dec13)
git-svn-id: svn://tug.org/texlive/trunk@32374 c570f23f-e606-0410-a88d-b1316a301751
11 files changed, 215 insertions, 1 deletions
diff --git a/Master/texmf-dist/doc/latex/biblatex-source-division/README.md b/Master/texmf-dist/doc/latex/biblatex-source-division/README.md new file mode 100644 index 00000000000..88bfd7943ea --- /dev/null +++ b/Master/texmf-dist/doc/latex/biblatex-source-division/README.md @@ -0,0 +1,17 @@ +Source division with biblatex +======================== + +Manage source division with biblatex + +This work contains: +- The package file: biblatex-source-division.sty +- The documentation files: + - biblatex-source-division.tex + - biblatex-source-division.bib + - the derivated file: biblatex-source-division.pdf +- The packaging tool files: + - makefile + - latexmkrc +- This README.md file + +All features can be requested in https://github.com/maieul/biblatex-source-division/issues
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/biblatex-source-division/biblatex-source-division.bib b/Master/texmf-dist/doc/latex/biblatex-source-division/biblatex-source-division.bib new file mode 100644 index 00000000000..7a063c50643 --- /dev/null +++ b/Master/texmf-dist/doc/latex/biblatex-source-division/biblatex-source-division.bib @@ -0,0 +1,24 @@ +@bookinbook{Augustin_DeDoctChr_CCSL, + Author = {Augustin}, + Booktitle = {De doctrina christiana. De vera religione}, + Editor = {Daur, Klaus-Detlef and Martin, Josef}, + Maintitle = {Aurelii Augustini opera}, + Number = {32}, + Publisher = {Brepols}, + Series = {Corpus Christianorum Series Latina}, + Title = {De doctrina christiana}, + Volume = {IV, 1}, + Year = {1962}} + +@book{Augustin_DeDoctChr_BA, + Annotator = {Isabelle Bochet and Goulven Madec}, + Author = {Augustin}, + Editor = {Madeleine Moreau}, + Introduction = {Madeleine Moreau}, + Number = {11 / 2}, + Publisher = {Institut d'Études Augustiniennes}, + Read = {1}, + Series = {Bibliothèque Augustinienne}, + Title = {De doctrina christiana}, + Translator = {Madeleine Moreau}, + Year = {1997}} diff --git a/Master/texmf-dist/doc/latex/biblatex-source-division/biblatex-source-division.pdf b/Master/texmf-dist/doc/latex/biblatex-source-division/biblatex-source-division.pdf Binary files differnew file mode 100644 index 00000000000..e7e1fed2e9f --- /dev/null +++ b/Master/texmf-dist/doc/latex/biblatex-source-division/biblatex-source-division.pdf diff --git a/Master/texmf-dist/doc/latex/biblatex-source-division/biblatex-source-division.tex b/Master/texmf-dist/doc/latex/biblatex-source-division/biblatex-source-division.tex new file mode 100644 index 00000000000..a57ca297f21 --- /dev/null +++ b/Master/texmf-dist/doc/latex/biblatex-source-division/biblatex-source-division.tex @@ -0,0 +1,105 @@ +\documentclass{ltxdockit}[2011/03/25] +\usepackage{btxdockit} +\usepackage[main=english,french,latin]{babel} +\usepackage[citestyle=verbose]{biblatex} +\addbibresource{biblatex-source-division.bib} +\usepackage{biblatex-source-division} +\usepackage{fontspec} +\usepackage[mono=false]{libertine} +\usepackage{microtype} +\usepackage[strict]{csquotes} +\setmonofont[Scale=MatchLowercase]{DejaVu Sans Mono} +\usepackage{shortvrb} +\usepackage{minted} +\usepackage{pifont} + +% Usefull commands +\newcommand{\biblatex}{biblatex\xspace} +\pretocmd{\bibfield}{\sloppy}{}{} +\pretocmd{\bibtype}{\sloppy}{}{} +\newcommand{\bibkey}[1]{\texttt #1} +% Meta-datas +\titlepage{% + title={Source division with biblatex}, + email={maieul <at> maieul <dot> net}, + author={Maïeul Rouquette}, + subtitle={}, + revision={1.0.0}, + date={7/12/2013}, + url={https://github.com/maieul/biblatex-source-division}} +% Hyphen +\hyphenation{Ma-de-lei-ne} + +\begin{document} + +\printtitlepage + +\tableofcontents +\section{Introduction} +\subsection{Goals} +The \biblatex package allows to refer to a precise page number when citing a reference: +\begin{minted}{latex} +\cite[23]{key} +\end{minted} + +Means \enquote{cite the entry {\bibkey key}, and precise this we are referring to the p.~23 of this entry.} + +However, historian or philologist can want to precise an other information: the source division, which for an old text is independent of the edition. Mostly, this source division is something like: book, chapter, section, but it can have an other scheme. The source division is printed after the book name, but before the publication information (translator, address, publisher). The book division doesn't prevent printing the page number. + +For example, citing the work of Augustine \emph{De Doctrina Christiana} in the book~II, chapter~\textsc{viii} section~13 in French translation of the \emph{\selectlanguage{french}Bibliothèque Augustinienne}: + +\begin{quotation} +\cite[(II, \textsc{viii}, 13)152-154]{Augustin_DeDoctChr_BA} +\end{quotation} + +And the same passage in the edition of the \emph{\selectlanguage{latin}Corpus Christianorum Series Latina}: +\begin{quotation} +\cite[(II, \textsc{viii}, 13)39-40]{Augustin_DeDoctChr_CCSL} +\end{quotation} + +As you can see, the passage is the same, but the pagination is not the same. +However, the biblatex package doesn't provide easy tools to change both the page number and the source division. That is the aim of this package. +\subsection{Credits} + +This package was created for Maïeul Rouquette's phd dissertation\footnote{\url{http://apocryphes.hypothese.org}.} in 2013. It is licensed on the \emph{\LaTeX\ Project Public License}\footnote{\url{http://latex-project.org/lppl/lppl-1-3c.html}.}. +Its code is freely inspired of a contribution of Andrey Boruvka\footnote{\url{http://tex.stackexchange.com/q/95110/}.}. + +All issues can be submitted, in French or English, in the GitHub issues page\footnote{\url{https://github.com/maieul/biblatex-source-division/issues}.}. + +\section{Usage} + +The package is to be used in combination of \biblatex citestyle of the \emph{verbose} family. +It must be loaded after the \biblatex package. +\begin{minted}{tex} +\usepackage[citestyle=verbose-***,...]{biblatex} +\usepackage{biblatex-source-division} +\end{minted} + +When citing a reference (with \cmd{cite}, \cmd{footcite} or other citation command), the division of source is added in parenthesis in the \opt{prenote} arg. The syntax of the rest of the \opt{prenote} arg is the normal syntax of \biblatex. + +For example, our \file{.bib} for us texts in this documentation introduction is: + +\inputminted{tex}{biblatex-source-division.bib} + +And we called them with : + +\begin{minted}{latex} +\cite[(II, \textsc{viii}, 13)152-154]{Augustin_DeDoctChr_BA} + +\cite[(II, \textsc{viii}, 13)39-40]{Augustin_DeDoctChr_CCSL} +\end{minted} + +\subsection{Styling} + +The division of source is put on the \bibfield{titleaddon} field. So you can stylize it with all the tools of biblatex. + +\subsection{Limitation} + +This package redefine the standard bibmacro \verb+precite+. If you want to redefine it, ensure to load the \verb+getsourcedivision+ bibmacro: + +\begin{minted}{latex} +\renewbibmacro*{prenote}{% + \usebibmacro{getsourcedivision}% + ... your customisation} +\end{minted} +\end{document}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/biblatex-source-division/latexmkrc b/Master/texmf-dist/doc/latex/biblatex-source-division/latexmkrc new file mode 100644 index 00000000000..d6cfc714fa5 --- /dev/null +++ b/Master/texmf-dist/doc/latex/biblatex-source-division/latexmkrc @@ -0,0 +1,2 @@ +$pdflatex = "xelatex --shell-escape %S"; +$pdf_mode = "1"; diff --git a/Master/texmf-dist/doc/latex/biblatex-source-division/makefile b/Master/texmf-dist/doc/latex/biblatex-source-division/makefile new file mode 100644 index 00000000000..ab6c4c55702 --- /dev/null +++ b/Master/texmf-dist/doc/latex/biblatex-source-division/makefile @@ -0,0 +1,12 @@ +FILES = *sty *tex *pdf *md *.bib makefile latexmkrc +%.pdf: %.tex latexmkrc %.bib + latexmk -shell-escape *tex +dist: biblatex-source-division.pdf + @$(RM) ../biblatex-source-division.zip + rm -rf biblatex-source-division + mkdir biblatex-source-division + cp $(FILES) biblatex-source-division + zip -r ../biblatex-source-division.zip biblatex-source-division + +clean: + @$(RM) *.pdf *.toc *.aux *.out *.fdb_latexmk *.log *.bbl *.bcf *.blg *run.xml *.synctex.gz*
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/biblatex-source-division/biblatex-source-division.sty b/Master/texmf-dist/tex/latex/biblatex-source-division/biblatex-source-division.sty new file mode 100644 index 00000000000..1fbf1c7edac --- /dev/null +++ b/Master/texmf-dist/tex/latex/biblatex-source-division/biblatex-source-division.sty @@ -0,0 +1,52 @@ +%% Copyright 2013 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 +% +% This work consists of the file biblatex-source-division.sty + +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{biblatex-source-division}[2013/12/08 v1.0.0 source division for eledpar] + +% Call the source division getting +\renewbibmacro*{prenote}{% + \usebibmacro{getsourcedivision}% + \iffieldundef{prenote}% + {}% + {\printfield{prenote}% + \setunit{\prenotedelim}}} + +% Get source division, put in in titladdon field, and delete source division from the postnote field +\newbibmacro{getsourcedivision}{ + \usefield{\getsourcedivision@}{postnote}% + \restorefield{titleaddon}{\titleaddon}% + \restorefield{postnote}{\postnote}% + } + +% Analyse of the source division + +%% Main command +\newrobustcmd*{\getsourcedivision@}[1]{\getsourcedivision@i#1&} + +% Are there parenthesis ? +\def\getsourcedivision@i{% + \@ifnextchar(%) + {\getsourcedivision@ii} + {\getsourcedivision@ii()}} + +% Put the source division and "true" postnote in macro +\def\getsourcedivision@ii(#1)#2&{% + \gdef\titleaddon{#1}% + \gdef\postnote{#2} + } + +\endinput
\ No newline at end of file diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check index 7c050d4738b..ab1c1057ce0 100755 --- a/Master/tlpkg/bin/tlpkg-ctan-check +++ b/Master/tlpkg/bin/tlpkg-ctan-check @@ -81,7 +81,7 @@ my @TLP_working = qw( biblatex-luh-ipw biblatex-mla biblatex-musuos biblatex-nature biblatex-nejm biblatex-philosophy biblatex-phys biblatex-publist - biblatex-science biblatex-swiss-legal + biblatex-science biblatex-source-division biblatex-swiss-legal biblatex-trad bibleref bibleref-french bibleref-german bibleref-lds bibleref-mouth bibleref-parse diff --git a/Master/tlpkg/libexec/ctan2tds b/Master/tlpkg/libexec/ctan2tds index 6a5ba5ff366..8cebbe928aa 100755 --- a/Master/tlpkg/libexec/ctan2tds +++ b/Master/tlpkg/libexec/ctan2tds @@ -2106,6 +2106,7 @@ my $core_latex = "$Master/texmf-dist/tex/latex"; %specialinsrunner = ( 'antomega' => 'latex', # requires interaction 'apa6e' => 'latex', # requires interaction + 'autopdf' => 'pdflatex', # requires interaction 'babel-serbianc' => 'latex',# requires interaction 'beamersubframe' => 'latex',# requires interaction 'basque-date' => 'latex', # requires interaction diff --git a/Master/tlpkg/tlpsrc/biblatex-source-division.tlpsrc b/Master/tlpkg/tlpsrc/biblatex-source-division.tlpsrc new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/Master/tlpkg/tlpsrc/biblatex-source-division.tlpsrc diff --git a/Master/tlpkg/tlpsrc/collection-bibtexextra.tlpsrc b/Master/tlpkg/tlpsrc/collection-bibtexextra.tlpsrc index f58c4b6dba4..b39eea9f289 100644 --- a/Master/tlpkg/tlpsrc/collection-bibtexextra.tlpsrc +++ b/Master/tlpkg/tlpsrc/collection-bibtexextra.tlpsrc @@ -36,6 +36,7 @@ depend biblatex-philosophy depend biblatex-phys depend biblatex-publist depend biblatex-science +depend biblatex-source-division depend biblatex-swiss-legal depend biblatex-trad depend biblist |