-
Notifications
You must be signed in to change notification settings - Fork 1
/
recipes.tex
628 lines (570 loc) · 26.4 KB
/
recipes.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
%\chapter{Recipes}
\chapter{实用技巧}\label{ch:recipes}
A comprehensive guide to customization is outside the scope of this
book. But some requests for customization are very common, and it
seems worthwhile to have a short chapter that provides some common
recipes.
%\section{Names}
\section{姓名相关的技巧}
\index{customization!names}
\paragraph{I want at most 1/2/3/4 names printed before `and
others'.}\label{recipes:maxnames} You need to change the value of
|maxbibnames|, |maxcitenames|, |minbibnames| and/or |mincitenames|. As
you might expect |maxbibnames| and |minbibnames| deal with what is
printed in the bibliography, and |maxcitenames| and |mincitenames|
deal with what is printed in a citation (if citations print
names). You can change both with |maxnames| and |minnames|, which is
what you normally want to do, and what we will do here. You set this
value when loading \biblatex:
\begin{pseudoverb}
\cs{usepackage}[maxnames=2, minnames=1]\{biblatex\}
\end{pseudoverb}
The |maxnames| number holds the number of names that will
\emph{trigger} truncation to `and others' (or `et al', or
whatever). The |minnames| number is the number of names \emph{to which
the list will be truncated if truncation occurs} (which must,
obviously, be no more than the number that triggers truncation).
Suppose we had an entry with four authors:
\begin{Verbatim}
...
author = { Alpha, A. and Beta, B.
and Gamma, C. and Delta, D. }
...
\end{Verbatim}
The effect of various different settings of |maxnames| and |minnames|
is shown in table \ref{maxnames}.
\begin{table}
\begin{tabularx}{\textwidth}{llX}
\toprule
\texttt{maxnames} & \texttt{minnames} & \textsf{result} \\
\midrule
1 & 1 & A.\ Alpha et al \\
2 & 1 & A.\ Alpha et al \\
2 & 2 & A.\ Alpha, B. Beta, at al \\
3 & 1 & A.\ Alpha et al \\
3 & 2 & A.\ Alpha, B. Beta, et al \\
3 & 3 & A.\ Alpha, B. Beta, C. Gamma, et al \\
4 & any & A.\ Alpha, B. Beta, C. Gamma, and D. Delta \\
\bottomrule
\end{tabularx}
\caption{Effect of \texttt{maxnames} and \texttt{minnames}\label{maxnames}}
\end{table}
Sometimes you will find that you get results which are not what you
are expecting. When it truncates a name, \biblatex\ can be configured
to consider whether the resulting list is unique. If it isn't,
\biblatex\ may add extra names in order to produce a unique list. For
example, suppose you are citing one work by Tom, Dick, and Harry; and
one work by Tom, Dick, and Harriet, and have set |maxnames| to 2 and
|minnames| to 1. Simply applying the ordinary rules, each work would
end up with the authors given as `Tom et al.' But in some styles it
may sometimes make sense to bend the rules if by doing so it is
possible to produce a `unique' citation. This is done by setting the
option |uniquelist=true|.\manref{3.6.1} In fact many standard styles
(such as author/year and author/title styles \emph{already do
that}. So if you think that \biblatex\ is `disobeying' your
instructions about truncation, you might try adding the option
|uniquelist=false| when loading it.
\index{customization!et al@\emph{et al}}
\paragraph{I want something different from `et al' printed when names
are truncated.} What gets printed in this case depends on the
setting of two bibliography strings, and one delimeter:
\begin{itemize}
\item The bibstring |andothers| (by default `et al')
\item The delimiter |andothersdelim| (by default ` ')
\item The |\finalandcomma| (printed wherever a list would end in
`and')
\end{itemize}
So to print `\& al.' rather than `, et al', one would put
\begin{Verbatim}
\DefineBibliographyStrings{english}% or your language
{ andothers = {\& al\adddot}}
...
\renewcommand{\finalandcomma}{}
\end{Verbatim}
The redefinition of |\finalandcomma| needs to come \emph{after}
|\begin{document}|.
Things are a bit more complicated if you want to redefine |et al| in
such a way that it will be different depending on how truncated the
name is: for instance if you wanted `and others' if more than two
names were truncated, but `and another' if only one was. For that
purpose you would need the more extensive changes shown in figure
\ref{andothers}.
\begin{figure}
\begin{Verbatim}[frame=single]
\NewBibliographyString{andanother}
\DefineBibliographyStrings{english}% or your language
{ andothers = {and others},
andanother = {and another}}
\renewbibmacro*{name:andothers}{%
\ifboolexpr{
test {\ifnumequal{\value{listcount}}{\value{liststop}}}
and
test \ifmorenames
}
{\ifnumgreater{\value{liststop}}{1}
{\finalandcomma}
{}%
\ifnumgreater{\value{listtotal} - \value{liststop}}{1}
{\andothersdelim\bibstring{andothers}}
{\andothersdelim\bibstring{andanother}}
}
{}}
\end{Verbatim}
\caption{Introduction of `and others' and `and another'\label{andothers}}
\end{figure}
\index{customization!dashes in bibliography}\index{dash!in bibliography|see{customization, dashes}}
\paragraph{I want/don't want multiple references to a single author to
appear as a long dash.} In the author/year, author/title and verbose
styles, you can control this with the option |dashed=true| or
|dashed=false| when loading \biblatex. Non-standard styles are not
obliged to provide this option, but most will do so.
\index{customization!initials}
\paragraph{I want to have all names abbreviated to initials.} Set the
option |giveninits=true| when loading \biblatex.
\index{customization!initials}
\paragraph{I want to have initials printed in a different way.} By
default, the standard styles of \biblatex\ print initials with spaces
and abbreviation dots:
\begin{quote}
P.~M.~Stanley
\end{quote}
But other methods are available. If you set |terseinits=true| the initials are printed in a condensed way:
\begin{quote}
PM~Stanley
\end{quote}
If you want a `halfway house', you can redefine |\bibinitperiod|. By combining |terseinits| with |\renewcommand{\bibinitperiod}{\adddot}| you can produce
\begin{quote}
P.M. Stanley
\end{quote}
While by combining |terseinits=false| with |\renewcommand{\bibinitperiod}{}| you can produce
\begin{quote}
P~M~Stanley
\end{quote}
There is, however, a catch. None of these changes will operate unless
\biblatex\ is producing the initials. In other words, none works
unless the |giveninits| option is in effect. Where names are being
printed in full, initials that you have entered will be printed (as
entered) with full stops and spaces, regardless of the settings of
|terseinits| or |\bibinitperiod|. (There are ways around this, but
they are beyond the scope of this section: the curious might look at
the \package{\textsc{oscola}} package code, which does something along these lines.)
\index{customization!names}
\paragraph{I want names printed in bold/italic/small capitals etc.}
How names are printed depends on four standard commands:
\cs{mkbibnamegiven} (which prints the initials or first names),
\cs{mkbibnameprefix} (which prints the `de' or `von' parts),
\cs{mkbibnamefamily} (which prints the last name) and
\cs{mkbibnamesuffix} (which prints the `Jr' part). Each or all of these
can be redefined to alter the way names are printed. Each takes a
single argument (the relevant part of the name), and can be used to
format it.\footnote{For formatting emphatically or in bold, you should
use \cs{mkbibbold} or \cs{mkbibemph}}.
Suppose, for instance, that we had the following (peculiar)
requirements: We want first names printed in bold, we want `von' and
`Jr' parts printed emphatically, and we want the last name in small
capitals. We define the following
\begin{Verbatim}
\renewcommand{\mkbibnamegiven}[1]{\mkbibbold{#1}}
\renewcommand{\mkbibnameprefix}[1]{\mkbibemph{#1}}
\renewcommand{\mkbibnamesuffix}[1]{\mkbibemph{#1}}
\renewcommand{\mkbibnamefamily}[1]{\textsc{#1}}
\end{Verbatim}
And obtain results as shown in figure \ref{namestyle}.
\begin{figure}
\begin{minipage}[t]{3in}
\tikz[thick]{
\node(givenname)[fill=red!40, xshift=25ex]{\strut\texttt{Klaus}};
\node(prefixname)[fill=blue!40, xshift=32ex]{\strut\texttt{von}};
\node(familyname)[fill=green!40, xshift=39.5ex]{\strut\texttt{Bulow}};
\node(suffixname)[fill=orange!40, xshift=46ex]{\strut\texttt{III}};
\node(mkbibgiven)[fill=red!40,yshift=-10ex]{\cs[Klaus]{mkbibnamegiven}};
\node(mkbibbold)[fill=red!40,yshift=-20ex]{\cs[Klaus]{mkbibbold}};
\node(boldklaus)[fill=red!40,yshift=-30ex,xshift=25ex]{\strut\textbf{Klaus}};
\node(mkbibprefix)[fill=blue!40, xshift=19ex, yshift=-15ex]{\cs[von]{mkbibprefix}};
\node(mkbibemph1)[fill=blue!40, xshift=19ex, yshift=-25ex]{\cs[von]{mkbibemph}};
\node(emvon)[fill=blue!40, xshift=32ex, yshift=-30ex]{\emph{\strut von}};
\node(mkbibfamily)[fill=green!40, xshift=39.5ex, yshift=-10ex]{\cs[Bulow]{mkbibnamefamily}};
\node(scname)[fill=green!40, xshift=39.5ex, yshift=-20ex]{\cs[Bulow]{textsc}};
\node(scbulow)[fill=green!40, xshift=39.5ex, yshift=-30ex]{\strut\textsc{Bulow}};
\node(mkbibsuffix)[fill=orange!40, xshift=55ex, yshift=-15ex]{\cs[III]{mkbibsuffix}};
\node(mkbibemph2)[fill=orange!40, xshift=55ex, yshift=-25ex]{\cs[III]{mkbibemph}};
\node(emiii)[fill=orange!40, xshift=46ex, yshift=-30ex]{\strut\emph{III}};
\path[-stealth] (givenname.west) edge [out=180, in=90] (mkbibgiven.north);
\path[-stealth] (mkbibgiven.south) edge [out=-90, in=90] (mkbibbold.north);
\path[-stealth] (mkbibbold.south) edge [out=-90, in=180] (boldklaus.west);
\path[-stealth] (prefixname.south) edge [out=-90, in=90] (mkbibprefix.north);
\path[-stealth] (mkbibprefix.south) edge [out=-90, in=90] (mkbibemph1.north);
\path[-stealth] (mkbibemph1.east) edge [out=0, in=90] (emvon.north);
\path[-stealth] (familyname.south) edge [out=-90, in=90] (mkbibfamily.north);
\path[-stealth] (mkbibfamily.south) edge [out=-90, in=90] (scname.north);
\path[-stealth] (scname.south) edge [out=-90, in=90] (scbulow.north);
\path[-stealth] (suffixname.east) edge [out=0, in=90] (mkbibsuffix.north);
\path[-stealth] (mkbibsuffix.south) edge [out=-90, in=90] (mkbibemph2.north);
\path[-stealth] (mkbibemph2.south) edge [out=-90, in=0] (emiii.east);
}
\end{minipage}
\caption{How names are styled\label{namestyle}}
\end{figure}
Of course, it's usually unnecessary to have so many different
definitions. A much more common approach would be to have all the
various parts of a name formatted in the same way. But the flexibility
is there if you need it.\intref{Biblatex Manual § 12}
\index{customization!names}
\paragraph{I want the names to be printed `Firstname Lastname', but
I'm getting `Lastname, Firstname'} Although there is, in theory,
infinite flexibility, in practice there are three common patterns to
how names are printed:
\begin{itemize}
\item In `ordinary' order: given name then family name --- Joe Bloggs
and John Doe.
\item In `reverse' order: family name then given name --- Bloggs, Joe
and Doe, John.
\item With the given name in the list reversed, but the other in
ordinary order --- Bloggs, Joe and John Doe.
\end{itemize}
Styles generally set these sensibly, but if you do not like the
choice, you can usually change it without much difficulty. The command
you need is
\begin{pseudoverb}
\cs[sortname]{DeclareNameAlias}\{\angled{order}\}
\end{pseudoverb}
Where \angled{order} can be |given-family| (for ordinary order),
|family-given| (for reversed order) or |family-given/given-family| (for the
hybrid form). Some styles reset this at the start of the bibliography,
in which case you \emph{also} need (in your preamble)
\begin{pseudoverb}
\cs{AtBeginBibliography}\{\cs[...]{DeclareNameAlias}\}
\end{pseudoverb}
\index{customization!list of own papers}\index{CV!list of papers}
\paragraph{I want to produce a publication list of my own papers.}
People writing CVs often want to produce a bibliography of their own
papers, but modifying the name format so that instead of placing their
name wherever it might happen to be in the list (it could be with `and
others'!) the list reads `with \ldots'. For this purpose you can use
the \package{biblatex-publist} style, which is specifically designed
for it. You tell the package your name (using the \cs{omitname}) macro
(or package option).
\indexstart{punctuation}\index{customization!punctuation|see{punctuation}}
%\section{Punctuation issues}
\section{标点问题}\label{sec:punctuation}
There are many configurable punctuation marks in \biblatex---too many
to deal with comprehensively here. In this section I'm only going to
cover some particularly common cases.\marginnote[-8ex]{In general, I use the
technique of redefining macros. An alternative method, using
\cs{DeclareDelimFormat} is also possible, and may be better if you are
writing a complex style. For an example see p
\pageref{declaredelim}.}
\index{punctuation!before postnote}
\paragraph{I want different punctuation before a postnote.}
\begin{marginfigure}
\fbox{\includegraphics{examples/punctcite.pdf}}
\vspace{3pt}%
\caption{Citation punctuation}\label{punctcite}
\end{marginfigure}
The overall punctuation of a citation is shown in figure
\ref{punctcite}. The point marked (1) is the place between the
pre-note and the beginning of the citation where \biblatex\ will
insert \cs{prenotedelim}. Here that command is defined to print
nothing, so in fact nothing gets inserted. The point marked (2) is the
place between the citation and the post-note where \biblatex\ will
insert the \cs{postnotedelim}. In this case that is a spaced comma.
So if we redefine both these commands, we can alter what gets
inserted:\begin{marginfigure}[12ex]
\fbox{\includegraphics{examples/punctcite2.pdf}} \vspace{3pt}%
\caption{Citation punctuation revised}\label{punctcite2}
\end{marginfigure}
\begin{Verbatim}
\renewcommand{\prenotedelim}{\addcolon\space}
\renewcommand{\postnotedelim}{\space--\space}
\end{Verbatim}
\index{punctuation!author/year}
\paragraph{I am using an author/year style, and I want a colon/a
comma/nothing between the author and the year.}
\begin{marginfigure}[4ex]
\fbox{\includegraphics{examples/punctcite3.pdf}}
\vspace{3pt}%
\caption{\cs{nameyeardelim}}\label{punctcite3}
\end{marginfigure}
This is controlled by the \cs{nameyeardelim} macro (see figure
\ref{punctcite3}). In the standard styles it is, as you can see, a
space. If we wanted to make it, say, a comma, we could do so as
follows:
\begin{Verbatim}
\renewcommand{\nameyeardelim}{\addcomma\space}
\end{Verbatim}
to produce the revised punctuation that is marked in figure
\ref{punctcite4}.
\begin{marginfigure}[4ex]
\fbox{\includegraphics{examples/punctcite4.pdf}}
\vspace{3pt}%
\caption{\cs{nameyeardelim} revised}\label{punctcite4}
\end{marginfigure}
\index{punctuation!multiple citations}
\paragraph{I have multiple citations and I want different punctuation
between them.} As can be seen from figure \ref{punctcite5}
\begin{marginfigure}[4ex]
\fbox{\includegraphics{examples/punctcite5.pdf}}
\vspace{3pt}%
\caption{Multiple citations}\label{punctcite5}
\end{marginfigure}
the mark placed between most multiple citations is defined either by
\cs{multicitedelim} or by \cs{bibrangedash}. You are very unlikely to
want to redefine the latter command (which is used in many other
places), but \cs{muliticitedelim} can easily be redefined (a comma and
a space, or a semicolon and a space being the most common). To give a
(silly) example
\begin{Verbatim}
\renewcommand{\multicitedelim}{\slash}
\end{Verbatim}
would give us the rather bizarre results show in figure
\ref{punctcite6}.
\begin{marginfigure}[-8ex]
\fbox{\includegraphics{examples/punctcite6.pdf}}
\vspace{3pt}%
\caption{Multiple citations redefined}\label{punctcite6}
\end{marginfigure}
Between \smallcaps{superscript citations} the delimiter is not
\cs{multicitedelim}, but \cs{supercitedelim}, so if you use
superscript citations it is this that you will have to redefine.
\index{punctuation!after `In'}
\paragraph{I don't want punctuation after `In'.} Standard \biblatex\
styles print a colon after `In:' This is produced by
\cs{intitlepunct}, as shown in figure \ref{punctcite7}.
\begin{figure}
\fbox{\includegraphics{examples/punctcite7.pdf}}
\caption{In: $\rightarrow$ In}\label{punctcite7}
\end{figure}
You can therefore redefine \cs{intitlepunct}, for instance to
\begin{Verbatim}
\renewcommand{\intitlepunct}{\addspace\nopunct}
\end{Verbatim}
to avoid any punctuation being added at that point.
\index{customization!in@`In'!removal}
\paragraph{I want to remove the reference to `in' altogether.}
In that case
\begin{verbatim}
\renewbibmacro{in:}{}
\end{verbatim}
The trouble with this is that it removes `in' not only from, say,
articles, but also from other types of source (such as |incollection|)
where it may still be needed. In that case, you need a more complex
revision.\footnote{Thanks to Herbert:
\url{http://tex.stackexchange.com/questions/10682/suppress-in-biblatex}},
using \cs[\angled{type}]{ifentrytype}. The following, for instance will
suppress `in' for |article| and |inproceedings| only, and you should
be able to work out how to adapt it.
\begin{verbatim}
\renewbibmacro{in:}{%
\ifboolexpr{%
test {\ifentrytype{article}}%
or
test {\ifentrytype{inproceedings}}%
}
{}%<-nothing
{\printtext{\bibstring{in}\intitlepunct}}%<-normal 'in' with punctuation
}
\end{verbatim}
\index{customization!labels in parentheses}
\paragraph{I am using a numeric style, but I want my citations to
appear in parentheses (1) instead of brackets
[1].}\label{recipe:brackets}
\begin{marginfigure}[8ex]
\fbox{\includegraphics{examples/punctcite8.pdf}}
\vspace{3pt}%
\caption{Brackets replaced by parentheses}\label{punctcite8}
\end{marginfigure}
This is a surprisingly difficult change to made. The code required is
as follows:\footnote{Using the clever method devised by Audrey
Boruvka: \url{http://tex.stackexchange.com/a/16792/5404}.}
\begin{Verbatim}
\makeatletter
\newrobustcmd*{\parentexttrack}[1]{%
\begingroup
\blx@blxinit
\blx@setsfcodes
\blx@bibopenparen#1\blx@bibcloseparen%
\endgroup}
\AtEveryCite{%
\let\parentext=\parentexttrack%
\let\bibopenparen=\bibopenbracket
\let\bibcloseparen=\bibclosebracket}
\makeatother
\DeclareFieldFormat{labelnumberwidth}{\mkbibparens{#1}}
\DeclareFieldFormat{labelformat}{\mkbibbrackets{#1}}
\end{Verbatim}
\index{customization!citations in brackets}
\paragraph{I am using an author/year style: I want to replace round
parentheses with square brackets: [Author 1978] instead of (Author
1978).} This is more-or-less the opposite problem to the last one,
and again it takes a surprising amount of work to get his right. The
relevant code is as follows (to go in the preamble).
\begin{Verbatim}
\makeatletter
\newrobustcmd*{\parentexttrack}[1]{%
\begingroup
\blx@blxinit
\blx@setsfcodes
\blx@bibopenbracket#1\blx@bibclosebracket%
\endgroup}
\AtEveryCite{%
\let\parentext=\parentexttrack%
\let\bibopenbracket=\bibopenparen%
\let\bibclosebracket=\bibcloseparen}
\makeatother
\end{Verbatim}
If you also want the year references to be printed in square brackets
in the bibliography, you need this in addition:
\begin{Verbatim}
\renewbibmacro*{date+extrayear}{%
\iffieldundef{\thefield{datelabelsource}year}
{}
{\printtext[brackets]{%
\iffieldsequal{year}{\thefield{datelabelsource}year}
{\printdateextralabel}%
{\printfield{labelyear}%
\printfield{extrayear}}}}}%
\renewbibmacro*{date}{}%
\renewbibmacro*{issue+date}{%
\iffieldundef{issue}
{}
{\printtext[brackets]{\printfield{issue}}}%
\newunit}
\end{Verbatim}
\index{punctuation!within entry}
\paragraph{I would like the parts of a bibliographical entry to be
separated by commas, but the standard styles use full stops.} The
division between the main parts of an entry are marked by
\cs{newunitpunct}. As you can see from figure \ref{punctcite10}, it is
quite frequently used.
\begin{figure}
\fbox{\includegraphics{examples/punctcite10.pdf}}
\caption{The \cs{newunitpunct} punctuation\label{punctcite10}}
\end{figure}
If we modify it by
\begin{Verbatim}
\renewcommand{\newunitpunct}{\addcomma\space}
\end{Verbatim}
we get a less choppy result: figure \ref{punctcite11}. Notice that the
capitalization adjust automatically.\begin{figure}
\fbox{\includegraphics{examples/punctcite11.pdf}}
\caption{The \cs{newunitpunct} punctuation\label{punctcite11}}
\end{figure} It may, however, sometimes be necessary to adjust other
punctuation marks to ensure a really smooth result.
\index{punctuation!quotation marks}
\paragraph{I am not happy with the way quotation marks are being put
around article names.} This is largely a function of how
\package{csquotes} is loaded.
\begin{itemize}
\item Loaded with the option |style=british|, you will get single
quotation marks: `Like This'.
\item Loaded with the option |style=american|, you will get doubt
quotation marks: ``Like This''.
\item If, in addition to loading \package{csquotes} with the option
|style=american| you load \package{babel} or \package{polyglossia} with the
|american| language you will get the American style of handling punctuation
and quotations, where punctuation is moved inside the quotation:
``like this,'' in most cases.
\end{itemize}
Of course, you can equally use \package{csquotes} with «\,French\,»,
,,German``, «Spanish», or any other style of quotation.
%''
%\section{Issues about what gets printed}
\section{关于打印什么内容的问题}
\index{customization!URL!font}\index{customization!font!url}
\paragraph{I don't want to print \smallcaps{urls}\slash
\smallcaps{eprint}\slash \smallcaps{doi}s.} These can be controlled
with the options |url|, |doi| and |eprint|. By default all of these
are set |true|; to turn off any of them set the relevant option to
|false|. If you want links to be created you should load the
\package{hyperref} package.
\index{customization!date}
\index{date!customization}
\paragraph{I want to control how dates get printed.}
\package{Biblatex} may print a number of different dates at various
points in a citation, and the format for each of them can be
separately controlled, using the options given in table
\ref{dateopts}.
\begin{margintable}
\begin{tabularx}{\marginparwidth}{lX}
\toprule
\texttt{date} & date of publication \\
\texttt{labeldate} & the `label' date (in author/year styles) \\
\texttt{urldate} & the date a \smallcaps{url} was `last visited' \\
\texttt{eventdate} & the date of a conference \\
\texttt{origdate} & an original date of publication \\
\texttt{alldates} & all dates \\
\bottomrule
\end{tabularx}
\vspace{3pt}
\caption{The various options to set date\label{dateopts}}
\end{margintable}
There is a bewildering range of possible settings for these various
date fields. Exactly what will get printed depends may depend on the
language you have set in \package{babel} or \package{polyglossia}: a
date printed as `15th January 2000' in |british| will be printed as
`January 15, 2000' in |american| and 15 janvier 2000 in
|french|. However, tabel \ref{datesettings} gives examples for how a
date of |2000-01-15| would get printed in British English which should
be sufficient to give guidance for other languages.
\begin{table*}
\begin{tabular}{lp{2.8in}lp{1in}}
\toprule
& \texttt{dateabbrev=false} & \texttt{dateabbrev=true} & \texttt{datezeros=false} \\
\midrule\texttt{long} & 15th January 2000 & 15th Jan 2000 \\
& ranges written in full: 15th January 2000--17th January 2000 & 15th Jan.\ 2000--17 Jan.\ 2000 \\
\texttt{short} & 15/01/2000 & & 15/1/2000 \\
& ranges written in full: 15/01/2000--17/01/2000 & & 15/1/2000--17/1/2000 \\
\texttt{year} & 2000 \\
\texttt{comp} & 15th January 2000 \\
& ranges compressed: 15th--17th January 2000 & 15th--17th Jan.\ 2000 \\
\texttt{terse} & as 15/01/2000 \\
& ranges compressed: 15--17/01/2000 & & 15--17/1/2000 \\
\texttt{iso8601} & 2000-01-15 \\
& with ranges as 2000-01-15/2000-01-17 \\
\bottomrule
\end{tabular}
\caption{Various date settings\label{datesettings}}
\end{table*}
In addition, you set the |dateabbrev| option |true| to have dates
printed in an abbreviated form (15th Jan.\ 2000), and the |datezeros|
option |true| to have numeric dates printed with leading zeros
(2000-01-15), or |false| to have them printed without.
\index{customization!suppressing information}
\paragraph{There's some other information I don't want printed.} At
this point we are beginning to enter the realm of serious changes,
which are arguably beyond the sort of simple customization that this
chapter is concerned with.
But let's suppose, for instance, that you were absolutely happy with
the standard author/year style, but just wanted not to print the
publisher: just the place of publication. One way to do this is to
`kid' the style that you haven't entered any publisher at all.
\begin{figure}
\fbox{\includegraphics{examples/punctcite12.pdf}}
\vspace{0.5\baselineskip}
\fbox{\includegraphics{examples/punctcite13.pdf}}
\caption{Removing the publisher using a \texttt{sourcemap}\label{punctcite12}}
\end{figure}
For this purpose we use a \emph{sourcemap}, as follows
\begin{minipage}{\textwidth}
\begin{Verbatim}
\DeclareSourcemap{
\maps[datatype=bibtex]{
\map[overwrite=true]{
\step[fieldset=publisher,null]
}
}
}
\end{Verbatim}
\end{minipage}
\vspace{1ex}
What this basically means is that for any |.bib| file, the publisher
field of each entry is to be set empty (|null|). This will be done by
\package{biber} before any data enters the system. No publisher is
therefore printed, and so long as the style is capable of coping with
the particular absence, all is well, as figure \ref{punctcite12}
shows.
%%% Local Variables:
%%% coding: utf-8
%%% mode: LaTeX
%%% TeX-master: "biblatex-tutorial"
%%% End: