Debian Codegraph @

texmf-dist/doc/latex/biblatex-claves/documentation/biblatex-claves.tex

raw
1 \documentclass{ltxdockit}[2011/03/25]
2 \usepackage{btxdockit}
3 \usepackage{fontspec}
4 \usepackage[mono=false]{libertine}
5 \usepackage{microtype}
6 \usepackage[american]{babel}
7 \usepackage[strict]{csquotes}
8 \setmonofont[Scale=MatchLowercase]{DejaVu Sans Mono}
9 \usepackage{shortvrb}
10 \usepackage{pifont}
11 \usepackage{minted}
12 \setminted{breaklines}
13 \hypersetup{citecolor=black}
14 % Usefull commands
15 \newcommand{\biblatex}{\emph{biblatex}\xspace}
16 \newcommand{\claves}{\emph{claves}\xspace}
17 \newcommand{\clavis}{\emph{clavis}\xspace}
18 \pretocmd{\bibfield}{\sloppy}{}{}
19 \pretocmd{\bibtype}{\sloppy}{}{}
20 \newcommand{\namebibstyle}[1]{\texttt{#1}}
21 % Meta-datas
22 \titlepage{%
23 title={Manage \claves with \biblatex},
24 subtitle={New fields},
25 email={maieul <at> maieul <dot> net},
26 author={Maïeul Rouquette},
27 revision={1.2.0},
28 date={2017/04/09},
29 url={https://git.framasoft.org/maieul/biblatex-claves}}
30
31 \usepackage[citestyle=verbose,bibstyle=claves]{biblatex}
32 \bibliography{biblatex-claves.bib}
33 \bibliography{biblatex-claves-ref.bib}
34 \AddBiblatexClavis{BHG}
35 \AddBiblatexClavis{CANT}
36 \begin{document}
37
38 \printtitlepage
39 \tableofcontents
40
41
42 \section{Aim of the package}
43
44 When studying antic and medieval literature, we may find many different texts published with the same title, or, in contrary, the same text published with different titles.
45 To avoid confusion, scholars have published \claves, which are books listing ancient texts, identifying them by an identifier --- a number or a string of text.
46 For example, for early Christianity, we have the \citetitle{BHG_3} (BHG),\footcites{BHG_3}{BHG_auctarium}{BHG_novum_auctarium}, the \citetitle{CANT} (CANT),\footcite{CANT} and other \claves.
47
48 It could be useful to print the identifier of a texts in one specific \clavis, or in many \claves.
49
50 This package allows us to create new field for different \claves, and to present all these fields in a consistent way.
51
52 Considering this example:
53 \inputminted{tex}{biblatex-claves.bib}
54
55 It will be typeset as:
56 \begin{quotation}
57 \cite{BHG225}
58 \end{quotation}
59
60 Here, we can see the \enquote{BHG} and \enquote{CANT} identifiers.
61
62 \section{Use}
63
64 \subsection{Requirement}
65
66 The package requires \biblatex~3.5 or later.
67
68 \subsection{Loading the package}
69
70 As the package defines new fields, it must be loaded as a bibliography style:
71 \begin{minted}{latex}
72 \usepackage[bibstyle=claves,citestyle=<your-citestyle>]{biblatex}
73 \end{minted}
74 The \emph{verbose} bibliography style is automatically loaded.
75
76 If you must load an other bibliography style, or if you need to load package which requires to be loaded as bibliography style, like \emph{biblatex-bookinother}, you must use the \emph{biblatex-multiple-dm} package.
77 For example:
78 \begin{minted}{latex}
79 \usepackage[tools={claves,bookinther},bibstyle=verbose]{biblatex-multiple-dm}
80 \usepackage[bibstyle=multiple-dm,citestyle=<your-citestyle>]{biblatex}
81 \end{minted}
82
83 Read the \emph{biblatex-multiple-dm} handbook for more details.
84
85 \subsection{Defining the \claves}
86
87 You must define which \claves\ you want to use, using \cs{AddBiblatexClavis} \textbf{in your preamble}.
88 This command takes on argument, which is the abbreviated form of the concerned \clavis.
89 For example, in this handbook, the preamble contains:
90 \begin{minted}{latex}
91 \AddBiblatexClavis{BHG}
92 \AddBiblatexClavis{CANT}
93 \end{minted}
94 Note the following points:
95 \begin{itemize}
96 \item The order of \cs{AddBiblatexClavis} determines in which order will be typeset the \claves\ in bibliographic entries.
97 \item The case of the argument will be used for typesetting the \claves in bibliographic entries.
98 \end{itemize}
99
100 After that, you just have to add the fields in the concerned entry of the \verb+.bib+ file.
101 Notes that if you don't call the concerned \cs{AddBiblatexClavis}, the \clavis\ won't be typeset.
102 That allows you to decide, in the last time of your work, which \claves you will use.
103
104 \subsection{Customizing style}
105 You can redefine:
106 \begin{itemize}
107 \item The \cs{multiclavesseparator} macro, which defines which character will be typeset between the different \claves\ identifiers. By default, a semicolon.
108 \item The \cs{clavisseparator} macro, which defines which character will be typeset between the \clavis abbreviated form and the \clavis identifier. By default, just a space.
109 \item The \verb+claves+ fieldformat, which defines the way all the \claves and identifier will be typeset. By default, in brackets.
110 \item The \cs{clavisformat} macro, which defines the way individual clavis abbreviation will by typse. For example, if you want italic/emphaze, use:
111 \begin{minted}{latex}
112 \renewcommand{\clavisformat}[1]{\emph{#1}}
113 \end{minted}
114 By default, between parenthesis.
115 \end{itemize}
116 Note that you must use the \biblatex\ punctuation macro.
117 Here, the default definition:
118 \begin{minted}{latex}
119 \newcommand{\multiclavesseparator}{\addsemicolon\ifpunct{\addspace}{}}
120 \newcommand{\clavisseparator}{\addspace}
121 \DeclareFieldFormat{claves}{\mkbibparens{#1}}
122 \end{minted}
123 \subsection{Printing the list of \claves}
124
125 You could want to print the list of the \claves used, with the bibliographic reference.
126 To do, you must define some entries in your \verb+.bib+ file corresponding to the \claves:
127 \inputminted{tex}{biblatex-claves-ref.bib}
128
129 As you can see, the \citetitle{BHG_3} claves is in reality composed by one book in three volumes and two supplements (\enquote{auctarium}).
130 We could define a \bibtype{set} entry directly in the \verb+.bib+ file.
131 However, it could happen that you need to cite each entry individually, and a global \bibtype{set} entry does not allow it.\footnote{Cf. \url{https://github. com/plk/biblatex/issues/470}.}
132
133 That's why the best way is to define locally entry set in a \verb+refsection+ environment.\footnote{Read the \biblatex\ handbook about this environment, which allow you to have a local bibliography.} Consequently, we provide a \cs{citeallclaves} macro, which automatically add a \cs{nocite} for all the \claves\ defined by the \cs{AddBiblatexClavis} macros in your preamble.
134
135 We also provide a \verb+claves+ sorting scheme, and a \verb+claves+ bibliographic environment. So to print the concerning \claves, while defining local \bibtype{set} entry, you must do something like this:
136 \begin{minted}{latex}
137 \begin{refsection}
138 \begin{refcontext}[sorting=claves]
139 \setlength{\shorthandwidth}{3em}
140 \defbibentryset{BHG}{BHG_3,BHG_auctarium,BHG_novum_auctarium}
141 \citeallclaves% Be careful on the order
142 \printbibliography[env=claves,title=List of \emph{claves}]
143 \end{refcontext}
144 \end{refsection}
145 \end{minted}
146
147 That produces the following output:
148 \begin{quotation}
149 \begin{refsection}
150 \begin{refcontext}[sorting=claves]
151 \setlength{\shorthandwidth}{3em}
152 \defbibentryset{BHG}{BHG_3,BHG_auctarium,BHG_novum_auctarium}
153 \citeallclaves
154 \printbibliography[env=claves,title=List of \emph{claves}]
155 \end{refcontext}
156 \end{refsection}
157 \end{quotation}
158
159 Note the following points:
160 \begin{itemize}
161 \item The bibliographic keys are used as label. Consequently, be careful with case, as \emph{biber} is sensitive to it.
162 \item Many time, \claves have a shorter former too long for the default label size defined by \biblatex.
163 That why, in our example, we have redefined the \cs{shorthandwidth} length.
164 \item Contrary to the default style, all the entry of a \bibtype{set} are in there own paragraph, and we use dashes when citing many times the same author. If you want to define your own bibliographic environment devoted to the \claves, you can use the following lines insides:
165 \begin{minted}{latex}
166 \renewcommand{\entrysetpunct}{\endgraf}
167 \clavesadddashinset
168 \end{minted}
169 \end{itemize}
170
171 \section{Knowing if an entry is used as \emph{clavis}}
172
173 You may want to know if an entry is a \emph{clavis}, that is its entrykey was added to \cs{AddBiblatexClavis}. To test it, you must use
174
175 \begin{minted}{latex}
176 \iffieldundef{claves_definition}%
177 {<If not a clavis>}%
178 {<If a clavis>}%
179 \end{minted}
180
181 \section{Notes about inheritance}
182
183 The \bibfield{claves} field are not inherited from the main entry when a subentry is an \bibtype{inbook} entry.
184 \section{Credits}
185
186 This package was created for Maïeul Rouquette's phd dissertation\footnote{\url{http://apocryphes.hypothese.org}.} in 2016.
187 It is licensed on the \emph{\LaTeX\ Project Public License}.\footnote{\url{http://latex-project.org/lppl/lppl-1-3c.html}.}.
188
189
190 All issues can be submitted, in French or English, in the Framasoft issues page.\footnote{\url{https://git.framasoft.org/maieul/biblatex-claves/issues}.}
191
192
193 \section{Change history}
194
195 \begin{changelog}
196
197 \begin{release}{1.2.0}{2017-04-09}
198 \item Mark the entries used as \emph{claves} with \bibfield{claves\_definition} field.
199 \item Add \cs{clavisformat} macro, for more customization.
200 \end{release}
201
202 \begin{release}{1.1.0}{2016-09-25}
203 \item Prevent inheritance of the \bibfield{claves} field for \bibtype{inbook} entries.
204 \end{release}
205
206 \begin{release}{1.0.0}{2016-09-11}
207 \item First public release.
208 \end{release}
209
210 \end{changelog}
211 \end{document}