summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/biblatex-contrib/biblatex-oxref/oxref.dtx
blob: 6ce62d568e5035513f3623c0fcbb27d7fbdc080c (plain)
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
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
9041
9042
9043
9044
9045
9046
9047
9048
9049
9050
9051
9052
9053
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086
9087
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
9125
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
9148
9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173
9174
9175
9176
9177
9178
9179
9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
9190
9191
9192
9193
9194
9195
9196
9197
9198
9199
9200
9201
9202
9203
9204
9205
9206
9207
9208
9209
9210
9211
9212
9213
9214
9215
9216
9217
9218
9219
9220
9221
9222
9223
9224
9225
9226
9227
9228
9229
9230
9231
9232
9233
9234
9235
9236
9237
9238
9239
9240
9241
9242
9243
9244
9245
9246
9247
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257
9258
9259
9260
9261
9262
9263
9264
9265
9266
9267
9268
9269
9270
9271
9272
9273
9274
9275
9276
9277
9278
9279
9280
9281
9282
9283
9284
9285
9286
9287
9288
9289
9290
9291
9292
9293
9294
9295
9296
9297
9298
9299
9300
9301
9302
9303
9304
9305
9306
9307
9308
9309
9310
9311
9312
9313
9314
9315
9316
9317
9318
9319
9320
9321
9322
9323
9324
9325
9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
9373
9374
9375
9376
9377
9378
9379
9380
9381
9382
9383
9384
9385
9386
9387
9388
9389
9390
9391
9392
9393
9394
9395
9396
9397
9398
9399
9400
9401
9402
9403
9404
9405
9406
9407
9408
9409
9410
9411
9412
9413
9414
9415
9416
9417
9418
9419
9420
9421
9422
9423
9424
9425
9426
9427
9428
9429
9430
9431
9432
9433
9434
9435
9436
9437
9438
9439
9440
9441
9442
9443
9444
9445
9446
9447
9448
9449
9450
9451
9452
9453
9454
9455
9456
9457
9458
9459
9460
9461
9462
9463
9464
9465
9466
9467
9468
9469
9470
9471
9472
9473
9474
9475
9476
9477
9478
9479
9480
9481
9482
9483
9484
9485
9486
9487
9488
9489
9490
9491
9492
9493
9494
9495
9496
9497
9498
9499
9500
9501
9502
9503
9504
9505
9506
9507
9508
9509
9510
9511
9512
9513
9514
9515
9516
9517
9518
9519
9520
9521
9522
9523
9524
9525
9526
9527
9528
9529
9530
9531
9532
9533
9534
9535
9536
9537
9538
9539
9540
9541
9542
9543
9544
9545
9546
9547
9548
9549
9550
9551
9552
9553
9554
9555
9556
9557
9558
9559
9560
9561
9562
9563
9564
9565
9566
9567
9568
9569
9570
9571
9572
9573
9574
9575
9576
9577
9578
9579
9580
9581
9582
9583
9584
9585
9586
9587
9588
9589
9590
9591
9592
9593
9594
9595
9596
9597
9598
9599
9600
9601
9602
9603
9604
9605
9606
9607
9608
9609
9610
9611
9612
9613
9614
9615
9616
9617
9618
9619
9620
9621
9622
9623
9624
9625
9626
9627
9628
9629
9630
9631
9632
9633
9634
9635
9636
9637
9638
9639
9640
9641
9642
9643
9644
9645
9646
9647
9648
9649
9650
9651
9652
9653
9654
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
9665
9666
9667
9668
9669
9670
9671
9672
9673
9674
9675
9676
9677
9678
9679
9680
9681
9682
9683
9684
9685
9686
9687
9688
9689
9690
9691
9692
9693
9694
9695
9696
9697
9698
9699
9700
9701
9702
9703
9704
9705
9706
9707
9708
9709
9710
9711
9712
9713
9714
9715
9716
9717
9718
9719
9720
9721
9722
9723
9724
9725
9726
9727
9728
9729
9730
9731
9732
9733
9734
9735
9736
9737
9738
9739
9740
9741
9742
9743
9744
9745
9746
9747
9748
9749
9750
9751
9752
9753
9754
9755
9756
9757
9758
9759
9760
9761
9762
9763
9764
9765
9766
9767
9768
9769
9770
9771
9772
9773
9774
9775
9776
9777
9778
9779
9780
9781
9782
9783
9784
9785
9786
9787
9788
9789
9790
9791
9792
9793
9794
9795
9796
9797
9798
9799
9800
9801
9802
9803
9804
9805
9806
9807
9808
9809
9810
9811
9812
9813
9814
9815
9816
9817
9818
9819
9820
9821
9822
9823
9824
9825
9826
9827
9828
9829
9830
9831
9832
9833
9834
9835
9836
9837
9838
9839
9840
9841
9842
9843
9844
9845
9846
9847
9848
9849
9850
9851
9852
9853
9854
9855
9856
9857
9858
9859
9860
9861
9862
9863
9864
9865
9866
9867
9868
9869
9870
9871
9872
9873
9874
9875
9876
9877
9878
9879
9880
9881
9882
9883
9884
9885
9886
9887
9888
9889
9890
9891
9892
9893
9894
9895
9896
9897
9898
9899
9900
9901
9902
9903
9904
9905
9906
9907
9908
9909
9910
9911
9912
9913
9914
9915
9916
9917
9918
9919
9920
9921
9922
9923
9924
9925
9926
9927
9928
9929
9930
9931
9932
9933
9934
9935
9936
9937
9938
9939
9940
9941
9942
9943
9944
9945
9946
9947
9948
9949
9950
9951
9952
9953
9954
9955
9956
9957
9958
9959
9960
9961
9962
9963
9964
9965
9966
9967
9968
9969
9970
9971
9972
9973
9974
9975
9976
9977
9978
9979
9980
9981
9982
9983
9984
9985
9986
9987
9988
9989
9990
9991
9992
9993
9994
9995
9996
9997
9998
9999
10000
10001
10002
10003
10004
10005
10006
10007
10008
10009
10010
10011
10012
10013
10014
10015
10016
10017
10018
10019
10020
10021
10022
10023
10024
10025
10026
10027
10028
10029
10030
10031
10032
10033
10034
10035
10036
10037
10038
10039
10040
10041
10042
10043
10044
10045
10046
10047
10048
10049
10050
10051
10052
10053
10054
10055
10056
10057
10058
10059
10060
10061
10062
10063
10064
10065
10066
10067
10068
10069
10070
10071
10072
10073
10074
10075
10076
10077
10078
10079
10080
10081
10082
10083
10084
10085
10086
10087
10088
10089
10090
10091
10092
10093
10094
10095
10096
10097
10098
10099
10100
10101
10102
10103
10104
10105
10106
10107
10108
10109
10110
10111
10112
10113
10114
10115
10116
10117
10118
10119
10120
10121
10122
10123
10124
10125
10126
10127
10128
10129
10130
10131
10132
10133
10134
10135
10136
10137
10138
10139
10140
10141
10142
10143
10144
10145
10146
10147
10148
10149
10150
10151
10152
10153
10154
10155
10156
10157
10158
10159
10160
10161
10162
10163
10164
10165
10166
10167
10168
10169
10170
10171
10172
10173
10174
10175
10176
10177
10178
10179
10180
10181
10182
10183
10184
10185
10186
10187
10188
10189
10190
10191
10192
10193
10194
10195
10196
10197
10198
10199
10200
10201
10202
10203
10204
10205
10206
10207
10208
10209
10210
10211
10212
10213
10214
10215
10216
10217
10218
10219
10220
10221
10222
10223
10224
10225
10226
10227
10228
10229
10230
10231
10232
10233
10234
10235
10236
10237
10238
10239
10240
10241
10242
10243
10244
10245
10246
10247
10248
10249
10250
10251
10252
10253
10254
10255
10256
10257
10258
10259
10260
10261
10262
10263
10264
10265
10266
10267
10268
10269
10270
10271
10272
10273
10274
10275
10276
10277
10278
10279
10280
10281
10282
10283
10284
10285
10286
10287
10288
10289
10290
10291
10292
10293
10294
10295
10296
10297
10298
10299
10300
10301
10302
10303
10304
10305
10306
10307
10308
10309
10310
10311
10312
10313
10314
10315
10316
10317
10318
10319
10320
10321
10322
10323
10324
10325
10326
10327
10328
10329
10330
10331
10332
10333
10334
10335
10336
10337
10338
10339
10340
10341
10342
10343
10344
10345
10346
10347
10348
10349
10350
10351
10352
10353
10354
10355
10356
10357
10358
10359
10360
10361
10362
10363
10364
10365
10366
10367
10368
10369
10370
10371
10372
10373
10374
10375
10376
10377
10378
10379
10380
10381
10382
10383
10384
10385
10386
10387
10388
10389
10390
10391
10392
10393
10394
10395
10396
10397
10398
10399
10400
10401
10402
10403
10404
10405
10406
10407
10408
10409
10410
10411
10412
10413
10414
10415
10416
10417
10418
10419
10420
10421
10422
10423
10424
10425
10426
10427
10428
10429
10430
10431
10432
10433
10434
10435
10436
10437
10438
10439
10440
10441
10442
10443
10444
10445
10446
10447
10448
10449
10450
10451
10452
10453
10454
10455
10456
10457
10458
10459
10460
10461
10462
10463
10464
10465
10466
10467
10468
10469
10470
10471
10472
10473
10474
10475
10476
10477
10478
10479
10480
10481
10482
10483
10484
10485
10486
10487
10488
10489
10490
10491
10492
10493
10494
10495
10496
10497
10498
10499
10500
10501
10502
10503
10504
10505
10506
10507
10508
10509
10510
10511
10512
10513
10514
10515
10516
10517
10518
10519
10520
10521
10522
10523
10524
10525
10526
10527
10528
10529
10530
10531
10532
10533
10534
10535
10536
10537
10538
10539
10540
10541
10542
10543
10544
10545
10546
10547
10548
10549
10550
10551
10552
10553
10554
10555
10556
10557
10558
10559
10560
10561
10562
10563
10564
10565
10566
10567
10568
10569
10570
10571
10572
10573
10574
10575
10576
10577
10578
10579
10580
10581
10582
10583
10584
10585
10586
10587
10588
10589
10590
10591
10592
10593
10594
10595
10596
10597
10598
10599
10600
10601
10602
10603
10604
10605
10606
10607
10608
10609
10610
10611
10612
10613
10614
10615
10616
10617
10618
10619
10620
10621
10622
10623
10624
10625
10626
10627
10628
10629
10630
10631
10632
10633
10634
10635
10636
10637
10638
10639
10640
10641
10642
10643
10644
10645
10646
10647
10648
10649
10650
10651
10652
10653
10654
10655
10656
10657
10658
10659
10660
10661
10662
10663
10664
10665
10666
10667
10668
10669
10670
10671
10672
10673
10674
10675
10676
10677
10678
10679
10680
10681
10682
10683
10684
10685
10686
10687
10688
10689
10690
10691
10692
10693
10694
10695
10696
10697
10698
10699
10700
10701
10702
10703
10704
10705
10706
10707
10708
10709
10710
10711
10712
10713
10714
10715
10716
10717
10718
10719
10720
10721
10722
10723
10724
10725
10726
10727
10728
10729
10730
10731
10732
10733
10734
10735
10736
10737
10738
10739
10740
10741
10742
10743
10744
10745
10746
10747
10748
10749
10750
10751
10752
10753
10754
10755
10756
10757
10758
10759
10760
10761
10762
10763
10764
10765
10766
10767
10768
10769
10770
10771
10772
10773
10774
10775
10776
10777
10778
10779
10780
10781
10782
10783
10784
10785
10786
10787
10788
10789
10790
10791
10792
10793
10794
10795
10796
10797
10798
10799
10800
10801
10802
10803
10804
10805
10806
10807
10808
10809
10810
10811
10812
10813
10814
10815
10816
10817
10818
10819
10820
10821
10822
10823
10824
10825
10826
10827
10828
10829
10830
10831
10832
10833
10834
10835
10836
10837
10838
10839
10840
10841
10842
10843
10844
10845
10846
10847
10848
10849
10850
10851
10852
10853
10854
10855
10856
10857
10858
10859
10860
10861
10862
10863
10864
10865
10866
10867
10868
10869
10870
10871
10872
10873
10874
10875
10876
10877
10878
10879
10880
10881
10882
10883
10884
10885
10886
10887
10888
10889
10890
10891
10892
10893
10894
10895
10896
10897
10898
10899
10900
10901
10902
10903
10904
10905
10906
10907
10908
10909
10910
10911
10912
10913
10914
10915
10916
10917
10918
10919
10920
10921
10922
10923
10924
10925
10926
10927
10928
10929
10930
10931
10932
10933
10934
10935
10936
10937
10938
10939
10940
10941
10942
10943
10944
10945
10946
10947
10948
10949
10950
10951
10952
10953
10954
10955
10956
10957
10958
10959
10960
10961
10962
10963
10964
10965
10966
10967
10968
10969
10970
10971
10972
10973
10974
10975
10976
10977
10978
10979
10980
10981
10982
10983
10984
10985
10986
10987
10988
10989
10990
10991
10992
10993
10994
10995
10996
10997
10998
10999
11000
11001
11002
11003
11004
11005
11006
11007
11008
11009
11010
11011
11012
11013
11014
11015
11016
11017
11018
11019
11020
11021
11022
11023
11024
11025
11026
11027
11028
11029
11030
11031
11032
11033
11034
11035
11036
11037
11038
11039
11040
11041
11042
11043
11044
11045
11046
11047
11048
11049
11050
11051
11052
11053
11054
11055
11056
11057
11058
11059
11060
11061
11062
11063
11064
11065
11066
11067
11068
11069
11070
11071
11072
11073
11074
11075
11076
11077
11078
11079
11080
11081
11082
11083
11084
11085
11086
11087
11088
11089
11090
11091
11092
11093
11094
11095
11096
11097
11098
11099
11100
11101
11102
11103
11104
11105
11106
11107
11108
11109
11110
11111
11112
11113
11114
11115
11116
11117
11118
11119
11120
11121
11122
11123
11124
11125
11126
11127
11128
11129
11130
11131
11132
11133
11134
11135
11136
11137
11138
11139
11140
11141
11142
11143
11144
11145
11146
11147
11148
11149
11150
11151
11152
11153
11154
11155
11156
11157
11158
11159
11160
11161
11162
11163
11164
11165
11166
11167
11168
11169
11170
11171
11172
11173
11174
11175
11176
11177
11178
11179
11180
11181
11182
11183
11184
11185
11186
11187
11188
11189
11190
11191
11192
11193
11194
11195
11196
11197
11198
11199
11200
11201
11202
11203
11204
11205
11206
11207
11208
11209
11210
11211
11212
11213
11214
11215
11216
11217
11218
11219
11220
11221
11222
11223
11224
11225
11226
11227
11228
11229
11230
11231
11232
11233
11234
11235
11236
11237
11238
11239
11240
11241
11242
11243
11244
11245
11246
11247
11248
11249
11250
11251
11252
11253
11254
11255
11256
11257
11258
11259
11260
11261
11262
11263
11264
11265
11266
11267
11268
11269
11270
11271
11272
11273
11274
11275
11276
11277
11278
11279
11280
11281
11282
11283
11284
11285
11286
11287
11288
11289
11290
11291
11292
11293
11294
11295
11296
11297
11298
11299
11300
11301
11302
11303
11304
11305
11306
11307
11308
11309
11310
11311
11312
11313
11314
11315
11316
11317
11318
11319
11320
11321
11322
11323
11324
11325
11326
11327
11328
11329
11330
11331
11332
11333
11334
11335
11336
11337
11338
11339
11340
11341
11342
11343
11344
11345
11346
11347
11348
11349
11350
11351
11352
11353
11354
11355
11356
11357
11358
11359
11360
11361
11362
11363
11364
11365
11366
11367
11368
11369
11370
11371
11372
11373
11374
11375
11376
11377
11378
11379
11380
11381
11382
11383
11384
11385
11386
11387
11388
11389
11390
11391
11392
11393
11394
11395
11396
11397
11398
11399
11400
11401
11402
11403
11404
11405
11406
11407
11408
11409
11410
11411
11412
11413
11414
11415
11416
11417
11418
11419
11420
11421
11422
11423
11424
11425
11426
11427
11428
11429
11430
11431
11432
11433
11434
11435
11436
11437
11438
11439
11440
11441
11442
11443
11444
11445
11446
11447
11448
11449
11450
11451
11452
11453
11454
11455
11456
11457
11458
11459
11460
11461
11462
11463
11464
11465
11466
11467
11468
11469
11470
11471
11472
11473
11474
11475
11476
11477
11478
11479
11480
11481
11482
11483
11484
11485
11486
11487
11488
11489
11490
11491
11492
11493
11494
11495
11496
11497
11498
11499
11500
11501
11502
11503
11504
11505
11506
11507
11508
11509
11510
11511
11512
11513
11514
11515
11516
11517
11518
11519
11520
11521
11522
11523
11524
11525
11526
11527
11528
11529
11530
11531
11532
11533
11534
11535
11536
11537
11538
11539
11540
11541
11542
11543
11544
11545
11546
11547
11548
11549
11550
11551
11552
11553
11554
11555
11556
11557
11558
11559
11560
11561
11562
11563
11564
11565
11566
11567
11568
11569
11570
11571
11572
11573
11574
11575
11576
11577
11578
11579
11580
11581
11582
11583
11584
11585
11586
11587
11588
11589
11590
11591
11592
11593
11594
11595
11596
11597
11598
11599
11600
11601
11602
11603
11604
11605
11606
11607
11608
11609
11610
11611
11612
11613
11614
11615
11616
11617
11618
11619
11620
11621
11622
11623
11624
11625
11626
11627
11628
11629
11630
11631
11632
11633
11634
11635
11636
11637
11638
11639
11640
11641
11642
11643
11644
11645
11646
11647
11648
11649
11650
11651
11652
11653
11654
11655
11656
11657
11658
11659
11660
11661
11662
11663
11664
11665
11666
11667
11668
11669
11670
11671
11672
11673
11674
11675
11676
11677
11678
11679
11680
11681
11682
11683
11684
11685
11686
11687
11688
11689
11690
11691
11692
11693
11694
11695
11696
11697
11698
11699
11700
11701
11702
11703
11704
11705
11706
11707
11708
11709
11710
11711
11712
11713
11714
11715
11716
11717
11718
11719
11720
11721
11722
11723
11724
11725
11726
11727
11728
11729
11730
11731
11732
11733
11734
11735
11736
11737
11738
11739
11740
11741
11742
11743
11744
11745
11746
11747
11748
11749
11750
11751
11752
11753
11754
11755
11756
11757
11758
11759
11760
11761
11762
11763
11764
11765
11766
11767
11768
11769
11770
11771
11772
11773
11774
11775
11776
11777
11778
11779
11780
11781
11782
11783
11784
11785
11786
11787
11788
11789
11790
11791
11792
11793
11794
11795
11796
11797
11798
11799
11800
11801
11802
11803
11804
11805
11806
11807
11808
11809
11810
11811
11812
11813
11814
11815
11816
11817
11818
11819
11820
11821
11822
11823
11824
11825
11826
11827
11828
11829
11830
11831
11832
11833
11834
11835
11836
11837
11838
11839
11840
11841
11842
11843
11844
11845
11846
11847
11848
11849
11850
11851
11852
11853
11854
11855
11856
11857
11858
11859
11860
11861
11862
11863
11864
11865
11866
11867
11868
11869
11870
11871
11872
11873
11874
11875
11876
11877
11878
11879
11880
11881
11882
11883
11884
11885
11886
11887
11888
11889
11890
11891
11892
11893
11894
11895
11896
11897
11898
11899
11900
11901
11902
11903
11904
11905
11906
11907
11908
11909
11910
11911
11912
11913
11914
11915
11916
11917
11918
11919
11920
11921
11922
11923
11924
11925
11926
11927
11928
11929
11930
11931
11932
11933
11934
11935
11936
11937
11938
11939
11940
11941
11942
11943
11944
11945
11946
11947
11948
11949
11950
11951
11952
11953
11954
11955
11956
11957
11958
11959
11960
11961
11962
11963
11964
11965
11966
11967
11968
11969
11970
11971
11972
11973
11974
11975
11976
11977
11978
11979
11980
11981
11982
11983
11984
11985
11986
11987
11988
11989
11990
11991
11992
11993
11994
11995
11996
11997
11998
11999
12000
12001
12002
12003
12004
12005
12006
12007
12008
12009
12010
12011
12012
12013
12014
12015
12016
12017
12018
12019
12020
12021
12022
12023
12024
12025
12026
12027
12028
12029
12030
12031
12032
12033
12034
12035
12036
12037
12038
12039
12040
12041
12042
12043
12044
12045
12046
12047
12048
12049
12050
12051
12052
12053
12054
12055
12056
12057
12058
12059
12060
12061
12062
12063
12064
12065
12066
12067
12068
12069
12070
12071
12072
12073
12074
12075
12076
12077
12078
12079
12080
12081
12082
12083
12084
12085
12086
12087
12088
12089
12090
12091
12092
12093
12094
12095
12096
12097
12098
12099
12100
12101
12102
12103
12104
12105
12106
12107
12108
12109
12110
12111
12112
12113
12114
12115
12116
12117
12118
12119
12120
12121
12122
12123
12124
12125
12126
12127
12128
12129
12130
12131
12132
12133
12134
12135
12136
12137
12138
12139
12140
12141
12142
12143
12144
12145
12146
12147
12148
12149
12150
12151
12152
12153
12154
12155
12156
12157
12158
12159
12160
12161
12162
12163
12164
12165
12166
12167
12168
12169
12170
12171
12172
12173
12174
12175
12176
12177
12178
12179
12180
12181
12182
12183
12184
12185
12186
12187
12188
12189
12190
12191
12192
12193
12194
12195
12196
12197
12198
12199
12200
12201
12202
12203
12204
12205
12206
12207
12208
12209
12210
12211
12212
12213
12214
12215
12216
12217
12218
12219
12220
12221
12222
12223
12224
12225
12226
12227
12228
12229
12230
12231
12232
12233
12234
12235
12236
12237
12238
12239
12240
12241
12242
12243
12244
12245
12246
12247
12248
12249
12250
12251
12252
12253
12254
12255
12256
12257
12258
12259
12260
12261
12262
12263
12264
12265
12266
12267
12268
12269
12270
12271
12272
12273
12274
12275
12276
12277
12278
12279
12280
12281
12282
12283
12284
12285
12286
12287
12288
12289
12290
12291
12292
12293
12294
12295
12296
12297
12298
12299
12300
12301
12302
12303
12304
12305
12306
12307
12308
12309
12310
12311
12312
12313
12314
12315
12316
12317
12318
12319
12320
12321
12322
12323
12324
12325
12326
12327
12328
12329
12330
12331
12332
12333
12334
12335
12336
12337
12338
12339
12340
12341
12342
12343
12344
12345
12346
12347
12348
12349
12350
12351
12352
12353
12354
12355
12356
12357
12358
12359
12360
12361
12362
12363
12364
12365
12366
12367
12368
12369
12370
12371
12372
12373
12374
12375
12376
12377
12378
12379
12380
12381
12382
12383
12384
12385
12386
12387
12388
12389
12390
12391
12392
12393
12394
12395
12396
12397
12398
12399
12400
12401
12402
12403
12404
12405
12406
12407
12408
12409
12410
12411
12412
12413
12414
12415
12416
12417
12418
12419
12420
12421
12422
12423
12424
12425
12426
12427
12428
12429
12430
12431
12432
12433
12434
12435
12436
12437
12438
12439
12440
12441
12442
12443
12444
12445
12446
12447
12448
12449
12450
12451
12452
12453
12454
12455
12456
12457
12458
12459
12460
12461
12462
12463
12464
12465
12466
12467
12468
12469
12470
12471
12472
12473
12474
12475
12476
12477
12478
12479
12480
12481
12482
12483
12484
12485
12486
12487
12488
12489
12490
12491
12492
12493
12494
12495
12496
12497
12498
12499
12500
12501
12502
12503
12504
12505
12506
12507
12508
12509
12510
12511
12512
12513
12514
12515
12516
12517
12518
12519
12520
12521
12522
12523
12524
12525
12526
12527
12528
12529
12530
12531
12532
12533
12534
12535
12536
12537
12538
12539
12540
12541
12542
12543
12544
12545
12546
12547
12548
12549
12550
12551
12552
12553
12554
12555
12556
12557
12558
12559
12560
12561
12562
12563
12564
12565
12566
12567
12568
12569
12570
12571
12572
12573
12574
12575
12576
12577
12578
12579
12580
12581
12582
12583
12584
12585
12586
12587
12588
12589
12590
12591
12592
12593
12594
12595
12596
12597
12598
12599
12600
12601
12602
12603
12604
12605
12606
12607
12608
12609
12610
12611
12612
12613
12614
12615
12616
12617
12618
12619
12620
12621
12622
12623
12624
12625
12626
12627
12628
12629
12630
12631
12632
12633
12634
12635
12636
12637
12638
12639
12640
12641
12642
12643
12644
12645
12646
12647
12648
12649
12650
12651
12652
12653
12654
12655
12656
12657
12658
12659
12660
12661
12662
12663
12664
12665
12666
12667
12668
12669
12670
12671
12672
12673
12674
12675
12676
12677
12678
12679
12680
12681
12682
12683
12684
12685
12686
12687
12688
12689
12690
12691
12692
12693
12694
12695
12696
12697
12698
12699
12700
12701
12702
12703
12704
12705
12706
12707
12708
12709
12710
12711
12712
12713
12714
12715
12716
12717
12718
12719
12720
12721
12722
12723
12724
12725
12726
12727
12728
12729
12730
12731
12732
12733
12734
12735
12736
12737
12738
12739
12740
12741
12742
12743
12744
12745
12746
12747
12748
12749
12750
12751
12752
12753
12754
12755
12756
12757
12758
12759
12760
12761
12762
12763
12764
12765
12766
12767
12768
12769
12770
12771
12772
12773
12774
12775
12776
12777
12778
12779
12780
12781
12782
12783
12784
12785
12786
12787
12788
12789
12790
12791
12792
12793
12794
12795
12796
12797
12798
12799
12800
12801
12802
12803
12804
12805
12806
12807
12808
12809
12810
12811
12812
12813
12814
12815
12816
12817
12818
12819
12820
12821
12822
12823
12824
12825
12826
12827
12828
12829
12830
12831
12832
12833
12834
12835
12836
12837
12838
12839
12840
12841
12842
12843
12844
12845
12846
12847
12848
12849
12850
12851
12852
12853
12854
12855
12856
12857
12858
12859
12860
12861
12862
12863
12864
12865
12866
12867
12868
12869
12870
12871
12872
12873
12874
12875
12876
12877
12878
12879
12880
12881
12882
12883
12884
12885
12886
12887
12888
12889
12890
12891
12892
12893
12894
12895
12896
12897
12898
12899
12900
12901
12902
12903
12904
12905
12906
12907
12908
12909
12910
12911
12912
12913
12914
12915
12916
12917
12918
12919
12920
12921
12922
12923
12924
12925
12926
12927
12928
12929
12930
12931
12932
12933
12934
12935
12936
12937
12938
12939
12940
12941
12942
12943
12944
12945
12946
12947
12948
12949
12950
12951
12952
12953
12954
12955
12956
12957
12958
12959
12960
12961
12962
12963
12964
12965
12966
12967
12968
12969
12970
12971
12972
12973
12974
12975
12976
12977
12978
12979
12980
12981
12982
12983
12984
12985
12986
12987
12988
12989
12990
12991
12992
12993
12994
12995
12996
12997
12998
12999
13000
13001
13002
13003
13004
13005
13006
13007
13008
13009
13010
13011
13012
13013
13014
13015
13016
13017
13018
13019
13020
13021
13022
13023
13024
13025
13026
13027
13028
13029
13030
13031
13032
13033
13034
13035
13036
13037
13038
13039
13040
13041
13042
13043
13044
13045
13046
13047
13048
13049
13050
13051
13052
13053
13054
13055
13056
13057
13058
13059
13060
13061
13062
13063
13064
13065
13066
13067
13068
13069
13070
13071
13072
13073
13074
13075
13076
13077
13078
13079
13080
13081
13082
13083
13084
13085
13086
13087
13088
13089
13090
13091
13092
13093
13094
13095
13096
13097
13098
13099
13100
13101
13102
13103
13104
13105
13106
13107
13108
13109
13110
13111
13112
13113
13114
13115
13116
13117
13118
13119
13120
13121
13122
13123
13124
13125
13126
13127
13128
13129
13130
13131
13132
13133
13134
13135
13136
13137
13138
13139
13140
13141
13142
13143
13144
13145
13146
13147
13148
13149
13150
13151
13152
13153
13154
13155
13156
13157
13158
13159
13160
13161
13162
13163
13164
13165
13166
13167
13168
13169
13170
13171
13172
13173
13174
13175
13176
13177
13178
13179
13180
13181
13182
13183
13184
13185
13186
13187
13188
13189
13190
13191
13192
13193
13194
13195
13196
13197
13198
13199
13200
13201
13202
13203
13204
13205
13206
13207
13208
13209
13210
13211
13212
13213
13214
13215
13216
13217
13218
13219
13220
13221
13222
13223
13224
13225
13226
13227
13228
13229
13230
13231
13232
13233
13234
13235
13236
13237
13238
13239
13240
13241
13242
13243
13244
13245
13246
13247
13248
13249
13250
13251
13252
13253
13254
13255
13256
13257
13258
13259
13260
13261
13262
13263
13264
13265
13266
13267
13268
13269
13270
13271
13272
13273
13274
13275
13276
13277
13278
13279
13280
13281
13282
13283
13284
13285
13286
13287
13288
13289
13290
13291
13292
13293
13294
13295
13296
13297
13298
13299
13300
13301
13302
13303
13304
13305
13306
13307
13308
13309
13310
13311
13312
13313
13314
13315
13316
13317
13318
13319
13320
13321
13322
13323
13324
13325
13326
13327
13328
13329
13330
13331
13332
13333
13334
13335
13336
13337
13338
13339
13340
13341
13342
13343
13344
13345
13346
13347
13348
13349
13350
13351
13352
13353
13354
13355
13356
13357
13358
13359
13360
13361
13362
13363
13364
13365
13366
13367
13368
13369
13370
13371
13372
13373
13374
13375
13376
13377
13378
13379
13380
13381
13382
13383
13384
13385
13386
13387
13388
13389
13390
13391
13392
13393
13394
13395
13396
13397
13398
13399
13400
13401
13402
13403
13404
13405
13406
13407
13408
13409
13410
13411
13412
13413
13414
13415
13416
13417
13418
13419
13420
13421
13422
13423
13424
13425
13426
13427
13428
13429
13430
13431
13432
13433
13434
13435
13436
13437
13438
13439
13440
13441
13442
13443
13444
13445
13446
13447
13448
13449
13450
13451
13452
13453
13454
13455
13456
13457
13458
13459
13460
13461
13462
13463
13464
13465
13466
13467
13468
13469
13470
13471
13472
13473
13474
13475
13476
13477
13478
13479
13480
13481
13482
13483
13484
13485
13486
13487
13488
13489
13490
13491
13492
13493
13494
13495
13496
13497
13498
13499
13500
13501
13502
13503
13504
13505
13506
13507
13508
13509
13510
13511
13512
13513
13514
13515
13516
13517
13518
13519
13520
13521
13522
13523
13524
13525
13526
13527
13528
13529
13530
13531
13532
13533
13534
13535
13536
13537
13538
13539
13540
13541
13542
13543
13544
13545
13546
13547
13548
13549
13550
13551
13552
13553
13554
13555
13556
13557
13558
13559
13560
13561
13562
13563
13564
13565
13566
13567
13568
13569
13570
13571
13572
13573
13574
13575
13576
13577
13578
13579
13580
13581
13582
13583
13584
13585
13586
13587
13588
13589
13590
13591
13592
13593
13594
13595
13596
13597
13598
13599
13600
13601
13602
13603
13604
13605
13606
13607
13608
13609
13610
13611
13612
13613
13614
13615
13616
13617
13618
13619
13620
13621
13622
13623
13624
13625
13626
13627
13628
13629
13630
13631
13632
13633
13634
13635
13636
13637
13638
13639
13640
13641
13642
13643
13644
13645
13646
13647
13648
13649
13650
13651
13652
13653
13654
13655
13656
13657
13658
13659
13660
13661
13662
13663
13664
13665
13666
13667
13668
13669
13670
13671
13672
13673
13674
13675
13676
13677
13678
13679
13680
13681
13682
13683
13684
13685
13686
13687
13688
13689
13690
13691
13692
13693
13694
13695
13696
13697
13698
13699
13700
13701
13702
13703
13704
13705
13706
13707
13708
13709
13710
13711
13712
13713
13714
13715
13716
13717
13718
13719
13720
13721
13722
13723
13724
13725
13726
13727
13728
13729
13730
13731
13732
13733
13734
13735
13736
13737
13738
13739
13740
13741
13742
13743
13744
13745
13746
13747
13748
13749
13750
13751
13752
13753
13754
13755
13756
13757
13758
13759
13760
13761
13762
13763
13764
13765
13766
13767
13768
13769
13770
13771
13772
13773
13774
13775
13776
13777
13778
13779
13780
13781
13782
13783
13784
13785
13786
13787
13788
13789
13790
13791
13792
13793
13794
13795
13796
13797
13798
13799
13800
13801
13802
13803
13804
13805
13806
13807
13808
13809
13810
13811
13812
13813
13814
13815
13816
13817
13818
13819
13820
13821
13822
13823
13824
13825
13826
13827
13828
13829
13830
13831
13832
13833
13834
13835
13836
13837
13838
13839
13840
13841
13842
13843
13844
13845
13846
13847
13848
13849
13850
13851
13852
13853
13854
13855
13856
13857
13858
13859
13860
13861
13862
13863
13864
13865
13866
13867
13868
13869
13870
13871
13872
13873
13874
13875
13876
13877
13878
13879
13880
13881
13882
13883
13884
13885
13886
13887
13888
13889
13890
13891
13892
13893
13894
13895
13896
13897
13898
13899
13900
13901
13902
13903
13904
13905
13906
13907
13908
13909
13910
13911
13912
13913
13914
13915
13916
13917
13918
13919
13920
13921
13922
13923
13924
13925
13926
13927
13928
13929
13930
13931
13932
13933
13934
13935
13936
13937
13938
13939
13940
13941
13942
13943
13944
13945
13946
13947
13948
13949
13950
13951
13952
13953
13954
13955
13956
13957
13958
13959
13960
13961
13962
13963
13964
13965
13966
13967
13968
13969
13970
13971
13972
13973
13974
13975
13976
13977
13978
13979
13980
13981
13982
13983
13984
13985
13986
13987
13988
13989
13990
13991
13992
13993
13994
13995
13996
13997
13998
13999
14000
14001
14002
14003
14004
14005
14006
14007
14008
14009
14010
14011
14012
14013
14014
14015
14016
14017
14018
14019
14020
14021
14022
14023
14024
14025
14026
14027
14028
14029
14030
14031
14032
14033
14034
14035
14036
14037
14038
14039
14040
14041
14042
14043
14044
14045
14046
14047
14048
14049
14050
14051
14052
14053
14054
14055
14056
14057
14058
14059
14060
14061
14062
14063
14064
14065
14066
14067
14068
14069
14070
14071
14072
14073
14074
14075
14076
14077
14078
14079
14080
14081
14082
14083
14084
14085
14086
14087
14088
14089
14090
14091
14092
14093
14094
14095
14096
14097
14098
14099
14100
14101
14102
14103
14104
14105
14106
14107
14108
14109
14110
14111
14112
14113
14114
14115
14116
14117
14118
14119
14120
14121
14122
14123
14124
14125
14126
14127
14128
14129
14130
14131
14132
14133
14134
14135
14136
14137
14138
14139
14140
14141
14142
14143
14144
14145
14146
14147
14148
14149
14150
14151
14152
14153
14154
14155
14156
14157
14158
14159
14160
14161
14162
14163
14164
14165
14166
14167
14168
14169
14170
14171
14172
14173
14174
14175
14176
14177
14178
14179
14180
14181
14182
14183
14184
14185
14186
14187
14188
14189
14190
14191
14192
14193
14194
14195
14196
14197
14198
14199
14200
14201
14202
14203
14204
14205
14206
14207
14208
14209
14210
14211
14212
14213
14214
14215
14216
14217
14218
14219
14220
14221
14222
14223
14224
14225
14226
14227
14228
14229
14230
14231
14232
14233
14234
14235
14236
14237
14238
14239
14240
14241
14242
14243
14244
14245
14246
14247
14248
14249
14250
14251
14252
14253
14254
14255
14256
14257
14258
14259
14260
14261
14262
14263
14264
14265
14266
14267
14268
14269
14270
14271
14272
14273
14274
14275
14276
14277
14278
14279
14280
14281
14282
14283
14284
14285
14286
14287
14288
14289
14290
14291
14292
14293
14294
14295
14296
14297
14298
14299
14300
14301
14302
14303
14304
14305
14306
14307
14308
14309
14310
14311
14312
14313
14314
14315
14316
14317
14318
14319
14320
14321
14322
14323
14324
14325
14326
14327
14328
14329
14330
14331
14332
14333
14334
14335
14336
14337
14338
14339
14340
14341
14342
14343
14344
14345
14346
14347
14348
14349
14350
14351
14352
14353
14354
14355
14356
14357
14358
14359
14360
14361
14362
14363
14364
14365
14366
14367
14368
14369
14370
14371
14372
14373
14374
14375
14376
14377
14378
14379
14380
14381
14382
14383
14384
14385
14386
14387
14388
14389
14390
14391
14392
14393
14394
14395
14396
14397
14398
14399
14400
14401
14402
14403
14404
14405
14406
14407
14408
14409
14410
14411
14412
14413
14414
14415
14416
14417
14418
14419
14420
14421
14422
14423
14424
14425
14426
14427
14428
14429
14430
14431
14432
14433
14434
14435
14436
14437
14438
14439
14440
14441
14442
14443
14444
14445
14446
14447
14448
14449
14450
14451
14452
14453
14454
14455
14456
14457
14458
14459
14460
14461
14462
14463
14464
14465
14466
14467
14468
14469
14470
14471
14472
14473
14474
14475
14476
14477
14478
14479
14480
14481
14482
14483
14484
14485
14486
14487
14488
14489
14490
14491
14492
14493
14494
14495
14496
14497
14498
14499
14500
14501
14502
14503
14504
14505
14506
14507
14508
14509
14510
14511
14512
14513
14514
14515
14516
14517
14518
14519
14520
14521
14522
14523
14524
14525
14526
14527
14528
14529
14530
14531
14532
14533
14534
14535
14536
14537
14538
14539
14540
14541
14542
14543
14544
14545
14546
14547
14548
14549
14550
14551
14552
14553
14554
14555
14556
14557
14558
14559
14560
14561
14562
14563
14564
14565
14566
14567
14568
14569
14570
14571
14572
14573
14574
14575
14576
14577
14578
14579
14580
14581
14582
14583
14584
14585
14586
14587
14588
14589
14590
14591
14592
14593
14594
14595
14596
14597
14598
14599
14600
14601
14602
14603
14604
14605
14606
14607
14608
14609
14610
14611
14612
14613
14614
14615
14616
14617
14618
14619
14620
14621
14622
14623
14624
14625
14626
14627
14628
14629
14630
14631
14632
14633
14634
14635
14636
14637
14638
14639
14640
14641
14642
14643
14644
14645
14646
14647
14648
14649
14650
14651
14652
14653
14654
14655
14656
14657
14658
14659
14660
14661
14662
14663
14664
14665
14666
14667
14668
14669
14670
14671
14672
14673
14674
14675
14676
14677
14678
14679
14680
14681
14682
14683
14684
14685
14686
14687
14688
14689
14690
14691
14692
14693
14694
14695
14696
14697
14698
14699
14700
14701
14702
14703
14704
14705
14706
14707
14708
14709
14710
14711
14712
14713
14714
14715
14716
14717
14718
14719
14720
14721
14722
14723
14724
14725
14726
14727
14728
14729
14730
14731
14732
14733
14734
14735
14736
14737
14738
14739
14740
14741
14742
14743
14744
14745
14746
14747
14748
14749
14750
14751
14752
14753
14754
14755
14756
14757
14758
14759
14760
14761
14762
14763
14764
14765
14766
14767
14768
14769
14770
14771
14772
14773
14774
14775
14776
14777
14778
14779
14780
14781
14782
14783
14784
14785
14786
14787
14788
14789
14790
14791
14792
14793
14794
14795
14796
14797
14798
14799
14800
14801
14802
14803
14804
14805
14806
14807
14808
14809
14810
14811
14812
14813
14814
14815
14816
14817
14818
14819
14820
14821
14822
14823
14824
14825
14826
14827
14828
14829
14830
14831
14832
14833
14834
14835
14836
14837
14838
14839
14840
14841
14842
14843
14844
14845
14846
14847
14848
14849
14850
14851
14852
14853
14854
14855
14856
14857
14858
14859
14860
14861
14862
14863
14864
14865
14866
14867
14868
14869
14870
14871
14872
14873
14874
14875
14876
14877
14878
14879
14880
14881
14882
14883
14884
14885
14886
14887
14888
14889
14890
14891
14892
14893
14894
14895
14896
14897
14898
14899
14900
14901
14902
14903
14904
14905
14906
14907
14908
14909
14910
14911
14912
14913
14914
14915
14916
14917
14918
14919
14920
14921
14922
14923
14924
14925
14926
14927
14928
14929
14930
14931
14932
14933
14934
14935
14936
14937
14938
14939
14940
14941
14942
14943
14944
14945
14946
14947
14948
14949
14950
14951
14952
14953
14954
14955
14956
14957
14958
14959
14960
14961
14962
14963
14964
14965
14966
14967
14968
14969
14970
14971
14972
14973
14974
14975
14976
14977
14978
14979
14980
14981
14982
14983
14984
14985
14986
14987
14988
14989
14990
14991
14992
14993
14994
14995
14996
14997
14998
14999
15000
15001
15002
15003
15004
15005
15006
15007
15008
15009
15010
15011
15012
15013
15014
15015
15016
15017
15018
15019
15020
15021
15022
15023
15024
15025
15026
15027
15028
15029
15030
15031
15032
15033
15034
15035
15036
15037
15038
15039
15040
15041
15042
15043
15044
15045
15046
15047
15048
15049
15050
15051
15052
15053
15054
15055
15056
15057
15058
15059
15060
15061
15062
15063
15064
15065
15066
15067
15068
15069
15070
15071
15072
15073
15074
15075
15076
15077
15078
15079
15080
15081
15082
15083
15084
15085
15086
15087
15088
15089
15090
15091
15092
15093
15094
15095
15096
15097
15098
15099
15100
15101
15102
15103
15104
15105
15106
15107
15108
15109
15110
15111
15112
15113
15114
15115
15116
15117
15118
15119
15120
15121
15122
15123
15124
15125
15126
15127
15128
15129
15130
15131
15132
15133
15134
15135
15136
15137
15138
15139
15140
15141
15142
15143
15144
15145
15146
15147
15148
15149
15150
15151
15152
15153
15154
15155
15156
15157
15158
15159
15160
15161
15162
15163
15164
15165
15166
15167
15168
15169
15170
15171
15172
15173
15174
15175
15176
15177
15178
15179
15180
15181
15182
15183
15184
15185
15186
15187
15188
15189
15190
15191
15192
15193
15194
15195
15196
15197
15198
15199
15200
15201
15202
15203
15204
15205
15206
15207
15208
15209
15210
15211
15212
15213
15214
15215
15216
15217
15218
15219
15220
15221
15222
15223
15224
15225
15226
15227
15228
15229
15230
15231
15232
15233
15234
15235
15236
15237
15238
15239
15240
15241
15242
15243
15244
15245
15246
15247
15248
15249
15250
15251
15252
15253
15254
15255
15256
15257
15258
15259
15260
15261
15262
15263
15264
15265
15266
15267
15268
15269
15270
15271
15272
15273
15274
15275
15276
15277
15278
15279
15280
15281
15282
15283
15284
15285
15286
15287
15288
15289
15290
15291
15292
15293
15294
15295
15296
15297
15298
15299
15300
15301
15302
15303
15304
15305
15306
15307
15308
15309
15310
15311
15312
15313
15314
15315
15316
15317
15318
15319
15320
15321
15322
15323
15324
15325
15326
15327
15328
15329
15330
15331
15332
15333
15334
15335
15336
15337
15338
15339
15340
15341
15342
15343
15344
15345
15346
15347
15348
15349
15350
15351
15352
15353
15354
15355
15356
15357
15358
15359
15360
15361
15362
15363
15364
15365
15366
15367
15368
15369
15370
15371
15372
15373
15374
15375
15376
15377
15378
15379
15380
15381
15382
15383
15384
15385
15386
15387
15388
15389
15390
15391
15392
15393
15394
15395
15396
15397
15398
15399
15400
15401
15402
15403
15404
15405
15406
15407
15408
15409
15410
15411
15412
15413
15414
15415
15416
15417
15418
15419
15420
15421
15422
15423
15424
15425
15426
15427
15428
15429
15430
15431
15432
15433
15434
15435
15436
15437
15438
15439
15440
15441
15442
15443
15444
15445
15446
15447
15448
15449
% \iffalse
%<*internal|bbx|cbx|dbx|lbx|doc>
\def\Version{2023/02/01 v3.0}
%</internal|bbx|cbx|dbx|lbx|doc>
%<*internal>
\iffalse
%</internal>
%<*bbx|cbx|dbx|lbx>
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%</bbx|cbx|dbx|lbx>
%<*bbx&o>
\ProvidesFile{oxref.bbx}
    [\Version\space Base settings for bibliography styles inspired by the Oxford Guide to Style]
%</bbx&o>
%<*bbx&n>
%<default>\ProvidesFile{oxnotes.bbx}
%<ibid>\ProvidesFile{oxnotes-ibid.bbx}
%<note>\ProvidesFile{oxnotes-note.bbx}
%<inote>\ProvidesFile{oxnotes-inote.bbx}
%<trad1>\ProvidesFile{oxnotes-trad1.bbx}
%<trad2>\ProvidesFile{oxnotes-trad2.bbx}
%<trad3>\ProvidesFile{oxnotes-trad3.bbx}
    [\Version\space Footnote-based bibliography style inspired by the Oxford Guide to Style]
%</bbx&n>
%<*bbx&m>
\ProvidesFile{oxnum.bbx}
    [\Version\space Numeric bibliography style inspired by the Oxford Guide to Style]
%</bbx&m>
%<*bbx&a>
\ProvidesFile{oxalph.bbx}
    [\Version\space Alphabetic bibliography style inspired by the Oxford Guide to Style]
%</bbx&a>
%<*bbx&y>
\ProvidesFile{oxyear.bbx}
    [\Version\space Author-year bibliography style inspired by the Oxford Guide to Style]
%</bbx&y>
%<*cbx&n>
%<default>\ProvidesFile{oxnotes.cbx}
%<ibid>\ProvidesFile{oxnotes-ibid.cbx}
%<note>\ProvidesFile{oxnotes-note.cbx}
%<inote>\ProvidesFile{oxnotes-inote.cbx}
%<trad1>\ProvidesFile{oxnotes-trad1.cbx}
%<trad2>\ProvidesFile{oxnotes-trad2.cbx}
%<trad3>\ProvidesFile{oxnotes-trad3.cbx}
    [\Version\space Footnote-based citation style inspired by the Oxford Guide to Style]
%</cbx&n>
%<*cbx&m>
\ProvidesFile{oxnum.cbx}
    [\Version\space Numeric citation style inspired by the Oxford Guide to Style]
%</cbx&m>
%<*cbx&a>
\ProvidesFile{oxalph.cbx}
    [\Version\space Alphabetic citation style inspired by the Oxford Guide to Style]
%</cbx&a>
%<*cbx&y>
\ProvidesFile{oxyear.cbx}
    [\Version\space Author-year citation style inspired by the Oxford Guide to Style]
%</cbx&y>
%<*dbx>
%<*n>
%<default>\ProvidesFile{oxnotes.dbx}
%<ibid>\ProvidesFile{oxnotes-ibid.dbx}
%<note>\ProvidesFile{oxnotes-note.dbx}
%<inote>\ProvidesFile{oxnotes-inote.dbx}
%<trad1>\ProvidesFile{oxnotes-trad1.dbx}
%<trad2>\ProvidesFile{oxnotes-trad2.dbx}
%<trad3>\ProvidesFile{oxnotes-trad3.dbx}
%</n>
%<m>\ProvidesFile{oxnum.dbx}
%<a>\ProvidesFile{oxalph.dbx}
%<y>\ProvidesFile{oxyear.dbx}
    [\Version\space Data model for the Oxref family of styles]
%</dbx>
%<*lbx&en>
\ProvidesFile{english-oxref.lbx}
    [\Version\space Generic English conventions required by the biblatex-oxref styles]
%</lbx&en>
%<*lbx&gb>
\ProvidesFile{british-oxref.lbx}
    [\Version\space British English conventions required by the biblatex-oxref styles]
%</lbx&gb>
%<*lbx&us>
\ProvidesFile{american-oxref.lbx}
    [\Version\space American English conventions required by the biblatex-oxref styles]
%</lbx&us>
%<*doc&n>
\ProvidesFile{oxnotes-doc.tex}
    [\Version\space Footnote-based biblatex style inspired by the Oxford Guide to Style]
%</doc&n>
%<*doc&m>
\ProvidesFile{oxnum-doc.tex}
    [\Version\space Numeric biblatex style inspired by the Oxford Guide to Style]
%</doc&m>
%<*doc&a>
\ProvidesFile{oxalph-doc.tex}
    [\Version\space Alphabetic biblatex style inspired by the Oxford Guide to Style]
%</doc&a>
%<*doc&y>
\ProvidesFile{oxyear-doc.tex}
    [\Version\space Author-year biblatex style inspired by the Oxford Guide to Style]
%</doc&y>
%<*readme>
# biblatex-oxref: Biblatex styles inspired by the *Oxford Guide to Style*

This bundle provides four [biblatex] styles that implement (some of) the
stipulations and examples provided by the 2014 *New Hart's Rules* and the 2002
*Oxford Guide to Style*:

  * `oxnotes` is a style similar to the standard `verbose`,
    intended for use with footnotes;
  * `oxnum` is a style similar to the standard `numeric`,
    intended for use with numeric in-text citations.
  * `oxalph` is a style similar to the standard `alphabetic`,
    intended for use with alphabetic in-text citations.
  * `oxyear` is a style similar to the standard `authoryear`,
    intended for use with parenthetical in-text citations.

[biblatex]: http://ctan.org/pkg/biblatex
%</readme>
%<*bib>
@reference{ritter2002ogs,
  editor = {R. M. Ritter},
  editortype= {editorcm},
  title = {The {Oxford} Guide to Style},
  date = {2002},
  publisher = {Oxford University Press},
  location = {Oxford, UK}}
@reference{waddingham2014nhr,
  editor = {Anne Waddingham},
  title = {New {Hart's} Rules},
  subtitle = {The {Oxford} Guide to Style},
  date = {2014},
  edition = {2},
  publisher = {Oxford University Press},
  location = {Oxford, UK}}
@book{law.oxford2012oscola,
  author = {{Faculty of Law, University of Oxford}},
  editor = {Donal Nolan and Sandra Meredith},
  title = {{OSCOLA}},
  subtitle = {The {Oxford} {University} Standard for Citation of Legal Authorities},
  date = {2012},
  edition = {4},
  publisher = {Hart},
  location = {Oxford, UK},
  url = {https://www.law.ox.ac.uk/oscola}}
%</bib>
%<*internal>
\fi
\def\nameofplainTeX{plain}
\ifx\fmtname\nameofplainTeX\else
  \expandafter\begingroup
\fi
%</internal>
%<*install>
\input docstrip.tex
\keepsilent
\askforoverwritefalse

\nopreamble\nopostamble

\usedir{doc/latex/\jobname}
\generate{
  \file{README.md}{\from{\jobname.dtx}{readme}}
  \file{\jobname.bib}{\from{\jobname.dtx}{bib}}
}

\preamble
----------------------------------------------------------------
biblatex-oxref --- Biblatex styles inspired by the Oxford Guide to Style
Author:  Alex Ball
E-mail:  a.j.ball@bath.ac.uk
License: Released under the LaTeX Project Public License v1.3c or later
See:     http://www.latex-project.org/lppl.txt
----------------------------------------------------------------

\endpreamble
\postamble

Copyright (C) 2016–2023 Alex Ball
\endpostamble

\usedir{tex/latex/\jobname}
\generate{
  \file{\jobname.bbx}{\from{\jobname.dtx}{bbx,o}}
  \file{oxnotes.bbx}{\from{\jobname.dtx}{bbx,n,default}}
  \file{oxnotes-ibid.bbx}{\from{\jobname.dtx}{bbx,n,ibid}}
  \file{oxnotes-note.bbx}{\from{\jobname.dtx}{bbx,n,note}}
  \file{oxnotes-inote.bbx}{\from{\jobname.dtx}{bbx,n,inote}}
  \file{oxnotes-trad1.bbx}{\from{\jobname.dtx}{bbx,n,trad1}}
  \file{oxnotes-trad2.bbx}{\from{\jobname.dtx}{bbx,n,trad2}}
  \file{oxnotes-trad3.bbx}{\from{\jobname.dtx}{bbx,n,trad3}}
  \file{oxnum.bbx}{\from{\jobname.dtx}{bbx,m}}
  \file{oxalph.bbx}{\from{\jobname.dtx}{bbx,a}}
  \file{oxyear.bbx}{\from{\jobname.dtx}{bbx,y}}
  \file{oxnotes.cbx}{\from{\jobname.dtx}{cbx,n,default}}
  \file{oxnotes-ibid.cbx}{\from{\jobname.dtx}{cbx,n,ibid}}
  \file{oxnotes-note.cbx}{\from{\jobname.dtx}{cbx,n,note}}
  \file{oxnotes-inote.cbx}{\from{\jobname.dtx}{cbx,n,inote}}
  \file{oxnotes-trad1.cbx}{\from{\jobname.dtx}{cbx,n,trad1}}
  \file{oxnotes-trad2.cbx}{\from{\jobname.dtx}{cbx,n,trad2}}
  \file{oxnotes-trad3.cbx}{\from{\jobname.dtx}{cbx,n,trad3}}
  \file{oxnum.cbx}{\from{\jobname.dtx}{cbx,m}}
  \file{oxalph.cbx}{\from{\jobname.dtx}{cbx,a}}
  \file{oxyear.cbx}{\from{\jobname.dtx}{cbx,y}}
  \file{oxnotes.dbx}{\from{\jobname.dtx}{dbx,n,default}}
  \file{oxnotes-ibid.dbx}{\from{\jobname.dtx}{dbx,n,ibid}}
  \file{oxnotes-note.dbx}{\from{\jobname.dtx}{dbx,n,note}}
  \file{oxnotes-inote.dbx}{\from{\jobname.dtx}{dbx,n,inote}}
  \file{oxnotes-trad1.dbx}{\from{\jobname.dtx}{dbx,n,trad1}}
  \file{oxnotes-trad2.dbx}{\from{\jobname.dtx}{dbx,n,trad2}}
  \file{oxnotes-trad3.dbx}{\from{\jobname.dtx}{dbx,n,trad3}}
  \file{oxnum.dbx}{\from{\jobname.dtx}{dbx,m}}
  \file{oxalph.dbx}{\from{\jobname.dtx}{dbx,a}}
  \file{oxyear.dbx}{\from{\jobname.dtx}{dbx,y}}
  \file{american-\jobname.lbx}{\from{\jobname.dtx}{lbx,us}}
  \file{british-\jobname.lbx}{\from{\jobname.dtx}{lbx,gb}}
  \file{english-\jobname.lbx}{\from{\jobname.dtx}{lbx,en}}
  \file{oxnotes-doc.tex}{\from{\jobname.dtx}{doc,n}}
  \file{oxnum-doc.tex}{\from{\jobname.dtx}{doc,m}}
  \file{oxalph-doc.tex}{\from{\jobname.dtx}{doc,a}}
  \file{oxyear-doc.tex}{\from{\jobname.dtx}{doc,y}}
}
%</install>
%<install>\endbatchfile
%<*internal>
\usedir{source/latex/\jobname}
\generate{
  \file{\jobname.ins}{\from{\jobname.dtx}{install}}
}
\ifx\fmtname\nameofplainTeX
  \expandafter\endbatchfile
\else
  \expandafter\endgroup
\fi
%</internal>
%<*driver>
\ProvidesFile{oxref.dtx}
    [\Version\space Biblatex styles inspired by the Oxford Guide to Style]
\PassOptionsToPackage{style=oxnotes}{biblatex}
%</driver>
%<doc&n>\PassOptionsToPackage{style=oxnotes,scnames,varissuedate,anon}{biblatex}
%<doc&m>\PassOptionsToPackage{style=oxnum,scnames,varissuedate,anon,backref=true}{biblatex}
%<doc&a>\PassOptionsToPackage{style=oxalph,varissuedate,anon}{biblatex}
%<doc&y>\PassOptionsToPackage{style=oxyear,varissuedate,anon}{biblatex}
%<*driver|doc>
\documentclass[extrafontsizes,11pt,a4paper,oneside]{memoir}
\setlrmarginsandblock{3cm}{3cm}{*}
\setulmarginsandblock{2.5cm}{2.5cm}{*}
\checkandfixthelayout
% Document divisions
\chapterstyle{ell}
\renewcommand{\prechapterprecis}{%
  \vspace*{\prechapterprecisshift}%
  \begin{flushright}\precisfont
}
\renewcommand{\postchapterprecis}{\end{flushright}}
\hangsecnum
\setsecheadstyle{\Large\bfseries\raggedright}
\setsubsecheadstyle{\large\bfseries\scshape\raggedright}
\setsecnumdepth{subsection}
% Pagination and headers
\nouppercaseheads
\makeoddhead{myheadings}{\textsc{\leftmark}}{}{\thepage}
\makepsmarks{myheadings}{%
  \def\chaptermark##1{\markboth{##1}{##1}}%
  \def\sectionmark##1{\markright{##1}}%
}
\pagestyle{myheadings}
\aliaspagestyle{title}{empty}
% Paragraphs and lists
\setlength{\parindent}{0pt}\nonzeroparskip
\firmlists

\usepackage[british]{babel}
\usepackage[mono=false,defaultfeatures={SmallCapsFeatures={Letters=SmallCaps,Renderer=Basic,Ligatures=NoCommon}}]{libertine}
\usepackage{fontawesome}[2015/07/07]
\newcommand{\booksym}{\makebox[1em][c]{\faicon{book}}}
\newcommand{\cogsym}{\makebox[1em][c]{\faicon{cog}}}
\makeatletter
\@ifpackageloaded{fontspec}{%
  \setmonofont[Scale=MatchLowercase,StylisticSet=1,AutoFakeSlant]{Inconsolatazi4}
}{%
  \usepackage[utf8]{inputenc}
  \usepackage[varl]{zi4}
}
\makeatother

\usepackage{xcolor,xparse}
\definecolor{Green}{rgb}{0,.5,0}
\colorlet{ok}{Green}
\colorlet{todo}{red}
\colorlet{hacked}{orange}
\colorlet{manual}{purple}

\usepackage{tcolorbox}
\tcbuselibrary{skins,xparse,documentation,breakable,minted}
\colorlet{Option}{violet}
\colorlet{Command}{red!75!black}
\colorlet{Environment}{blue!75!black}
\colorlet{Value}{olive!75!black}
\colorlet{Color}{cyan!75!black}
\tcbset
  { enhanced
  , listing engine=minted
  , minted options=
    { breaklines
    , fontsize=\footnotesize
%<*!doc>
    , linenos
    , numbersep=20pt
    , firstnumber=last
%</!doc>
    }
  , index format=pgf
  , color command=Command
  , color environment=Environment
  , color key=Option
  , color value=Value
  , color color=Color
  }
\renewcommand{\theFancyVerbLine}{\footnotesize\itshape\color{gray}\arabic{FancyVerbLine}}
\let\tcbcs=\cs
\renewcommand*{\cs}[1]{\textcolor{Command}{\tcbcs{#1}}}
\def\sqbrackets#1{%
  \texttt{\textcolor{Option}{[}#1\textcolor{Option}{]}}}
\def\brackets#1{%
  \texttt{\textcolor{Environment}{\char`\{}#1\textcolor{Environment}{\char`\}}}}
\def\marg#1{%
  \textcolor{Environment}{\ttfamily\char`\{}\meta{#1}\textcolor{Environment}{\ttfamily\char`\}}}
\newcommand*{\env}[1]{\textcolor{Environment}{\ttfamily #1}}
\newcommand*{\key}[1]{\textcolor{Option}{\ttfamily #1}}
\newcommand*{\val}[1]{\textcolor{Value}{\ttfamily #1}}
\makeatletter
\newcommand{\resetmintedformat}{%
  % Comments
  \expandafter\def\csname PYGdefault@tok@c\endcsname{\let\PYGdefault@it=\textit\def\PYGdefault@tc####1{\textcolor{gray}{####1}}}
  % Command sequences
  \expandafter\def\csname PYGdefault@tok@k\endcsname{\def\PYGdefault@tc####1{\textcolor{Command}{####1}}}
  % Optional arguments
  \expandafter\def\csname PYGdefault@tok@na\endcsname{\def\PYGdefault@tc####1{\textcolor{Option}{####1}}}
  % Braces
  \expandafter\def\csname PYGdefault@tok@nb\endcsname{\def\PYGdefault@tc####1{\textcolor{Environment}{####1}}}
}
\apptocmd{\minted@checkstyle}{\resetmintedformat}{}{}
\makeatother

\RecustomVerbatimEnvironment
  {Verbatim}{Verbatim}
  {commentchar=\%}

\usepackage{xpatch,csquotes,multicol}

\usepackage
[backend=biber%
,hyperref=false%
%,isbn=false%
]{biblatex}
\addbibresource{oxref.bib}
\setcounter{biburllcpenalty}{900}
\setcounter{biburlucpenalty}{800}
\setcounter{biburlnumpenalty}{700}
\DeclareBibliographyCategory{hidden}
\makeatletter
\DeclareCiteCommand{\fullcite}
  {\usebibmacro{prenote}}
  {\usedriver
     {\defcounter{maxnames}{\blx@maxbibnames}}
     {\thefield{entrytype}}}
  {\multicitedelim}
  {\usebibmacro{postnote}\finentrypunct}
\makeatother
% \xpretobibmacro{finentry}{%
%   \ifboolexpr{ test {\ifcitation} and  }{%
%     \finentrypunct
%   }{}%
% }{}{}
%<*doc>
% Shorthands useful for oxyear make overlong labels for oxnum/oxalph,
% so we remove them.
\DeclareSourcemap{%
  \maps[datatype=bibtex]{%
    \map[overwrite=true]{%
%<a>      \pertype{legislation}
%<a>      \pertype{legal}
%<n|y>      \pernottype{legslation}
%<n|y>      \pernottype{legal}
      \step[fieldset=shorthand, null=true]
    }%
  }%
}
%</doc>

%<*!doc>
\usepackage[tightLists=false]{markdown}
\markdownSetup{rendererPrototypes={%
    link = {\href{#3}{#1}},%
}}

%</!doc>
\hypersetup{pdfborder={0 0 0},pdfencoding=unicode}
\usepackage[noabbrev,capitalize,nameinlink]{cleveref}
\crefname{page}{page}{pages}

\NewDocumentCommand{\pkg}{om}{%
  \IfNoValueTF{#1}
    {\lowercase{\href{http://www.ctan.org/pkg/#2}}{\textsf{#2}}}
    {\lowercase{\href{http://www.ctan.org/pkg/#1-#2}}{\textsf{#2}}}%
}
\newcommand*{\lit}[1]{\textsf{#1}}
\newcommand*{\code}[1]{\texttt{#1}}
\newcommand*{\aside}[1]{\textcolor{violet}{[\textsc{tip:} #1]}}
\newcommand{\tip}[1]{\hangfrom{\makebox[2em][c]{\faLightbulbO}}#1\par}
\newcommand{\info}[1]{\hangfrom{\makebox[2em][c]{\faInfoCircle}}#1\par}
\newcommand{\hack}[1]{\hangfrom{\makebox[2em][c]{\faWrench}}#1\par}

% For debugging; userd is either ‘todo’, ‘hacked’, ‘manual’
\makeatletter
\def\CiteStatus{todo}
\newcommand{\dbgcolor}[2]{%
  \bgroup
  \blx@citecmdinit
  \blx@citeinit
  \def\blx@precode{}%
  \def\blx@postcode{}%
  \def\blx@loopcode{%
    \iffieldundef{userd}
    {\xdef\CiteStatus{ok}}
    {\xdef\CiteStatus{\abx@field@userd}}}%
  \blx@citeloop{#1}%
  \textcolor{\CiteStatus}{#2}%
  \egroup
}
\makeatother
% bibexbox displays a sample reference:
% (colour)<source reference>[citation postnote]{bib key}[additional TCB options]
% Put hand-coded reference in the environment upper part.
% Put a bib entry (wrapped in a Verbatim environment) in the environment lower part.
\NewTColorBox{bibexbox}{D(){ok}d<>omo}%
  {bicolor
  ,colframe = #1
  ,colback = #1!5!white
  ,colbacklower = white
  ,fontlower = \footnotesize
  ,before upper = {\hangfrom{\booksym\space}\biburlsetup}
  ,IfNoValueTF={#3}%
    {after upper = {\par\hangfrom{\cogsym\space}\fullcite{#4}}
    }%
    {after upper = {\par\hangfrom{\cogsym\space}\fullcite[#3]{#4}}
    ,title = {\texttt{\string\fullcite[#3]\{#4\}}}
    }
  ,IfNoValueTF={#2}{}%
    {overlay = {
      \node[anchor=south east,text=teal] at (frame.south east) {#2};
      }
    }
  ,phantomlabel={ex:#4}
  ,IfNoValueTF={#5}{}{#5}
  }
\NewTotalTColorBox{\spec}{m}%
  {enhanced
  ,sharp corners = west
  ,colframe = teal
  ,colback = teal!5!white
  ,toprule = 0pt
  ,bottomrule = 0pt
  ,rightrule = 0pt
  }{#1}
% egcite displays a sample citation:
% (colour)[title]{hand-coded citation text}[additional TCB options]
% Put the citation command in the environment.
\NewTCBListing{egcite}{D(){ok} o m !o}%
  {colframe = #1
  ,colback = #1!5!white
  ,listing side text
  ,lefthand width = 14em
  ,IfNoValueTF={#2}{}{title = #2}
  ,before lower = {\raggedright\ifblank{#3}{}{\hangfrom{\booksym\space}#3\par}\hangfrom{\cogsym\space}}
  ,IfNoValueTF={#4}{}{#4}}
% egcite* uses upper and lower portions
\NewTCBListing{egcite*}{D(){ok} o m !o}%
  {colframe = #1
  ,colback = #1!5!white
  ,IfNoValueTF={#2}{}{title = #2}
  ,before lower = {\raggedright\ifblank{#3}{}{\hangfrom{\booksym\space}#3\par}\hangfrom{\cogsym\space}}
  ,IfNoValueTF={#4}{}{#4}}

\frenchspacing

\usepackage[british]{isodate}
%</driver|doc>
%<*doc>
\usepackage{readprov}
\GetFileInfo{\jobname.tex}
%</doc>
%<*driver>

% For typesetting the implementation
\makeatletter
\let\docdate\@undefined
\let\theglossary\@undefined
\let\endtheglossary\@undefined
\makeatother
\usepackage{doc}
\makeatletter
\renewenvironment{theglossary}{%
  \bgroup
    \glossary@prologue
    \GlossaryParms \let\item\@idxitem \ignorespaces
}{%
  \egroup
}
\renewenvironment{macro}[1]{%
  \def\MyName{#1}%
  \index{\MyName@\tcbIndexPrintComC {\MyName}|(emph}%
}{%
  \ifdef{\MyName}{}{%
    \errmessage{You have closed a macro environment you have not opened on \the\inputlineno.}%
  }
  \index{\MyName@\tcbIndexPrintComC {\MyName}|)}%
}
\renewenvironment{environment}[1]{%
  \def\MyName{#1}%
  \index{\MyName@\tcbIndexPrintEnvCA {\MyName}|(emph}%
  \index{Environments!\MyName@\tcbIndexPrintEnvC {\MyName}|(emph}%
}{%
  \ifdef{\MyName}{}{%
    \errmessage{You have closed an environment environment you have not opened on \the\inputlineno.}%
  }
  \index{Environments!\MyName@\tcbIndexPrintEnvC {\MyName}|)}%
  \index{\MyName@\tcbIndexPrintEnvCA {\MyName}|)}%
}
\newenvironment{optionkey}[1]{%
  \def\MyName{#1}%
  \index{\MyName@\tcbIndexPrintKeyCA {\MyName}|(emph}%
  \index{Keys!\MyName@\tcbIndexPrintKeyC {\MyName}|(emph}%
}{%
  \ifdef{\MyName}{}{%
    \errmessage{You have closed an optionkey environment you have not opened on \the\inputlineno.}%
  }
  \index{Keys!\MyName@\tcbIndexPrintKeyC {\MyName}|)}%
  \index{\MyName@\tcbIndexPrintKeyCA {\MyName}|)}%
}
\newenvironment{optionvalue}[1]{%
  \def\MyName{#1}%
  \index{\MyName@\tcbIndexPrintValCA {\MyName}|(emph}%
  \index{Values!\MyName@\tcbIndexPrintValC {\MyName}|(emph}%
}{%
  \ifdef{\MyName}{}{%
    \errmessage{You have closed an optionvalue environment you have not opened on \the\inputlineno.}%
  }
  \index{Values!\MyName@\tcbIndexPrintValC {\MyName}|)}%
  \index{\MyName@\tcbIndexPrintValCA {\MyName}|)}%
}
\let\PrintMacroName\@gobble
\let\PrintEnvName\@gobble
\renewenvironment{tcb@manual@entry}{\begin{list}{}{%
  \setlength{\topsep}{0pt}
  \setlength{\partopsep}{0pt}
  \setlength{\leftmargin}{\kvtcb@doc@left}%
  \setlength{\itemindent}{0pt}%
  \setlength{\itemsep}{0pt}%
  \setlength{\parsep}{0pt}%
  \setlength{\rightmargin}{\kvtcb@doc@right}%
  }\item}{\end{list}}
\makeatother
\MakeShortVerb{\|}

% This bit inspired by ydoc
\makeatletter
\newwrite\ydocwrite
\def\ydocfname{\jobname.listing}
\def\ydoc@catcodes{%
  \let\do\@makeother
  \dospecials
  \catcode`\\=\active
  \catcode`\^^M=\active
  \catcode`\ =\active
}
\def\macrocode{%
  \begingroup
  \ydoc@catcodes
  \macro@code
}
\def\endmacrocode{}
\begingroup
\endlinechar\m@ne
\@firstofone{%
\catcode`\|=0\relax
\catcode`\(=1\relax
\catcode`\)=2\relax
\catcode`\*=14\relax
\catcode`\{=12\relax
\catcode`\}=12\relax
\catcode`\ =12\relax
\catcode`\%=12\relax
\catcode`\\=\active
\catcode`\^^M=\active
\catcode`\ =\active
}*
|gdef|macro@code#1^^M%    \end{macrocode}(*
|endgroup|expandafter|macro@@code|expandafter(|ydoc@removeline#1|noexpand|lastlinemacro)*
)*
|gdef|ydoc@removeline#1^^M(|noexpand|firstlinemacro)*
|gdef|ydoc@defspecialmacros(*
|def^^M(|noexpand|newlinemacro)*
|def (|noexpand|spacemacro)*
|def\(|noexpand|bslashmacro)*
)*
|gdef|ydoc@defrevspecialmacros(*
|def|newlinemacro(|noexpand^^M)*
|def|spacemacro(|noexpand )*
|def|bslashmacro(|noexpand\)*
)*
|endgroup
\def\macro@@code#1{%
  {\ydoc@defspecialmacros
  \xdef\themacrocode{#1}}%
  \PrintMacroCode
  \end{macrocode}%
}
\def\PrintMacroCode{%
  \begingroup
  \let\firstlinemacro\empty
  \let\lastlinemacro\empty
  \def\newlinemacro{^^J}%
  \let\bslashmacro\bslash
  \let\spacemacro\space
  \immediate\openout\ydocwrite=\ydocfname\relax
  \immediate\write\ydocwrite{\themacrocode}%
  \immediate\closeout\ydocwrite
  \let\input\@input
  \tcbinputlisting{breakable,listing only,docexample,listing file=\ydocfname}%
  \endgroup
}
\makeatother

\GetFileInfo{\jobname.dtx}
\title{OXREF -- Biblatex styles inspired by the \emph{Oxford Guide to Style}}
%</driver>
%<doc&n>\title{OXNOTES -- A notes-based style for Biblatex}
%<doc&m>\title{OXNUM -- A numeric style for Biblatex}
%<doc&a>\title{OXALPH -- An alphabetic style for Biblatex}
%<doc&y>\title{OXYEAR -- An author–year style for Biblatex}
%<*driver|doc>
\author{Alex Ball}
\date{\printdateTeX{\filedate}}
\begin{document}
\thispagestyle{empty}
\begin{adjustwidth}{.2\textwidth}{0pt}
  \sffamily\setlength{\parindent}{0pt}%
  \LARGE\textsc{oxref bundle}

  \vspace{\stretch{1}}
  \LARGE\thetitle

  \bigskip
  \Large\theauthor

  \bigskip
  \Large\thedate

  \bigskip
  \Large\fileversion
\end{adjustwidth}

\vspace{\stretch{3}}
\noindent
\hspace*{.1\textwidth}\raisebox{0pt}[0pt][0pt]{\rule{\normalrulethickness}{\textheight}}

\newpage
\tableofcontents*

%</driver|doc>
%<*driver>
\chapter{Introduction}

This document provides the documented sources for the \pkg[biblatex]{oxref}
biblography styles:
\begin{itemize}
\item
  \textsf{oxnotes}: a style similar to the standard \textsf{verbose}
  and its variants, intended for use with footnotes;
\item
  \textsf{oxnum}: a style similar to the standard \textsf{numeric},
  intended for use with numeric in-text citation labels;
\item
  \textsf{oxalph}: a style similar to the standard \textsf{alphabetic},
  intended for use with alphabetic in-text citation labels;
\item
  \textsf{oxyear}: a style similar to the standard \textsf{authoryear},
  intended for use with parenthetical in-text citations.
\end{itemize}

\section{Quick start}

The styles are self-contained, so you can load them with \pkg{biblatex}:

\begin{multicols}{2}
\begin{tcblisting}{listing only}
\usepackage[style=oxnotes]{biblatex}
\end{tcblisting}

\addtocounter{FancyVerbLine}{-1}%
\begin{tcblisting}{listing only}
\usepackage[style=oxnum]{biblatex}
\end{tcblisting}

\addtocounter{FancyVerbLine}{-1}%
\begin{tcblisting}{listing only}
\usepackage[style=oxalph]{biblatex}
\end{tcblisting}

\addtocounter{FancyVerbLine}{-1}%
\begin{tcblisting}{listing only}
\usepackage[style=oxyear]{biblatex}
\end{tcblisting}
\end{multicols}

For further information, including some additional options you can set,
please refer to the separate documentation files
\href{./oxnotes-doc.pdf}{\texttt{oxnotes-doc.pdf}},
\href{./oxnum-doc.pdf}{\texttt{oxnum-doc.pdf}},
\href{./oxalph-doc.pdf}{\texttt{oxalph-doc.pdf}},
and
\href{./oxyear-doc.pdf}{\texttt{oxyear-doc.pdf}}
respectively.

\sloppy
\begin{markdown*}{hybrid=true}
%</driver>
%<*driver|readme>

## Installation

### Dependencies

To compile the documentation you will need to have the [minted] package working,
which in turn relies on Python 2.6+ and Pygments. See the documentation of that
package for details.

### Managed way

The latest stable release of the biblatex-oxref bundle has been packaged for
TeX Live and MiKTeX. If you are running TeX Live and have `tlmgr` installed, you
can install the bundle simply by running `tlmgr install biblatex-oxref`. If you
are running MiKTeX, you can install the bundle by running
`mpm --install=biblatex-oxref`. Both `tlmgr` and `mpm` have GUI versions that
you might find friendlier.

### Automated way

A makefile is provided which you can use with the Make utility on
UNIX-like systems:

  * Running `make source` generates the derived files
      - README.md
      - oxref.bbx, oxnotes.bbx, oxnotes-ibid.bbx, oxnotes-note.bbx,
        oxnotes-inote.bbx, oxnotes-trad1.bbx, oxnotes-trad2.bbx,
        oxnotes-trad3.bbx, oxyear.bbx, oxnum.bbx, oxalph.bbx
      - oxnotes.cbx, oxnotes-ibid.cbx, oxnotes-note.cbx, oxnotes-inote.cbx,
        oxnotes-trad1.cbx, oxnotes-trad2.cbx, oxnotes-trad3.cbx, oxyear.cbx,
        oxnum.cbx, oxalph.cbx
      - american-oxref.lbx, british-oxref.lbx, english-oxref.lbx
      - oxnotes.dbx, oxnotes-ibid.dbx, oxnotes-note.dbx, oxnotes-inote.dbx,
        oxnotes-trad1.dbx, oxnotes-trad2.dbx, oxnotes-trad3.dbx, oxyear.dbx,
        oxnum.dbx, oxalph.dbx
      - oxref.bib
      - oxref.ins
      - oxnotes-doc.tex, oxyear-doc.tex, oxnum-doc.tex, oxalph-doc.tex

  * Running `make` generates the above files and also oxref.pdf,
    oxnotes-doc.pdf, oxyear-doc.pdf, oxnum-doc.pdf and oxalph-doc.pdf.

  * Running `make inst` installs the files in the user's TeX tree.
    You can undo this with `make uninst`.

  * Running `make install` installs the files in the local TeX tree.
    You can undo this with `make uninstall`.

  * Running `make clean` removes auxiliary files from the working directory.

  * Running `make distclean` removes the generated files from the working
    directory as well.

### Manual way

To install the bundle from scratch, follow these instructions. If you have
downloaded the zip file from the [Releases] page on GitHub, you can skip the
first two steps.

 1. Run `luatex oxref.dtx` to generate the source files. (You can safely skip
    this step if you are confident about step 2.)

 2. Compile oxref.dtx, oxnotes-doc.tex, oxyear-doc.tex, and oxnum-doc.tex with
    LuaLaTeX and Biber to generate the documentation. You will need to enable
    shell escape so that [minted] can typeset the listings.

 3. Move the files to your TeX tree as follows:
      - `source/latex/biblatex-oxref`:
        oxref.dtx,
        (oxref.ins)
      - `tex/latex/biblatex-oxref`:
        american-oxref.lbx,
        british-oxref.lbx,
        english-oxref.lbx,
        oxalph.bbx,
        oxalph.cbx,
        oxalph.dbx,
        oxnotes.bbx,
        oxnotes.cbx,
        oxnotes.dbx,
        oxnotes-ibid.bbx,
        oxnotes-ibid.cbx,
        oxnotes-ibid.dbx,
        oxnotes-inote.bbx,
        oxnotes-inote.cbx,
        oxnotes-inote.dbx,
        oxnotes-note.bbx,
        oxnotes-note.cbx,
        oxnotes-note.dbx,
        oxnotes-trad1.bbx,
        oxnotes-trad1.cbx,
        oxnotes-trad1.dbx,
        oxnotes-trad2.bbx,
        oxnotes-trad2.cbx,
        oxnotes-trad2.dbx,
        oxnotes-trad3.bbx,
        oxnotes-trad3.cbx,
        oxnotes-trad3.dbx,
        oxnum.bbx,
        oxnum.cbx,
        oxnum.dbx,
        oxref.bbx,
        oxyear.bbx,
        oxyear.cbx,
        oxyear.dbx
      - `doc/latex/biblatex-oxref`:
        README.md,
        oxalph-doc.pdf,
        oxalph-doc.tex,
        oxnotes-doc.pdf,
        oxnotes-doc.tex,
        oxnum-doc.pdf,
        oxnum-doc.tex,
        oxref.bib,
        oxref.pdf,
        oxyear-doc.pdf,
        oxyear-doc.tex

 4. You may then have to update your installation's file name database
    before TeX and friends can see the files.

[Releases]: https://github.com/alex-ball/biblatex-oxref/releases
[minted]: http://ctan.org/pkg/minted

## Licence

Copyright 2016–2023 Alex Ball.

This work consists of the documented LaTeX file oxref.dtx and a Makefile.

The text files contained in this work may be distributed and/or modified
under the conditions of the [LaTeX Project Public License (LPPL)][lppl],
either version 1.3c of this license or (at your option) any later
version.

This work is ‘maintained’ (as per LPPL maintenance status) by [Alex Ball][me].

[lppl]: http://www.latex-project.org/lppl.txt "LaTeX Project Public License (LPPL)"
[me]: https://alexball.me.uk/ "Alex Ball"

%</driver|readme>
%<*driver>
\end{markdown*}

\fussy
\iffalse % syntax highlighting \fix
%</driver>
%<*doc|bib>
%<*n|m|a|y>
\chapter{Introduction}

\section{Loading the style}\label{sec:loading}

The style is self-contained, so you can load it with \pkg{biblatex}:
\begin{tcblisting}{listing only}
%<n>\usepackage[style=oxnotes]{biblatex}
%<m>\usepackage[style=oxnum]{biblatex}
%<a>\usepackage[style=oxalph]{biblatex}
%<y>\usepackage[style=oxyear]{biblatex}
\end{tcblisting}

The style has some options additional to the regular \pkg{biblatex} ones:

\begin{docKey}{anon}{=\val{literal}|\val{long}|\val{short}}{default \val{short}, initially \val{literal}}
  Affects what happens if the author name matches the value of \cs{oxrefanon}.
  By default, this is \enquote{Anonymous}, but you could change it a different word (such as \enquote{Anonimo}) instead.
  \begin{itemize}
  \item\docValue{literal}
    means no special handling is used.
  \item\docValue{long}
    will print the unabbreviated localization string \code{anon} (\enquote{Anonymous}) instead of the author name
%<y>    in citations and the bibliography.
%<m|a>    in the bibliography.
%<n>    in the bibliography, but neither are printed in citations.
  \item\docValue{short}
    will print the abbreviated localization string \code{anon} (\enquote{Anon.\@}) instead of the author name
%<y>    in citations and the bibliography.
%<m|a>    in the bibliography.
%<n>    in the bibliography, but neither are printed in citations.
  \end{itemize}
\end{docKey}

\begin{docKey}{bookseries}{=\val{in}|\val{out}}{default \val{in}, initially \val{in}}
  Puts the series information for a book \docValue{in}side or \docValue{out}side the parenthetical publication block.
\end{docKey}

\begin{docKey}{court-plain}{=\val{true}|\val{false}}{default \val{true}, initially \val{false}}
  Prints courts of decision without parentheses.
\end{docKey}

\begin{docKey}{dashed}{=\val{true}|\val{false}}{default \val{true}, initially \val{false}}
  In the biblography, replaces recurring author\slash editor names with a dash.
\end{docKey}

\begin{docKey}{ecli}{=\val{yes}|\val{only}|\val{no}}{default \val{yes}, initially \val{yes}}
  Determines when ECLI numbers for EU legal cases are printed (if provided).
  \begin{itemize}
  \item\docValue{yes}
    prints the ECLI number in addition to the official report.
  \item\docValue{only}
    prints the ECLI number instead of the official report.
  \item\docValue{no}
    only prints the ECLI number if the case is otherwise unreported.
  \end{itemize}
\end{docKey}

\begin{docKey}{isourls}{=\val{true}|\val{false}}{default \val{true}, initially \val{false}}
  Surrounds URLs with angle brackets.
\end{docKey}

\begin{docKey}{issuedate-plain}{=\val{true}|\val{false}}{default \val{true}, initially \val{false}}
  Removes the parentheses around the date of a periodical without a volume number.
  This can also be set on a per-type and per-entry basis.
  (This option was previously called \key{varissuedate}.)
\end{docKey}

\begin{docKey}{issuestyle}{=\val{slash}|\val{colon}|\val{comma}|\val{parens}}{default \val{slash}, initially \val{slash}}
  Affects how journal volumes and numbers are printed.
  \begin{itemize}
  \item\docValue{slash}
    separates the two with a solidus, e.g. \enquote{23/2}.
  \item\docValue{colon}
    separates the two with a colon and space, e.g. \enquote{23: 2}.
%<a|y>    It is intended for use with \textsf{oxnotes}\slash\textsf{oxnum} and not recommended for this style.
  \item\docValue{comma}
    separates the two with a comma and space, e.g. \enquote{23, 2}.
  \item\docValue{parens}
    sets off the issue number in parentheses, e.g. \enquote{23 (2)}.
%<n|m>    It is intended for use with \textsf{oxalph}\slash\textsf{oxyear} and not recommended for this style.
  \end{itemize}
\end{docKey}

%<*a|y>
\begin{docKey}{mergedate}{=\val{maximum}|\val{compact}|\val{basic}|\val{minimum}|\val{year}|\val{false}}{default \val{year}, initially \val{year}}
  Affects how the date at the start of the references relates to the date in the \enquote{normal} position.
  The default value of \val{year} is intended for use with the default setting of \key{labeldate}\texttt{=}\val{year}.
  If you set \key{labeldate} to something else, you will probably want to set this option to \val{compact} or \val{maximum}. It can also be set on a per-type basis.
\end{docKey}
%</a|y>

\begin{docKey}{nolocation}{}{no value, initially unset}
  Replaces missing locations with \enquote{n.p.} or the localized equivalent in books, collections, reference works, proceedings, and similar entry types. Once set, this option cannot be overridden.
  Alternatively, it may be set on a per-entry basis.
\end{docKey}

%<*a|y>
\begin{docKey}{nonodate}{=\val{true}|\val{false}}{default \val{true}, initially \val{false}}
  Suppresses the printing of the \code{nodate} localization string when an entry is missing a recognizable date. It can also be set on a per-type and per-entry basis. It is automatically set to \val{true} for entries with a \code{sortyear}, on the assumption that the date has been given in a non-date field (e.g.\@ the number of a standard).
\end{docKey}
%</a|y>

\begin{docKey}{nopublisher}{}{no value, initially unset}
  Removes publisher name from all entries. Once set, this option cannot be overridden.
\end{docKey}

\begin{docKey}{norelatedin}{=\val{true}|\val{false}}{default \val{true}, initially \val{false}}
  Suppresses the printing of the \code{in} localization string in circumstances where it would appear directly following a related string such as \enquote{originally published as}. It can also be set on a per-type and per-entry basis. The effects of this key are not well tested, so do please get in touch (see below) if you encounter problems with it.
\end{docKey}

\begin{docKey}{relationpunct}{=\val{period}|\val{comma}|\val{semicolon}|\val{colon}|\val{space}}{default \val{semicolon}, initially \val{semicolon}}
  Sets the punctuation that precedes the \code{relatedtype} localization string.
  An additional space is assumed unless the value is \val{space}.
  This can also be set on a per-type and per-entry basis.
  Note that the general and per-type settings are ignored for some values of \code{relatedtype},
  but the per-entry setting is always effective.
\end{docKey}

%<*n|m>
\begin{docKey}{scnames}{=\val{true}|\val{false}}{default \val{true}, initially \val{false}}
  Prints initial author or editor names in bibliography entries in small capitals.
\end{docKey}
%</n|m>

\begin{docKey}{thesis}{=\val{in}|\val{out}|\val{plain}}{default \val{out}, initially \val{out}}
  Puts the thesis type \docValue{in}side or \docValue{out}side the parenthetical publication block,
  while \docValue{plain} removes the parentheses entirely.
\end{docKey}

\begin{docKey}{timefirst}{=\val{true}|\val{false}}{default \val{true}, initially \val{false}}
  Prints the time (if provided) before the date instead of after it.
  This can also be set on a per-type and per-entry basis.
\end{docKey}

\begin{docKey}{usenametitles}{=\val{true}|\val{false}}{default \val{true}, initially \val{true}}
  Controls whether titular prefixes such as Revd, Dr, Mrs, Sir, and so on are printed.
  (See \cref{sec:nametitles} for how to supply titles as part of a name.)
  This can also be set on a per-type and per-entry basis.
\end{docKey}

\pkg[biblatex]{Oxref} makes use of Biber-specific techniques to solve some of the challenges presented by Oxford style.
It will not stop you from using Bib\TeX\ instead but, if you do, only simple and standard entries will work.
In particular, manuscripts, legal references and anything involving related entries will be adversely affected.

\section{How to use this document}

Bibliographical items are given throughout this document, and serve three purposes:

\begin{itemize}
  \item
  To demonstrate which of the variations discussed by the
  \emph{Oxford Guide to Style} and \emph{New Hart's Rules} have been chosen
  in this style.
  \item
  To help me, as package author, check that the style is working as intended.
  \item
  To show you, as document author, how to use the style to get the effect you want.
\end{itemize}

Examples that follow standard \textsf{biblatex} semantics, and are therefore
(mostly) portable to other styles, are in green:

\begin{tcolorbox}%
  [bicolor
  ,colframe = ok
  ,colback = ok!5!white
  ,colbacklower = white
  ,fontlower = \footnotesize\ttfamily
  ,overlay = {\node[anchor=south east,text=teal] at (frame.south east) {Source};}
  ]
  \hangfrom{\booksym\space} Reference text as it should look.\par
  \hangfrom{\cogsym\space} Reference text as generated by \textsf{biblatex}.
  \tcblower
  Code used in bibliography file.
\end{tcolorbox}

Examples that have been \enquote{hacked} in some way, and are therefore not portable
to other styles, are in amber:

\begin{tcolorbox}%
  [bicolor
  ,colframe = hacked
  ,colback = hacked!5!white
  ,colbacklower = white
  ,fontlower = \footnotesize\ttfamily
  ,overlay = {\node[anchor=south east,text=teal] at (frame.south east) {Source};}
  ]
  \hangfrom{\booksym\space} Reference text as it should look.\par
  \hangfrom{\cogsym\space} Reference text as generated by \textsf{biblatex}.
  \tcblower
  Code used in bibliography file.
\end{tcolorbox}

Where a source is provided, it refers to a section from one of the reference works below:

\begin{description}
\item[OGS]
\fullcite{ritter2002ogs}

\item[NHR]
\fullcite{waddingham2014nhr}

\item[OSCOLA]
\fullcite{law.oxford2012oscola}
\end{description}

Where the source is starred (*), this indicates the example is not quite how it appears in the book,
usually because the original is demonstrating an option that is not the \pkg[biblatex]{oxref} default.
%<*a|y>
Where the source is marked with a dagger (\textdagger),
this indicates that the example has been coverted from an \textsf{oxnotes}-style one,
since the guides provide relatively few for author-year references.
%</a|y>

\section{Design philosophy}

The stipulations given by the \emph{Oxford Guide to Style} regarding citations and references
amount not so much to a consistent style as a body of advice for creating one.
Unlike the style manuals published by the American Psychological Association,
the Modern Language Association, and the University of Chicago to name but three,
the emphasis of the Oxford guide is to describe good practice rather than prescribe a particular style.
This means that when it comes to \pkg[biblatex]{oxref}, there are decisions to be made
as to which variations to support by default, which to support as options,
and which to ignore quietly.

The situation is complicated further by the nature of the available versions.
The 2002 guide remains the most comprehensive in terms of rules, principles and examples.
The succeeding versions, under the title \emph{New Hart's Rules},
update the aspects of the 2002 guide that now seem somewhat dated,
such as its handling of URLs and DOIs,
and have more of an eye on machine processing of bibliographies.
They do, however, introduce additional variations with less of a steer on what is preferred,
and are considerably shorter with fewer examples.

The approach of \pkg[biblatex]{oxref} is to follow the 2014 \emph{New Hart's Rules} as much as possible,
but where variations are given without strong preference, or where guidance is lacking,
to follow the preferences of the 2002 guide.
Where the practices of the humanities and the sciences are contrasted,
the former are followed for \textsf{oxnotes}\slash\textsf{oxnum}
and the latter for \textsf{oxalph}\slash\textsf{oxyear}.
Where neither version gives explicit guidance on citing a resource supported by \textsf{biblatex},
\pkg[biblatex]{oxref} extrapolates from what is provided, guided by standard \textsf{biblatex}
and other major referencing styles.

Where it is practical to do so,
ways and means of achieving the variations defined by the two guides are provided,
but by no means all of them will be supported.

\section{Technical documentation}

For information on installing the styles, and for the documented source code,
see the separate documentation file \href{./oxref.pdf}{\texttt{oxref.pdf}}

\section{Stability}

The \pkg[biblatex]{oxref} family of styles is currently at \fileversion.

I have no plans to change the default (expected) behaviour of the styles,
and will do my best to avoid backwards-incompatible changes, though
alternative behaviour may be added. If changes are introduced that alter
the advertised output, this will be signalled by a change in major
version number.

Please report any bugs you discover on the
\href{https://github.com/alex-ball/biblatex-oxref/issues}{GitHub issue tracker}.%
\footnote{Issue tracker for \pkg[biblatex]{oxref}:
\url{https://github.com/alex-ball/biblatex-oxref/issues}}
You are also welcome to leave your thoughts there on how the styles could
be improved, especially for the cases not covered by the two style manuals.

\chapter{Citations and common formatting}\label{sec:citing}

%<*n>
The \textsf{oxnotes} bibliography style is intended for use with a footnote or endnote citation style,
and indeed loads a standard \textsf{biblatex} one.
While the note text generated by the style is very similar to that which appears in the bibliography,
there is a difference in how author names are printed.
%</n>
%<*m>
The \textsf{oxnum} bibliography style is intended for use with a numeric citation style,
and indeed loads a tweaked version of a standard \textsf{biblatex} one.
%</m>
%<*a>
The \textsf{oxalph} bibliography style is intended for use with an alphabetic citation style,
and indeed loads a tweaked version of a standard \textsf{biblatex} one.
%</a>
%<*y>
The \textsf{oxyear} bibliography style is intended for use with an author–year citation style,
and indeed loads a tweaked version of a standard \textsf{biblatex} one.
%</y>

\section{Test citations}

%<*n>
Following the advice of \emph{New Hart's Rules}, \textsf{oxnotes} loads by default a tweaked version of the  standard \textsf{verbose} citation style, in which repeated citations are abbreviated to the author surname and a short title.

%</n>
%</n|m|a|y>
%<*bib>
@book{faith1997epg,
  author = {R. J. Faith},
  title = {The {English} Peasantry and the Growth of Lordship},
  shorttitle = {{English} Peasantry},
  date = {1997}}
@book{knowles.hadcock1953mrh,
  author = {D. Knowles and R. N. Hadcock},
  title = {Medieval Religious Houses},
  subtitle = {England and Wales},
  date = {1953}}
@book{kershaw1973bp,
  author = {I. Kershaw},
  title = {Bolton Priory},
  date = {1973}}
@article{cobban,
  author = {Cobban},
  title = {Colleges and halls}}
%</bib>
%<*n|m|a|y>
%<*n>
\begin{egcite}{}
Test\footcite{faith1997epg}
Test\footcite[49-50]{faith1997epg}
\end{egcite}
\begin{egcite}{}
\cites[80 (Westminster), 66
  (Glastonbury), 149 (Osney), 128
  (Bolton)]{knowles.hadcock1953mrh}%
  [186]{kershaw1973bp}[609]{cobban}
\end{egcite}
\addtocategory{hidden}{cobban}

Both the \emph{Oxford Guide to Style} and \emph{New Hart's Rules} describe an alternative system that uses the abbreviations \enquote{ibid.\@}, \enquote{op.\@ cit.\@}, \enquote{loc.\@ cit.\@}, and \enquote{id.\@} and friends, though with underwhelming enthusiasm. If you would like to use these abbreviations, you can use the \textsf{oxnotes-trad1} citation style instead (and remember to use the \code{gender} field). As with the standard styles, a bibliographic style alias has been provided so you can just do this:

\begin{tcblisting}{listing only}
\usepackage[style=oxnotes-trad1]{biblatex}
\end{tcblisting}

If you are particularly keen to use the other variants that \pkg{biblatex} provides, then parallel \textsf{oxnotes} variants have been provided for your convenience: \textsf{oxnotes-ibid}, \textsf{oxnotes-note}, \textsf{oxnotes-inote}, \textsf{oxnotes-trad2}, and \textsf{oxnotes-trad3}.

%</n>
%<*m|a>
Both the \emph{Oxford Guide to Style} and \emph{New Hart's Rules} describe a system that uses simple numbers as citation labels, almost as if they were endnotes. This system does not support page references, unlike the citation labels familiar to \LaTeX\ users. In the absence of a better idea, therefore, this style treats citation labels rather like author–year parenthetical citations and adopts the conventions from \textsf{oxyear}. Pages are set off with a colon, and multiple works are separated with a semicolon.

\begin{egcite}%
%<m>{Test [\citefield{hankinson1988mmm}{labelnumber}: 93, 96; \citefield{hankinson1989gba}{labelnumber}: 72]}
%<a>{Test [\citefield{hankinson1988mmm}{labelalpha}: 93, 96; \citefield{hankinson1989gba}{labelalpha}: 72]}
Test \parencites%
  [93, 96]{hankinson1988mmm}%
  [72]{hankinson1989gba}
\end{egcite}
%</m|a>
%<*y>
The \emph{Oxford Guide to Style} consistently promotes an author–date citation scheme which uses parentheses, within which there is only a space between the name and date.
If there is no date, the replacement text is separated from the name by a comma.

\begin{egcite}{(Anon.\@ 1956), (Marx 1867), (Clarke, n.d.).}
\parencite{anon1956lu},
\parencite{marx1867ccp},
\parencite{clarkeNDeci}.
\end{egcite}

Pages are set off with a colon, and multiple works are separated with a semicolon.

\begin{egcite}{Hankinson (1988: 93, 96; 1989: 72)}
\textcites%
  [93, 96]{hankinson1988mmm}%
  [72]{hankinson1989gba}
\end{egcite}

Up to two author names are given, after which \enquote{et al.} is used.

\begin{egcite}{(Barnes and Griffin 1989; Brady et al. 1994)}
\parencite{barnes.griffin1989pte,%
  brady.etal1994hehsa}
\end{egcite}

If different authors have the same surname, they are distinguished by their initial.

%</y>
%</n|m|a|y>
%<*bib>
@inbook{smithFCct,
  author = {P. Smith},
  title = {The Case of {Tigray}},
  bookauthor = {P. Smith},
  booktitle = {Gender and Famine},
  volume = {2},
  pages = {76-94},
  location = {London},
  pubstate = {forthcoming}}
%</bib>
%<*n|m|a|y>
%<*y>
\nocite{smithFCct}
\begin{egcite}{(P. Smith, forthcoming \emph{a}; T. Smith 1988)}
\parencite{smithFCgaf,smith1988fag}
\end{egcite}

If a short author label is provided, it is used in place of the full author.

\begin{egcite}{(WHO 1986)}
\parencite{who1986nde}
\end{egcite}

\emph{New Hart's Rules} is mostly consistent with this, but has some variations where the author and date are separated by a comma, and where multiple references are also separated by commas.
%</y>

\section{Missing or inferred attribution}

\subsection{Missing attribution}
%<*n>
Where works have no attribution, both the \emph{Oxford Guide to Style} and \emph{New Hart's Rules} suggest printing them without further adornment in notes, but listing them under \enquote{Anonymous} (or \enquote{Anon.\@} in the latter case) in the bibliography.
%</n>
%<*y>
The \emph{Oxford Guide to Style} prefers anonymous works to have \enquote{Anonymous} in place of the author name, while \emph{New Hart's Rules} suggests using \enquote{Anon.\@} or a short title.
%</y>

\tip{\pkg[biblatex]{Oxref} will not automatically generate anonymous labels for you, but if you use the \key{anon} option (see \cref{sec:loading}), you can transform an author name of \enquote{Anonymous} (or whatever \cs{oxrefanon} is set to) in your .bib file to either the long or short localization string \code{anon}.
%<n>  Doing this will automatically suppress the printing of the anonymous author in notes.
}

%<*n>
\begin{egcite}{}
\cite{anon1822san}.
\textcite{anon1956lu}.
\end{egcite}

%</n>
\begin{bibexbox}
%<n|m><OGS \S15.2.1>
%<a|y><OGS \S15.2.1\textdagger>
{anon1822san}
%<n|m>\textsc{Anon.}, \emph{Stories after Nature} (London: Allman, 1822).
%<a|y>Anon.\@ (1822), \emph{Stories after Nature} (London: Allman).
\toggletrue{blx@bibliography}
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@book{anon1822san,
  author = {Anonymous},
  title = {Stories after Nature},
  location = {London},
  publisher = {Allman},
  date = {1822}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
%<n|m><OGS \S15.2.1>
%<a|y><OGS \S15.2.1\textdagger>
{anon1956lu}
%<n|m>\textsc{Anon.}, \emph{Liber usualis} (Tournai: Desclée, 1956).
%<a|y>Anon.\@ (1956), \emph{Liber usualis} (Tournai: Desclée).
\toggletrue{blx@bibliography}
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@book{anon1956lu,
  author = {Anonymous},
  title = {Liber usualis},
  location = {Tournai},
  publisher = {Desclée},
  year = {1956}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

%<*m|a>
\begin{egcite}{}
\textcite{anon1822san,anon1956lu}
\end{egcite}
%</m|a>
%<*y>
\begin{egcite}{(Anon.\@ 1822; 1956), Anon.\@ (1956)}
\parencite{anon1822san,anon1956lu},
\textcite{anon1956lu}
\end{egcite}
%</y>
%<!n>

\subsection{Pseudepigraphy}
Some older works are known to have been written pseudepigraphically, that is, falsely attributed to a more famous author. The way of indicating this in Oxford style, if desired, is
%<n>to add the prefix \enquote{Pseudo-} before the name in notes, and
to put \enquote{(Ps.-)} after the name in the bibliography.

\tip{With \pkg[biblatex]{oxref}, you can achieve this by annotating the name with the keyword \code{pseudo}.
%<n>Since this mechanism is aimed at ancient texts, it has only been designed to work with single-part names
%<n>(i.e. either a single word, or a whole name wrapped in braces).
}

%<*n|m|a>
\begin{egcite}{}
\textcite{boethius1976dds}
\end{egcite}
%</n|m|a>
%<*y>
\begin{egcite}{}
\parencite{boethius1976dds}
\end{egcite}
%</y>

\begin{bibexbox}
%<n|m><OGS \S15.2.1>
%<a|y><OGS \S15.2.1\textdagger>
{boethius1976dds}
%<n|m>\textsc{Boethius} (\textsc{Ps.-}), \emph{De disciplina scolarium: Édition critique, introduction et notes}, ed. Olga Weijers (Leiden, 1976).
%<a|y>Boethius (Ps.-) (1976), \emph{De disciplina scolarium: Édition critique, introduction et notes}, ed.\@ O. Weijers (Leiden).
\toggletrue{blx@bibliography}
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@book{boethius1976dds,
  author = {Boethius},
  author+an = {1=pseudo},
  title = {De disciplina scolarium},
  subtitle = {Édition critique, introduction et notes},
  editor = {Olga Weijers},
  location = {Leiden},
  date = {1976}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}


\subsection{Inferred attribution}

If the attribution is missing from the work but may be inferred from other sources,
Oxford style is to give the attribution in square brackets.

\tip{With \pkg[biblatex]{oxref}, you can achieve this by annotating the whole name field
  (usually \code{author} or \code{editor}) with the keyword \code{inferred}.
  You can also annotate names individually within the list, if only some of them should be taken as inferred.}

\begin{bibexbox}
%<n|m><OGS \S15.2.1>
%<a|y><OGS \S15.2.1\textdagger>
{balfour1768pe}[]
%<n|m>[James Balfour], \emph{Philosophical Essays} (Edinburgh, 1768).
%<a|y>[Balfour, J.] (1768), \emph{Philosophical Essays} (Edinburgh).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@book{balfour1768pe,
  author = {James Balfour},
  author+an = {=inferred},
  title = {Philosophical Essays},
  location = {Edinburgh},
  date = {1768}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\tip{You can also use the syntax from \textsf{biblatex-realauthor}.
  If you do not specify the \code{author}, then \code{realauthor} is treated as an alias for \code{author} annotated with the keyword \code{inferred}.
  The equivalent is true for \code{realeditor}.
  Note, however, that \pkg[biblatex]{oxref} does not recognize the \key{userealauthor} and \key{userealeditor} options.}

\subsection{Pseudonyms}

If an author publishes under a pen name, and you want to link the names in the bibliography,
the name as given in the work should be given first, immediately followed by the other name
in parentheses (\emph{Oxford Guide to Style}) or brackets (\emph{New Hart's Rules}).

\tip{If you don't mind the second name being printed as-is,
  the canonical place to include it is the \code{nameaddon} field.}

\begin{bibexbox}
%<n|m><NHR \S18.2.2>
%<a|y><NHR \S18.2.2\textdagger>
{dodgson1896sl}
%<n|m>C. L. Dodgson [Lewis Carroll], \emph{Symbolic Logic} (Oxford, 1896).
%<a|y>Dodgson, C. L. [Lewis Carroll] (1896), \emph{Symbolic Logic} (Oxford).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@book{dodgson1896sl,
  author = {C. L. Dodgson},
  nameaddon = {Lewis Carroll},
  title = {Symbolic Logic},
  location = {Oxford},
  date = {1896}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\tip{You can switch to using parentheses for name addons by changing the \code{nameaddon} field format.}

\begin{tcblisting}{listing only}
\DeclareFieldFormat{nameaddon}{\mkbibparens{#1}}
\end{tcblisting}

\tip{If you do want the second name to be normalized, or you are dealing with a list of names,
  you can use the (non-standard) \code{authoraddon} and \code{editoraddon} fields. The addon
  name will be printed after the corresponding name in the regular name list, using the
  \code{nameaddon} field format, but only if it is different.}

\begin{bibexbox}
%<n|m><NHR \S18.2.2>
%<a|y><NHR \S18.2.2\textdagger>
{lauder1965lss}
%<n|m>Afferbeck Lauder [Alistair Morrison], \emph{Let Stalk Strine} (Sydney, 1965).
%<a|y>Lauder, A. [Morrison, A.] (1965), \emph{Let Stalk Strine} (Sydney).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@book{lauder1965lss,
  author = {Afferbeck Lauder},
  authoraddon = {Alistair Morrison},
  title = {Let Stalk Strine},
  location = {Sydney},
  date = {1965}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\tip{Again, you can also use the syntax from \textsf{biblatex-realauthor}.
  If you specify the \code{author}, then \code{realauthor} is treated as an alias for \code{authoraddon}.
  The equivalent is true for \code{realeditor}.}

\section{Name variants}

In cases where an author changes the name under which they publish (e.g.\ due to changes of marital status), both the \emph{Oxford Guide to Style} and \emph{New Hart's Rules} suggest putting the later form of the name first, followed by parentheses containing an equals sign and the earier form of the name.
%<n>This is only supposed to to printed in the bibliography, not in notes.

\tip{To trigger this formatting, annotate the relevant name in \code{authoraddon} or \code{editoraddon} with the keyword \code{variant}.}

%<*n>
\begin{egcite*}{}
\cite{joukovsky1967gdd}
\end{egcite*}
%</n>
%<*m|a>
\begin{egcite}{}
\textcite{joukovsky1967gdd}
\end{egcite}
%</m|a>
%<*y>
\begin{egcite}{}
\parencite{joukovsky1967gdd}
\end{egcite}
%</y>

\begin{bibexbox}
%<n|m><OGS \S15.17.4>
%<a|y><OGS \S15.17.4\textdagger>
{joukovsky1967gdd}
%<n|m>\textsc{Joukovsky}, \textsc{F.} (= \textsc{Joukovsky-Micha}, \textsc{F.}), \enquote{La Guerre des dieux et des géants chez les poètes francais du XVI\textsuperscript{e} siècle (1500–1585)}, \emph{Bibliothèque d'Humanisme et Renaissance}, 29 (1967), 55–92.
%<a|y>Joukovsky, F. (= Joukovsky-Micha, F.) (1967), \enquote{La Guerre des dieux et des géants chez les poètes francais du XVI\textsuperscript{e} siècle (1500–1585)}, \emph{Bibliothèque d'Humanisme et Renaissance}, 29: 55–92.
\toggletrue{blx@bibliography}
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@article{joukovsky1967gdd,
  author = {F. Joukovsky},
  authoraddon = {F. Joukovsky-Micha},
  authoraddon+an = {1=variant},
  title = {La Guerre des dieux et des géants chez les poètes francais du XVI\textsuperscript{e}
    siècle (1500--1585)},
  journaltitle = {Bibliothèque d'Humanisme et Renaissance},
  volume = {29},
  date = {1967},
  langid = {french},
  pages = {55-92}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}


\section{Author-translators and author-revisers}

If the contribution of the translators or revisers is so great they could be joint authors, Oxford style is to print them immediately after the actual author. The motivation comes from textbooks like this one:

%<*n>
\begin{egcite*}{}
\textcite{kuehner.blass1890ef}
\end{egcite*}
%</n>
%<*m|a>
\begin{egcite}{}
\textcite{kuehner.blass1890ef}
\end{egcite}
%</m|a>
%<*y>
\begin{egcite}{}
\parencite{kuehner.blass1890ef}
\end{egcite}
%</y>

\begin{bibexbox}
{kuehner.blass1890ef}
%<n|m>\textsc{Kühner}, \textsc{Raphael}, rev. \textsc{Blass}, \textsc{Friedrich}, \emph{Ausführliche grammatik der griechischen sprache}, i: \emph{Elementar- und Formenlehre} (Hannover: Hahnsche Buchhandlung, 1890–2).
%<a|y>Kühner, R., rev. Blass, F. (1890–2), \emph{Ausführliche grammatik der griechischen sprache}, i: \emph{Elementar- und Formenlehre} (Hannover: Hahnsche Buchhandlung).
\toggletrue{blx@bibliography}
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@mvbook{kuehner.blass1890ef,
  author = {Raphael Kühner},
  editor = {Friedrich Blass},
  editor+an = {=jointauthor},
  editortype = {reviser},
  shortauthor = {Kühner--Blass},
  title = {Elementar- und Formenlehre},
  maintitle = {Ausführliche grammatik der griechischen sprache},
  volume = {1},
  location = {Hannover},
  publisher = {Hahnsche Buchhandlung},
  date = {1890/1892}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\tip{Annotate \emph{either} the \code{editor} \emph{or} \code{translator} field with the keyword \code{jointauthor} to promote the name to the joint author position (you cannot do it for both). Internally, what this does is move the names to the \pkg[biblatex]{oxref}-specific \code{jointauthor} field; you can use this and \code{jointauthortype} directly if you like, at the cost of portability to other styles. Note that you have to supply a suitable \code{shortauthor} value yourself; \pkg[biblatex]{oxref} does not calculate it for you.}

\section{Titular prefixes}\label{sec:nametitles}

Generally speaking, using titular prefixes like Revd, Dr, Mrs, Sir, and so on as part of an author's name is unnecessary,
but there are occasions when removing them can cause problems, so with \pkg[biblatex]{oxref} you can supply them if you need to.
I have not added special rules for recognizing such titles, so if you want to include one you have to label each part of the name explicitly, as in the following example (the keyword for the titular prefix is \code{title}).

\begin{bibexbox}
%<n|m><NHR \S18.2.2*>
%<a|y><NHR \S18.2.2*\textdagger>
{wood1861el}
%<n|m>Mrs Henry Wood, \emph{East Lynne}, 3 vols. (London, 1861).
%<a|y>Wood, Mrs H. (1861), \emph{East Lynne}, 3 vols. (London).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@mvbook{wood1861el,
  author = {title=Mrs, given=Henry, family=Wood},
  title = {East Lynne},
  volumes = {3},
  location = {London},
  date = {1861}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

You can switch the display of titular prefixes on or off using the \key{usenametitles} option.
This can be set globally or on a per-type or per-entry basis.

\section{Works in foreign languages}

If you used a foreign language work, you might want to recommend a good translation.

\tip{Add the translation in \code{related}, and set \code{relatedtype} to \code{translationas}.}

\begin{bibexbox}
%<n|m><NHR \S18.2.5*>
%<a|y><NHR \S18.2.5*\textdagger>
{tschichold1955tg}
%<n|m>J. Tschichold, \emph{Typographische Gestaltung} (Basle, 1955); Eng. trans. as \emph{Asymmetric Typography} (London, 1967).
%<a|y>Tschichold, J. (1955), \emph{Typographische Gestaltung} (Basle); Eng. trans. as \emph{Asymmetric Typography} (London, 1967).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@book{tschichold1955tg,
  author = {J. Tschichold},
  title = {Typographische Gestaltung},
  location = {Basle},
  date = {1955},
  related = {tschichold1967tg},
  relatedtype = {translationas}}
@book{tschichold1967tg,
  title = {Asymmetric Typography},
  location = {London},
  date = {1967}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\tip{To specify the translator up front, set the \code{relatedtype} to \code{bytranslator} instead.}

\begin{bibexbox}
%<n|m><NHR \S18.2.14>
%<a|y><NHR \S18.2.14\textdagger>
{sarrau1975ta}
%<n|m>José Sarrau, \emph{Tapas y aperitivos} (Madrid, 1975); trans. Francesca Piemonte Slesinger as \emph{Tapas and Appetizers} (New York, 1987).
%<a|y>Sarrau, J. (1975), \emph{Tapas y aperitivos} (Madrid); trans. F. P. Slesinger as \emph{Tapas and Appetizers} (New York, 1987).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@book{sarrau1975ta,
  author = {José Sarrau},
  title = {Tapas y aperitivos},
  location = {Madrid},
  date = {1975},
  related = {sarrau1987ta},
  relatedtype = {bytranslator}}
@book{sarrau1987ta,
  author = {José Sarrau},
  translator = {Francesca Piemonte Slesinger},
  title = {Tapas and Appetizers},
  location = {New York},
  date = {1987}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}


If you used the translation, you might want to give the original publication as well.

\tip{Add the original in \code{related}, and set \code{relatedtype} to \code{translationof}.}

\begin{bibexbox}
%<n|m><NHR \S18.2.5>
%<a|y><NHR \S18.2.5\textdagger>
{metz1938hyb}
%<n|m>R. Metz, \emph{A Hundred Years of British Philosophy}, ed. J. H. Muirhead, trans. J. W. Harvey (1938) [Ger. orig., \emph{Die philosophischen Strömungen der Gegenwart in Grossbritannien} (1935)]
%<a|y>Metz, R. (1938), \emph{A Hundred Years of British Philosophy}, ed. J. H. Muirhead, trans. J. W. Harvey [Ger. orig., \emph{Die philosophischen Strömungen der Gegenwart in Grossbritannien} (1935)]
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@book{metz1938hyb,
  author = {R. Metz},
  title = {A Hundred Years of British Philosophy},
  editor = {J. H. Muirhead},
  translator = {J. W. Harvey},
  date = {1938},
  related = {metz1935psg},
  relatedtype = {translationof}}
@book{metz1935psg,
  title = {Die philosophischen Strömungen der Gegenwart in Grossbritannien},
  date = {1935},
  language = {german}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

It is often helpful to provide an informative translation of foreign language titles.

\tip{Put the translation in \code{titleaddon}.}

\begin{bibexbox}
%<n|m><NHR \S18.2.5>
%<a|y><NHR \S18.2.5\textdagger>
{nissan1965hnm}
%<n|m>Nissan Motor Corporation, \emph{Nissan Jidosha 30nen shi} [A 30-year history of Nissan Motors] (1965).
%<a|y>Nissan Motor Corporation (1965), \emph{Nissan Jidosha 30nen shi} [A 30-year history of Nissan Motors].
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@book{nissan1965hnm,
  author = {{Nissan Motor Corporation}},
  title = {Nissan Jidosha 30nen shi},
  titleaddon = {A 30-year history of Nissan Motors},
  date = {1965}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}


Conversely, it might be helpful to provide the English original of a translated title.

\begin{bibexbox}
%<n|m><OGS \S15.2.1>
%<a|y><OGS \S15.2.1\textdagger>
{milne1938pb}
%<n|m>A. A. Milne, \emph{Pu der Bär} [Ger. trans. of \emph{Winnie the Pooh}] (Potsdam: Williams, 1938).
%<a|y>Milne, A. A. (1938), \emph{Pu der Bär} [Ger. trans. of \emph{Winnie the Pooh}] (Potsdam: Williams).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@book{milne1938pb,
  author = {A. A. Milne},
  title = {Pu der Bär},
  language = {german},
  origtitle = {Winnie the Pooh},
  location = {Potsdam},
  publisher = {Williams},
  date = {1938}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\section{Missing place of publication}

For periodicals, grey literature, audiovisual and online material, the lack of a place of publication is not surprising; indeed it may be expected. For books, however, it may be remarkable and deserve marking in the bibliography with \enquote{n.p.\@} (for \enquote{no place}).

\tip{To have \pkg[biblatex]{oxref} automatically insert \enquote{n.p.\@} or the localized equivalent for books, collections, reference works, proceedings and similar entry types, use the \key{nolocation} bibliography option.}

\tip{To have \pkg[biblatex]{oxref} automatically insert \enquote{n.p.\@} or the localized equivalent for only a specific entry, use the \key{nolocation} entry option instead.
  The advantage of doing this over simply giving \enquote{n.p.\@} as the publisher is that it hides it from other styles that do not follow the same convention.}

\begin{bibexbox}
%<n|m><NHR \S18.2.9>
%<a|y><NHR \S18.2.9\textdagger>
{padua1961p}
%<n|m>Marchetto of Padua, \emph{Pomerium}, ed. Guiseppe Vecchi (n.p., 1961).
%<a|y>Marchetto of Padua (1961), \emph{Pomerium}, ed. G. Vecchi (n.p.).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@book{padua1961p,
  author = {{Marchetto of Padua}},
  title = {Pomerium},
  editor = {Guiseppe Vecchi},
  date = {1961},
  options = {nolocation}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\section{Missing or inferred date of publication}

If the date is missing from a work, you can sometimes make an educated guess
what it should be. It is usual practice to enclose such guesses in square
brackets.

\tip{With \pkg[biblatex]{oxref}, you can achieve this by annotating the
  \code{date}, \code{origdate}, or \code{eventdate} field with the keyword
  \code{inferred}.}

\begin{tcblisting}{listing only}
  date+an = {=inferred},
\end{tcblisting}
%<*a|y>

Otherwise, if you don't supply a suitable date, it will be replaced with the
localization string \code{nodate}. If you don't want this behaviour, you can
suppress it with the \key{nonodate} option, which can be set globally or on a
per-type or per-entry basis.
%</a|y>

\chapter{Articles and periodicals}\label{sec:article}
\chapterprecis{article, periodical, suppperiodical, review}


\section{Articles in periodicals with volumes/numbers}

The \emph{Oxford Guide to Style} consistently prefers volume and part numbers to be written like \enquote{23/2}, but also discusses formats such as \enquote{23: 2} and \enquote{23 (2)}. \emph{New Hart's Rules} adds \enquote{23, 2} as a further possibility. The latter two are better suited to \textsf{oxalph}\slash\textsf{oxyear} which use a colon to demarcate the page numbers. These variations are implemented as the option \key{issuestyle}; see \autoref{sec:loading} for details.

%<n|m>\spec{Author, \enquote{Title}, \emph{JournalTitle}, Vol/Number (Year), Pages.}
%<a|y>\spec{Author (Year), \enquote{Title}, \emph{JournalTitle}, Vol/Number: Pages.}

%</n|m|a|y>
%<*n|m>
\begin{bibexbox}<OGS \S15.4.1>
{goldblatt1973dmm}
Robert Goldblatt, \enquote{Diodorean Modality in Minkowski Space-Time}, \emph{Studia Logica}, 39/3 (1973), 219–36.
\tcblower
\begin{Verbatim}
%</n|m>
%<*n|m|bib>
@article{goldblatt1973dmm,
  author = {Robert Goldblatt},
  title = {Diodorean Modality in Minkowski Space-Time},
  journaltitle = {Studia Logica},
  volume = {39},
  number = {3},
  date = {1973},
  pages = {219-236}}
%</n|m|bib>
%<*n|m>
\end{Verbatim}
\end{bibexbox}

%</n|m>
%<*a|y>
\begin{bibexbox}<OGS \S15.19.2>
{hollingsworth1957dsb}
Hollingsworth, T. H. (1957), \enquote{A Demographic Study of the British Ducal Families}, \emph{Population Studies}, 11/1: 4–26.
\tcblower
\begin{Verbatim}
%</a|y>
%<*a|y|bib>
@article{hollingsworth1957dsb,
  author = {T. H. Hollingsworth},
  date = {1957},
  title = {A Demographic Study of the British Ducal Families},
  journaltitle = {Population Studies},
  volume = {11},
  number = {1},
  pages = {4-26}}
%</a|y|bib>
%<*a|y>
\end{Verbatim}
\end{bibexbox}

%</a|y>
%<*n|m>
% Internal quotes, subtitle, no number
\begin{bibexbox}<OGS \S15.4.1>
{inalcik1992csm}
Halil Inalcik, \enquote{Comments on \enquote{Sultanism}: Max Weber's Typification of the Ottoman Polity}, \emph{Princeton Papers in Near Eastern Studies}, 1 (1992), 49–72.
\tcblower
\begin{Verbatim}
%</n|m>
%<*n|m|bib>
@article{inalcik1992csm,
  author = {Halil Inalcik},
  title = {Comments on \enquote{Sultanism}},
  subtitle = {Max Weber's Typification of the Ottoman Polity},
  journaltitle = {Princeton Papers in Near Eastern Studies},
  volume = {1},
  date = {1992},
  pages = {49-72}}
%</n|m|bib>
%<*n|m>
\end{Verbatim}
\end{bibexbox}

%</n|m>
%<*a|y>
% Subtitle
\begin{bibexbox}<NHR \S17.3.2*>
{unwin1994sce}
Unwin, T. (1994), \enquote{Structural Change in Estonian Agriculture: From Command Economy to Privatisation}, \emph{Geography}, 79/3: 246–61.
\tcblower
\begin{Verbatim}
%</a|y>
%<*a|y|bib>
@article{unwin1994sce,
  author = {Tim Unwin},
  date = {1994},
  title = {Structural Change in Estonian Agriculture},
  subtitle = {From Command Economy to Privatisation},
  journaltitle = {Geography},
  volume = {79},
  number = {3},
  pages = {246-261}}
%</a|y|bib>
%<*a|y>
\end{Verbatim}
\end{bibexbox}
%</a|y>
%<*n|m|a|y>

% Many authors, 'von' part, no number
\begin{bibexbox}
%<n|m><OGS \S15.2.1>
%<a|y><OGS \S15.2.1\textdagger>
{vaucouleurs1975nmn}
%<n|m>Gerald de Vaucouleurs et al., \enquote{The New Martian Nomenclature of the International Astronomical Union}, \emph{Icarus}, 26 (1975), 85–98.
%<a|y>Vaucouleurs, G. de, et al. (1975), \enquote{The New Martian Nomenclature of the International Astronomical Union}, \emph{Icarus}, 26: 85–98.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@article{vaucouleurs1975nmn,
  author = {Gerald de Vaucouleurs and J. Blunck and M. Davies and A. Dollfus and I. Koval and
    G. Kuiper and H. Masursky and S. Miyamoto and V Moroz and Carl Sagan},
  title = {The New {Martian} Nomenclature of the {International} {Astronomical} {Union}},
  journaltitle = {Icarus},
  volume = {26},
  date = {1975},
  pages = {85-98}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

% DOI
\begin{bibexbox}
%<n|m><NHR \S18.8.5>
%<a|y><NHR \S18.8.5\textdagger>
{druin2002rcd}
%<n|m>A. Druin, \enquote{The Role of Children in the Design of New Technology}, \emph{Behaviour \& Information Technology}, 21/1 (2002), 1–25. doi: \nolinkurl{10.1080/01449290110108659}
%<a|y>Druin, A. (2002), \enquote{The Role of Children in the Design of New Technology}, \emph{Behaviour \& Information Technology}, 21/1: 1–25. doi: \nolinkurl{10.1080/01449290110108659}
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@article{druin2002rcd,
  author = {A. Druin},
  title = {The Role of Children in the Design of New Technology},
  journaltitle = {Behaviour \& Information Technology},
  volume = {21},
  number = {1},
  date = {2002},
  pages = {1-25},
  doi = {10.1080/01449290110108659}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

% Electronic identifier instead of a page range
\begin{bibexbox}(hacked)
%<n|m><NHR \S18.8.5*>
%<a|y><NHR \S18.8.5*\textdagger>
{li.etal2013flh}
%<n|m>Shu Li et al., \enquote{Forever Love: The Hitherto Earliest Record of Copulating Insects from the Middle Jurassic of China}, \emph{PLoS ONE}, 8/11 (2013), e78188. doi: \nolinkurl{10.1371/journal.pone.0078188}
%<a|y>Li, S., et al. (2013), \enquote{Forever Love: The Hitherto Earliest Record of Copulating Insects from the Middle Jurassic of China}, \emph{PLoS ONE}, 8/11, e78188. doi: \nolinkurl{10.1371/journal.pone.0078188}
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@article{li.etal2013flh,
  author = {Shu Li and Chungkun Shih and Chen Wang and Hong Pang and Dong Ren},
  title = {Forever Love},
  subtitle = {The Hitherto Earliest Record of Copulating Insects from the Middle Jurassic of China},
  journaltitle = {{PLoS ONE}},
  volume = {8},
  number = {11},
  date = {2013},
  eid = {e78188},
  doi = {10.1371/journal.pone.0078188}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\hack{If the last\slash only word of the journal title is abbreviated (indicated by point or capital letter), it does not need a comma after it. \pkg[biblatex]{Oxref} will try to detect this; if it gets it wrong, you can suppress the comma by adding \cs{nopunct} to the end of the journal (sub)title, or restore it by adding a pair of braces.}

%</n|m|a|y>
%<*n|m>
\begin{bibexbox}<OGS \S15.4.1>
{lindars1965eir}
B. Lindars, \enquote{Ezechiel and Individual Responsibility}, \emph{VT} 15 (1965), 452–67.
\tcblower
\begin{Verbatim}
%</n|m>
%<*n|m|bib>
@article{lindars1965eir,
  author = {B. Lindars},
  title = {Ezechiel and Individual Responsibility},
  journaltitle = {VT},
  volume = {15},
  date = {1965},
  pages = {452-467}}
%</n|m|bib>
%<*n|m>
\end{Verbatim}
\end{bibexbox}
%</n|m>
%<*n|m|a|y>

% Unsigned, with month as issue name
\begin{bibexbox}
%<n|m><OGS \S15.4.1*>
%<a|y><OGS \S15.4.1*\textdagger>
{jsr1990spt}
%<n|m>\enquote{Solar Photon Thruster}, \emph{Journal of Spacecraft and Rockets}, 28/4 (July–Aug. 1990), 411–6.
%<a|y>\enquote{Solar Photon Thruster} (1990), \emph{Journal of Spacecraft and Rockets}, 28/4 (July–Aug.): 411–6.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@article{jsr1990spt,
  title = {Solar Photon Thruster},
  journaltitle = {Journal of Spacecraft and Rockets},
  volume = {28},
  number = {4},
  date = {1990-07/1990-08},
  pages = {411-416}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}


\section{Articles in periodicals with series}

%<n|m>\spec{Author, \enquote{Title}, \emph{JournalTitle}, nth \lit{ser}., Vol/Number (Year), Pages.}
%<a|y>\spec{Author (Year), \enquote{Title}, \emph{JournalTitle}, nth \lit{ser}., Vol/Number: Pages.}

\begin{bibexbox}
%<n|m><NHR \S18.3.3>
%<a|y><NHR \S18.3.3\textdagger>
{moody1953mdb}
%<n|m>T. W. Moody, \enquote{Michael Davitt and the British Labour Movement, 1882–1906}, \emph{Transactions of the Royal Historical Society}, 5th ser., 3 (1953), 53–76.
%<a|y>Moody, T. W. (1953), \enquote{Michael Davitt and the British Labour Movement, 1882–1906}, \emph{Transactions of the Royal Historical Society}, 5th ser., 3: 53–76.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@article{moody1953mdb,
  author = {T. W. Moody},
  title = {Michael Davitt and the British Labour Movement, 1882--1906},
  journaltitle = {Transactions of the Royal Historical Society},
  series = {5},
  volume = {3},
  date = {1953},
  pages = {53-76}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

%<n|m>\spec{Author, \enquote{Title}, \emph{JournalTitle}, \textsc{ns} Vol/Number (Year), Pages.}
%<a|y>\spec{Author (Year), \enquote{Title}, \emph{JournalTitle}, \textsc{ns} Vol/Number, Pages.}

%</n|m|a|y>
%<*n|m>
\begin{bibexbox}<OGS \S15.4.3>
{barnes1971has}
J. Barnes, \enquote{Homonymy in Aristotle and Speusippus}, \emph{Classical Quarterly}, \textsc{ns} 21 (1971), 65–80.
\tcblower
\begin{Verbatim}
%</n|m>
%<*n|m|bib>
@article{barnes1971has,
  author = {J. Barnes},
  title = {Homonymy in Aristotle and Speusippus},
  journaltitle = {Classical Quarterly},
  series = {newseries},
  volume = {21},
  date = {1971},
  pages = {65-80}}
%</n|m|bib>
%<*n|m>
\end{Verbatim}
\end{bibexbox}

%</n|m>
%<*a|y>
\begin{bibexbox}<OGS \S15.19.2*>
{hankinson1989gba}
Hankinson, R. J. (1989), \enquote{Galen and the Best of All Possible Worlds}, \emph{CQ}, \textsc{ns} 39: 43–76.
\tcblower
\begin{Verbatim}
%</a|y>
%<*a|y|bib>
@article{hankinson1989gba,
  author = {R. J. Hankinson},
  date = {1989},
  title = {Galen and the Best of All Possible Worlds},
  journaltitle = {CQ},
  series = {newseries},
  volume = {39},
  pages = {43-76}}
%</a|y|bib>
%<*a|y>
\end{Verbatim}
\end{bibexbox}
%</a|y>
%<*n|m|a|y>


\section{Articles in issues identified by date alone}

%<n|m>\spec{Author, \enquote{Title}, \emph{JournalTitle}, Day Month Year, Pages.}
%<a|y>\spec{Author (Year), \enquote{Title}, \emph{JournalTitle}, Day Month: Pages.}

%</n|m|a|y>
%<*n|m>
% No author
\begin{bibexbox}<OGS \S15.4.1>
{bw1984wen}
\enquote{Who's Excellent Now?}, \emph{Business Week}, 5 Nov. 1984, 76–86.
\tcblower
\begin{Verbatim}
%</n|m>
%<*n|m|bib>
@article{bw1984wen,
  title = {Who's Excellent Now?},
  journaltitle = {Business Week},
  date = {1984-11-05},
  pages = {76-86}}
%</n|m|bib>
%<*n|m>
\end{Verbatim}
\end{bibexbox}

% No pages
\begin{bibexbox}<OGS \S15.4.1>
{lee1995ehf}
Alan Lee, \enquote{England Haunted by Familiar Failings}, \emph{The Times}, 23 June 1995.
\tcblower
\begin{Verbatim}
%</n|m>
%<*n|m|bib>
@article{lee1995ehf,
  author = {Alan Lee},
  title = {England Haunted by Familiar Failings},
  journaltitle = {The Times},
  date = {1995-06-23}}
%</n|m|bib>
%<*n|m>
\end{Verbatim}
\end{bibexbox}

%</n|m>
%<*a|y>
\begin{bibexbox}<OGS \S15.19.2*>
{marx1842kaa}
Marx, K. (1842), \enquote{Der Kommunismus und die Augsburger \enquote{Allgemeine Zeitung}}, \emph{Rheinische Zeitung}, 16 Oct.: 1–2.
\tcblower
\begin{Verbatim}
%</a|y>
%<*a|y|bib>
@article{marx1842kaa,
  author = {Karl Marx},
  title = {Der Kommunismus und die Augsburger \enquote{Allgemeine Zeitung}},
  journaltitle = {Rheinische Zeitung},
  date = {1842-10-16},
  pages = {1-2}}
%</a|y|bib>
%<*a|y>
\end{Verbatim}
\end{bibexbox}

\info{The above example as it appears in the \emph{Oxford Guide to Style} is both incomplete and wildly inaccurate.
  I have completed and corrected it as best I can ascertain.}

% No pages
\begin{bibexbox}<OGS \S15.19.2>
{who1983nsb}
WHO (World Health Organization) (1983), \enquote{Nutrition: Sex Bias of Nutritional Status of Children 0–4 Years}, \emph{Weekly Epidemiologial Record}, 20 May.
\tcblower
\begin{Verbatim}
%</a|y>
%<*a|y|bib>
@article{who1983nsb,
  shortauthor = {WHO},
  author = {{World Health Organization}},
  date = {1983-05-20},
  title = {Nutrition},
  subtitle = {Sex Bias of Nutritional Status of Children 0--4 Years},
  journaltitle = {Weekly Epidemiologial Record}}
%</a|y|bib>
%<*a|y>
\end{Verbatim}
\end{bibexbox}

%</a|y>
%<*n|m|a|y>

% Year as volume number
\begin{bibexbox}
%<n|m><OGS \S15.3>
%<a|y><OGS \S15.3\textdagger>
{boyce1957pgi}
%<n|m>M. Boyce, \enquote{The Parthian \emph{Gsn} and Iranian Minstrel Tradition}, \emph{Journal of the Royal Asiatic Society}, 1957, 10–45.
%<a|y>Boyce, M. (1957), \enquote{The Parthian \emph{Gsn} and Iranian Minstrel Tradition}, \emph{Journal of the Royal Asiatic Society}: 10–45.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@article{boyce1957pgi,
  author = {M. Boyce},
  title = {The Parthian \emph{Gsn} and Iranian Minstrel Tradition},
  journaltitle = {Journal of the Royal Asiatic Society},
  date = {1957},
  pages = {10-45}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\section{Works published as an issue}

These examples illustrate where a book is also published as a whole
issue of a periodical, and show how you may reference both at once.
You can either add the periodical details to a book entry
or add the book details to a periodical entry.

%<n|m>\spec{Author, \emph{Title} = \emph{JournalTitle}, Vol/Number (Location: Publisher, Year), pages.}
%<a|y>\spec{Author (Year), \emph{Title} = \emph{JournalTitle}, Vol/Number (Location: Publisher), pages.}

\tip{Use \code{equals} as the \code{relatedtype}.}

\begin{bibexbox}
%<n|m><OGS \S15.4.1>
%<a|y><OGS \S15.4.1\textdagger>
{bec1976isc}
%<n|m>C. Bec (ed.), \emph{Italie 1500–1550: Une situation de crise?} = \emph{Annales de l'Université Jean Moulin}, 1975/2 (Langues étrangères, 2; Lyon, 1976), 99–109.
%<a|y>Bec, C. (1976) (ed.), \emph{Italie 1500–1550: Une situation de crise?} = \emph{Annales de l'Université Jean Moulin}, 1975/2 (Langues étrangères, 2; Lyon), 99–109.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@collection{bec1976isc,
  editor = {C. Bec},
  title = {Italie 1500--1550},
  subtitle = {Une situation de crise?},
  related = {aujm1975.2},
  relatedtype = {equals},
  series = {Langues étrangères},
  number = {2},
  location = {Lyon},
  date = {1976},
  pages = {99-109}}
@periodical{aujm1975.2,
  title = {Annales de l'Université Jean Moulin},
  volume = {1975},
  number = {2}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

%<n|m>\spec{Author, \emph{Title} = \emph{JournalTitle}, Vol/Number (Year).}
%<a|y>\spec{Author (Year), \emph{Title} = \emph{JournalTitle}, Vol/Number.}

\tip{Use \code{issuetitle} instead of \code{title} to get the right formatting.}

\begin{bibexbox}
%<n|m><OGS \S15.4.1>
%<a|y><OGS \S15.4.1\textdagger>
{trisoglio1973gnq}
%<n|m>F. Trisoglio, \emph{Gregorio di Nazianzo in un quarentennio di recherche (1925–1965)} = \emph{Rivista Iasalliana}, 40 (1973).
%<a|y>Trisoglio, F. (1973), \emph{Gregorio di Nazianzo in un quarentennio di recherche (1925–1965)} = \emph{Rivista Iasalliana}, 40.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@article{trisoglio1973gnq,
  author = {F. Trisoglio},
  issuetitle = {Gregorio di Nazianzo in un quarentennio di recherche (1925--1965)},
  journaltitle = {Rivista Iasalliana},
  volume = {40},
  date = {1973}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}


\section{Articles in an issue that is a supplement to another issue}

\DeclareNumChars*{S}

%<n|m>\spec{Author, \enquote{Title}, \emph{JournalTitle}, Vol/Number (Year); \lit{Supplement to} \emph{MainJournalTitle} Vol/Number, Pages.}
%<a|y>\spec{Author (Year), \enquote{Title}, \emph{JournalTitle}, Vol/Number; \lit{Supplement to} \emph{MainJournalTitle} Vol/Number: Pages.}

\tip{To get this format, use a separate entry for the parent issue, reference it in the \code{related} field, and use the key \code{suppto} as the \code{relatedtype}.}

\begin{bibexbox}
%<n|m><OGS \S15.4.1>
%<a|y><OGS \S15.4.1\textdagger>
{zhentao.etal1989ars}
%<n|m>X. Zhentao, K. K. C. Yau, and F. R. Stephenson, \enquote{Astronomical Records on the Shang Dynasty Oracle Bones}, \emph{Archaeoastronomy}, 14 (1989); Supplement to \emph{Journal for the History of Astronomy}, 20, pp. S61–S72.
%<a|y>Zhentao, X., Yau, K. K. C., and Stephenson, F. R. (1989), \enquote{Astronomical Records on the Shang Dynasty Oracle Bones}, \emph{Archaeoastronomy}, 14; Supplement to \emph{Journal for the History of Astronomy}, 20: pp. S61–S72.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@article{zhentao.etal1989ars,
  author = {X. Zhentao and K. K. C. Yau and F. R. Stephenson},
  title = {Astronomical Records on the Shang Dynasty Oracle Bones},
  journaltitle = {Archaeoastronomy},
  volume = {14},
  date = {1989},
  related = {jha1989},
  relatedtype = {suppto},
  pages = {S61-S72},
  bookpagination = {page}}
@periodical{jha1989,
  title = {Journal for the History of Astronomy},
  volume = {20}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\tip{Use \code{bookpagination} to force the display of \enquote{pp.} (since the number format is odd), and \cs{DeclareNumChars*}\brackets{S} to ensure that \code{S61} is recognized as a number.}%


\section{Articles that span multiple issues}

\tip{Use the key \code{serialarticle} as the \code{relatedtype}.}

%</n|m|a|y>
%<*a|y>
\begin{bibexbox}<NHR \S 17.3*>
{stookey1974ssp}
Stookey, R. W. (1974), \enquote{Social Structure and Politics in the Yemen Arab Republic}, \emph{Middle East Journal}, 28/3: 248–60; 28/4: 409–19.
\tcblower
\begin{Verbatim}
%</a|y>
%<*a|y|bib>
@article{stookey1974ssp,
  author = {R. W. Stookey},
  date = {1974},
  title = {Social Structure and Politics in the Yemen Arab Republic},
  journaltitle = {Middle East Journal},
  volume = {28},
  number = {3},
  pages = {248-260},
  related = {stookey1974ssp2},
  relatedtype = {serialarticle}}
@article{stookey1974ssp2,
  crossref = {stookey1974ssp},
  options = {dataonly},
  volume = {28},
  number = {4},
  pages = {409-419}}
%</a|y|bib>
%<*a|y>
\end{Verbatim}
\end{bibexbox}
%</a|y>

%<*n|m|a|y>

\section{Accepted journal articles, pre-publication}

%<n|m>\spec{Author, \enquote{Title}, \lit{to be published in} \emph{JournalTitle}, Year.}
%<a|y>\spec{Author (Year), \enquote{Title}, \lit{to be published in} \emph{JournalTitle}.}

\begin{bibexbox}
{briscoe2008esp}
(not in book)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@article{briscoe2008esp,
  author = {Robert Briscoe},
  title = {Egocentric Spatial Representation in Action and Perception},
  journaltitle = {Philosophy and Phenomenological Research},
  url = {http://cogprints.org/5780/1/ECSRAP.F07.pdf},
  pubstate = {inpress}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\section{Editorials and other regular features}

Strictly speaking, when a work is headed \enquote{Editorial} or \enquote{Letter to the Editor}
in a periodical, this is a descriptor rather than a title.

\tip{If a piece has a true title, the descriptor goes in the \code{note} field.
  If it doesn't, the descriptor goes in the \code{title} field; annotate the field with the keyword \code{descriptor} to remove the quote marks.
  Alternatively, use the (non-standard) \code{descriptor} field for the descriptor in all cases, and \pkg[biblatex]{oxref} will take care of this for you.}

\begin{bibexbox}
{ball2015ed}
(not in book)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@suppperiodical{ball2015ed,
  author = {Alexander Ball},
  title = {Editorial},
  title+an = {=descriptor},
  date = {2015},
  journaltitle = {International Journal of Digital Curation},
  volume = {10},
  number = {1},
  pages = {i-v},
  doi = {10.2218/ijdc.v10i1.376}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
{jccm2006ed}
(not in book)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@suppperiodical{jccm2006ed,
  title = {\enquote{What a Disaster} and Why Does This Question Matter?},
  date = {2006},
  note = {Editorial},
  journaltitle   = {Journal of Contingencies and Crisis Management},
  volume = {14},
  pages = {1-2}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\section{Reviews}

%<n|m>\spec{Author, \enquote{Title}, \lit{review of} ReviewedWork, \lit{in} \emph{JournalTitle}, Vol/Number (Year), Pages.}
%<a|y>\spec{Author (Year), \enquote{Title}, \lit{review of} ReviewedWork, \lit{in} \emph{JournalTitle}, Vol/Number: Pages.}

\tip{To get this format, use a separate entry for the reviewed item, reference it in the \enquote{related} field, and use the key \enquote{reviewof} as the \enquote{relatedtype}.}

\begin{bibexbox}
%<n|m><OGS \S15.4.4>
%<a|y><OGS \S15.4.4\textdagger>
{dean1995rpb}
%<n|m>J. Dean, review of Philippe Basiron, \emph{My Early Life} (Bourges, 1994), in \emph{Res facta}, 17 (1995), 56–9.
%<a|y>Dean, J. (1995), review of P. Basiron (1994), \emph{My Early Life} (Bourges), in \emph{Res facta}, 17: 56–9.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@review{dean1995rpb,
  author = {J. Dean},
  related = {basiron1994mel},
  relatedtype = {reviewof},
  journaltitle = {Res facta},
  volume = {17},
  date = {1995},
  pages = {56-59}}
@book{basiron1994mel,
  author = {Philippe Basiron},
  title = {My Early Life},
  location = {Bourges},
  date = {1994}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
%<n|m><OGS \S15.4.4>
%<a|y><OGS \S15.4.4\textdagger>
{jocelyn1989pav}
%<n|m>H. D. Jocelyn, \enquote{Probus and Virgil}, review of Maria Luisa Delvigo, \emph{Testo virgiliano e tradizione indiretta} (Pisa, 1987), in \emph{CR}, \textsc{ns} 39 (1989), 27–8.
%<a|y>Jocelyn, H. D. (1989), \enquote{Probus and Virgil}, review of M. L. Delvigo (1987), \emph{Testo virgiliano e tradizione indiretta} (Pisa), in \emph{CR}, \textsc{ns} 39: 27–8.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@review{jocelyn1989pav,
  author = {H. D. Jocelyn},
  title = {Probus and Virgil},
  related = {delvigo1987tvt},
  relatedtype = {reviewof},
  journaltitle = {CR},
  series = {newseries},
  volume = {39},
  date = {1989},
  pages = {27-28}}
@book{delvigo1987tvt,
  author = {Maria Luisa Delvigo},
  title = {Testo virgiliano e tradizione indiretta},
  location = {Pisa},
  date = {1987}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}


\chapter{Books}\label{sec:book}
\chapterprecis{book, mvbook, collection, mvcollection, reference, mvreference}

\section{Monographs}

Biblatex defines \code{book} as a monograph, written either by a single author, or by several authors who have joint responsibility for the entire work. An editor in this context has a modest role selecting or annotating the content, and therefore in Oxford style is given after the title even if the author is not given.

\subsection{Basic form}

%<n|m>\spec{Author, \emph{Title} (Location: Publisher, Year).}
%<a|y>\spec{Author (Year), \emph{Title} (Location: Publisher).}

%</n|m|a|y>
%<*n|m>
\begin{bibexbox}<OGS \S15.2.1>
{eliot1977m}
George Eliot, \emph{Middlemarch} (New York: W. W. Norton, 1977).
\tcblower
\begin{Verbatim}
%</n|m>
%<*n|m|bib>
@book{eliot1977m,
  author = {George Eliot},
  title = {Middlemarch},
  location = {New York},
  publisher = {W. W. Norton},
  date = {1977}}
%</n|m|bib>
%<*n|m>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}<OGS \S15.2.2>
{benvenuti1986op}
Antonia Tissoni Benvenuti, \emph{L'\emph{Orfeo} del Poliziano} (Padua: Editrice Antenore, 1986).
\tcblower
\begin{Verbatim}
%</n|m>
%<*n|m|bib>
@book{benvenuti1986op,
  author = {Antonia Tissoni Benvenuti},
  title = {L'\emph{Orfeo} del Poliziano},
  location = {Padua},
  publisher = {Editrice Antenore},
  date = {1986}}
%</n|m|bib>
%<*n|m>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}<OGS \S15.2.2>
{oconor1977sjf}
Roderick O'Conor, \emph{A Sentimental Journal through \enquote{Finnegan's Wake}, with a Map of the Liffey} (Dublin: HCE Press, 1977).
\tcblower
\begin{Verbatim}
%</n|m>
%<*n|m|bib>
@book{oconor1977sjf,
  author = {Roderick O'Conor},
  title = {A Sentimental Journal through \enquote{Finnegan's Wake}, with a Map of the {Liffey}},
  location = {Dublin},
  publisher = {HCE Press},
  date = {1977}}
%</n|m|bib>
%<*n|m>
\end{Verbatim}
\end{bibexbox}

%</n|m>
%<*a|y>
\begin{bibexbox}<NHR \S18.5>
{lyons1981lli}
%<a>Lyons, J. (1981),
%<y>Lyons, J. (1981\emph{a}),
\emph{Language and Linguistics: An Introduction} (Cambridge: Cambridge University Press).
\tcblower
\begin{Verbatim}
%</a|y>
%<*a|y|bib>
@book{lyons1981lli,
  author = {John Lyons},
  date = {1981},
  title = {Language and Linguistics},
  subtitle = {An Introduction},
  location = {Cambridge},
  publisher = {Cambridge University Press}}
%</a|y|bib>
%<*a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}<NHR \S18.5>
{lyons1981lmc}
%<a>Lyons, J. (1981),
%<y>Lyons, J. (1981\emph{b}),
\emph{Language, Meaning and Context} (London: Fontana Paperbacks).
\tcblower
\begin{Verbatim}
%</a|y>
%<*a|y|bib>
@book{lyons1981lmc,
  author = {John Lyons},
  date = {1981},
  title = {Language, Meaning and Context},
  location = {London},
  publisher = {Fontana Paperbacks}}
%</a|y|bib>
%<*a|y>
\end{Verbatim}
\end{bibexbox}

%</a|y>
%<*n|m|a|y>

\subsection{No publisher}

%<n|m>\spec{Author, \emph{Title} (Location, Year).}
%<a|y>\spec{Author (Year), \emph{Title} (Location).}

%</n|m|a|y>
%<*n|m>
\begin{bibexbox}<NHR \S18.1.3>
{rogers1986tmp}
C.~D.~Rogers, \emph{Tracing Missing Persons} (Manchester, 1986).
\tcblower
\begin{Verbatim}
%</n|m>
%<*n|m|bib>
@book{rogers1986tmp,
  author = {C. D. Rogers},
  title = {Tracing Missing Persons},
  location = {Manchester},
  date = {1986}}
%</n|m|bib>
%<*n|m>
\end{Verbatim}
\end{bibexbox}

%</n|m>
%<*a|y>
\begin{bibexbox}<OGS \S15.19.2>
{smith1988fag}
Smith, T. (1988), \emph{Famine and Gender} (New Haven, Conn.).
\tcblower
\begin{Verbatim}
%</a|y>
%<*a|y|bib>
@book{smith1988fag,
  author = {Smith, T.},
  title = {Famine and Gender},
  date = {1988},
  location = {New Haven, Conn.}}
%</a|y|bib>
%<*a|y>
\end{Verbatim}
\end{bibexbox}

%</a|y>
%<*n|m|a|y>

\subsection{Edited book}

%<n|m>\spec{Author, \emph{Title}, \lit{ed.} Editor(s) (Location: Publisher, Year).}
%<a|y>\spec{Author (Year), \emph{Title}, \lit{ed.} Editor(s) (Location: Publisher).}

%<n|m>\spec{\emph{Title}, \lit{ed.} Editor(s) (Location: Publisher, Year).}
%<a|y>\spec{\emph{Title} (Year), \lit{ed.} Editor(s) (Location: Publisher).}

\begin{bibexbox}
%<n|m><OGS \S15.2.1>
%<a|y><OGS \S15.2.1\textdagger>
{boas.botschuyver1952dc}
%<n|m>\emph{Distichia Catonis}, ed. Marcus Boas and Henricus Johannes Botschuyver (Amsterdam, 1952).
%<a|y>\emph{Distichia Catonis} (1952), ed. M. Boas and H. J. Botschuyver (Amsterdam).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@book{boas.botschuyver1952dc,
  title = {Distichia Catonis},
  editor = {Marcus Boas and Henricus Johannes Botschuyver},
  location = {Amsterdam},
  date = {1952}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\section{Collections}

Biblatex defines \code{collection} as a book made up of multiple self-contained contributions from distinct authors. There is no overall author: use the regular \code{book} entry type for collections of a single author’s work. The editor in this case has a more active role and therefore comes before the title.

%<n|m>\spec{Editor (\lit{ed.}), \emph{Title} (Location: Publisher, Year).}
%<a|y>\spec{Editor (Year) (\lit{ed.}), \emph{Title} (Location: Publisher).}

%</n|m|a|y>
%<*n|m>
\begin{bibexbox}<OGS \S15.2.1>
{stewart.etal1994mb}
Rosemary Stewart et al. (eds.), \emph{Managing in Britain} (London, 1994).
\tcblower
\begin{Verbatim}
%</n|m>
%<*n|m|bib>
@collection{stewart.etal1994mb,
  editor = {Rosemary Stewart and Jean-Louis Barsoux and Alfred Kieser and Hans-Dieter Ganter and Peter Walgenbach},
  title = {Managing in {Britain}},
  location = {London},
  date = {1994}}
%</n|m|bib>
%<*n|m>
\end{Verbatim}
\end{bibexbox}

%</n|m>
%<*a|y>
\begin{bibexbox}<OGS \S15.19.2>
{barnes.griffin1989pte}
Barnes, J., and Griffin, M. T. (1989) (eds.), \emph{Philosophia Togata: Essays on Philosophy and Roman Society} (Oxford).
\tcblower
\begin{Verbatim}
%</a|y>
%<*a|y|bib>
@collection{barnes.griffin1989pte,
  editor = {Jonathan Barnes and Miriam T. Griffin},
  date = {1989},
  title = {Philosophia Togata},
  subtitle = {Essays on Philosophy and Roman Society},
  location = {Oxford}}
%</a|y|bib>
%<*a|y>
\end{Verbatim}
\end{bibexbox}

%</a|y>
%<*n|m|a|y>%

%</n|m|a|y>
%<*a|y>
\begin{bibexbox}<OGS \S15.19.2>
{hankinson1988mmm}
Hankinson, R. J. (1988) (ed.), \emph{Method, Medicine, and Metaphysics} (Edmonton, Alta.).
\tcblower
\begin{Verbatim}
%</a|y>
%<*a|y|bib>
@collection{hankinson1988mmm,
  editor = {R. J. Hankinson},
  date = {1988},
  title = {Method, Medicine, and Metaphysics},
  location = {Edmonton, Alta.}}
%</a|y|bib>
%<*a|y>
\end{Verbatim}
\end{bibexbox}

%</a|y>
%<*n|m|a|y>

\section{Reference works}

Biblatex uses \code{reference} for encyclopaedias and dictionaries, which are typically made up of many small contributions by distinct authors and compiled by an editorial board whose membership might change between successive editions. From a database perspective, reference works are like collections in that they have no single author (a reference work written by a single author should use the \code{book} entry type instead).

\tip{The \emph{Oxford Guide to Style} considers the titles of reference works to be more important and memorable than those of the editor, and so lists the title first, but \emph{New Hart's Rules} doesn't. \pkg[biblatex]{Oxref} takes the former approach, but you can switch to the latter by setting the \key{useeditor} option back to true for this type.}

\begin{tcblisting}{listing only}
\ExecuteBibliographyOptions[reference,mvreference]{useeditor=true}
\end{tcblisting}

%<n|m>\spec{\emph{Title}, \lit{ed.} Editor(s) (Location: Publisher, Year).}
%<a|y>\spec{\emph{Title} (Year), \lit{ed.} Editor(s) (Location: Publisher).}

\begin{bibexbox}
%<n|m><OGS \S15.2.1>
%<a|y><OGS \S15.2.1\textdagger>
{fortenbaugh.etal1991tes}
%<n|m>\emph{Theophrastus of Eresus: Sources for his Life, Writings, Thought, and Influence}, ed. William W. Fortenbaugh et al., 2 vols. (Philosophia Antiqua, 54; Leiden, 1991).
%<a|y>\emph{Theophrastus of Eresus: Sources for his Life, Writings, Thought, and Influence} (1991), ed. W. W. Fortenbaugh et al., 2 vols. (Philosophia Antiqua, 54; Leiden).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@mvreference{fortenbaugh.etal1991tes,
  title = {{Theophrastus} of {Eresus}},
  subtitle = {Sources for his Life, Writings, Thought, and Influence},
  editor = {William W. Fortenbaugh and Pamela M Huby and Robert W. Sharples and Dimitri Gutas
    and others},
  volumes = {2},
  series = {Philosophia Antiqua},
  number = {54},
  location = {Leiden},
  date = {1991}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}


\section{Multi-volume works}

Biblatex provides additional entry types for multi-volume works: \code{mvbook}, \code{mvcollection} and \code{mvreference} respectively. These can be used to cite all the volumes at once, or just one volume from the set.

\subsection{All volumes}

Where all volumes were published consistently, the following form is used:

%<n|m>\spec{Author, \emph{Title}, n \lit{vols.} (Location: Publisher, Year), VolNo. Pages.}
%<a|y>\spec{Author (Year), \emph{Title}, n \lit{vols.} (Location: Publisher), VolNo. Pages.}

%<*n>
\begin{egcite}{\dots(Brussels, 1867–88), ii. 367–8}
\cite[ii.~\mkcomprange{367-368}]%
  {straeten1867lmp}
\end{egcite}
%</n>
%<*m|a|y>
\begin{egcite}{}
\parencite[ii.~\mkcomprange{367-368}]%
{straeten1867lmp}
\end{egcite}
%</m|a|y>

\begin{bibexbox}
%<n|m><OGS \S15.2.6>
%<a|y><OGS \S15.2.6\textdagger>
{straeten1867lmp}%
%<n|m>Edmond Vander Straeten, \emph{La Musique aux Pays-Bas avant le XIX\textsuperscript{e} siècle}, 8 vols. (Brussels, 1867–88).
%<a|y>Vander Straeten, E. (1867–88), \emph{La Musique aux Pays-Bas avant le XIX\textsuperscript{e} siècle}, 8 vols. (Brussels).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@mvbook{straeten1867lmp,
    author = {Edmond {Vander Straeten}},
    title = {La Musique aux Pays-Bas avant le XIX\textsuperscript{e} siècle},
    volumes = {8},
    location = {Brussels},
    date = {1867/1888}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

Where the publisher changed between volumes, the following form is used:

%<n|m>\spec{Author, \emph{Title}, VolNo, n \lit{vols.} (Location: Publisher and Location: Publisher, Year–Year).}
%<a|y>\spec{Author (Year–Year), \emph{Title}, VolNo, n \lit{vols.} (Location: Publisher and Location: Publisher).}

\begin{bibexbox}
%<n|m><OGS \S15.2.6*>
%<a|y><OGS \S15.2.6*\textdagger>
{ritter1838hap}
%<n|m>Heinrich Ritter, \emph{The History of Ancient Philosophy}, trans. Alexander J. W. Morrison, 4~vols. (Oxford: Talboys and London: Bohn, 1838–46).
%<a|y>Ritter, H. (1838–46), \emph{The History of Ancient Philosophy}, trans. A. J. W. Morrison, 4~vols. (Oxford: Talboys and London: Bohn).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@mvbook{ritter1838hap,
  author = {Heinrich Ritter},
  title = {The History of Ancient Philosophy},
  translator = {Alexander J. W. Morrison},
  volumes = {4},
  location = {Oxford and London},
  publisher = {Talboys and Bohn},
  date = {1838/1846}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\info{In the \emph{Oxford Style Manual}, the translator in the above reference
  is in parentheses; this occurs in one other reference (\S15.2.2, Lawrence 1992),
  but in many more does not (\S15.2.15, Bischoff 1990; \S15.8, Auden 1990;
  all in \S13.11.1). I am therefore choosing to ignore this unnecessary
  complication.}

\tip{You can alternatively use the standard \textsf{biblatex} relation type \code{multivolume}.
%<n|m>Note that when you do so, the overall date is removed, so be sure that individual volume dates are provided.
}

\begin{bibexbox}
%<n|m><OGS \S15.2.6*>
%<a|y><OGS \S15.2.6*\textdagger>
{ritter1838hap:mv}
%<n|m>Heinrich Ritter, \emph{The History of Ancient Philosophy}, trans. Alexander J. W. Morrison, 4~vols., i–iii (Oxford: Talboys, 1838–9), iv (London: Bohn, 1846).
%<a|y>Ritter, H. (1838–46), \emph{The History of Ancient Philosophy}, trans. A. J. W. Morrison, 4~vols., i–iii (Oxford: Talboys, 1838–9), iv (London: Bohn, 1846).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@mvbook{ritter1838hap:mv,
  author = {Heinrich Ritter},
  title = {The History of Ancient Philosophy},
  translator = {Alexander J. W. Morrison},
  volumes = {4},
  date = {1838/1846},
  related = {ritter1838hap1-3,ritter1838hap4},
  relatedtype = {multivolume}}
@book{ritter1838hap1-3,
  volume = {1-3},
  location = {Oxford},
  publisher = {Talboys},
  date = {1838/1839}}
@book{ritter1838hap4,
  volume = {4},
  location = {London},
  publisher = {Bohn},
  date = {1846}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\subsection{One volume from several}

Where the volumes are merely numbered, the following form is used:

%<n|m>\spec{Author, \emph{Title}, VolNo (Location: Publisher, Year), Pages.}
%<a|y>\spec{Author (Year), \emph{Title}, VolNo (Location: Publisher), Pages.}

\tip{To get this format, do not use \code{maintitle}: put the title of the whole work in \code{title}.}

%</n|m|a|y>
%<*n>
\begin{egcite}{\dots ii (Brussels, 1867–88), 367–8}
\cite[367–368]{straeten1867lmp.ii}
\end{egcite}
%</n>
%<*m>
\begin{egcite}{}
\cite[367–368]{straeten1867lmp.ii}
\end{egcite}
%</m>
%<*n|m>

\begin{bibexbox}<OGS \S15.2.6>
{straeten1867lmp.ii}
Edmond Vander Straeten, \emph{La Musique aux Pays-Bas avant le XIX\textsuperscript{e} siècle}, ii (Brussels, 1867–88).
\tcblower
\begin{Verbatim}
%</n|m>
%<*n|m|bib>
@mvbook{straeten1867lmp.ii,
  author = {Edmond {Vander Straeten}},
  title = {La Musique aux Pays-Bas avant le XIX\textsuperscript{e} siècle},
  volume = {2},
  location = {Brussels},
  date = {1867/1888}}
%</n|m|bib>
%<*n|m>
\end{Verbatim}
\end{bibexbox}
%</n|m>
%<*a|y>
\begin{bibexbox}<OGS \S15.19.2>
{annas1983osa}
Annas, J. (1983) (ed.), \emph{Oxford Studies in Ancient Philosophy}, i (Oxford).
\tcblower
\begin{Verbatim}
%</a|y>
%<*a|y|bib>
@mvcollection{annas1983osa,
  editor = {Annas, Julia},
  date = {1983},
  title = {Oxford Studies in Ancient Philosophy},
  volume = {1},
  location = {Oxford}}
%</a|y|bib>
%<*a|y>
\end{Verbatim}
\end{bibexbox}
%</a|y>
%<*n|m|a|y>

Where the volumes each have their own (sub)title,
and they were all published at once (more or less),
the following form is used:

%<n|m>\spec{Author, \emph{Title}, VolNo: \emph{VolTitle} (Location: Publisher, Year), Pages.}
%<a|y>\spec{Author (Year), \emph{Title}, VolNo: \emph{VolTitle} (Location: Publisher), Pages.}

\tip{To get this format, use \code{title} for the volume title and \code{maintitle} for the whole work.}

\begin{bibexbox}
%<n|m><OGS \S15.2.2>
%<a|y><OGS \S15.2.2\textdagger>
{brady.etal1994hehsa}
%<n|m>Thomas A. Brady, Jr., Heiko A. Oberman, and James D. Tracy (eds.), \emph{Handbook of European History, 1400–1600: Late Middle Ages, Renaissance and Reformation}, i: \emph{Structures and Assertions} (Leiden: E. J. Brill, 1994).
%<a|y>Brady, Jr., T. A., Oberman, H. A., and Tracy, J. D. (1994) (eds.), \emph{Handbook of European History, 1400–1600: Late Middle Ages, Renaissance and Reformation}, i: \emph{Structures and Assertions} (Leiden: E. J. Brill).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@mvcollection{brady.etal1994hehsa,
  editor = {Brady, Jr., Thomas A. and Heiko A. Oberman and James D. Tracy},
  maintitle = {Handbook of European History, 1400–1600},
  mainsubtitle = {{Late} {Middle} {Ages,} {Renaissance} and {Reformation}},
  volume = {1},
  title = {Structures and Assertions},
  location = {Leiden},
  publisher = {E. J. Brill},
  date = {1994}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

%<*n>
\begin{egcite}{\dots (Cambridge: CUP, 1932), 42–56}
\cite[42-56]{ward.waller1932che}
\end{egcite}
%</n>
%<*m|a|y>
\begin{egcite}{}
\parencite[42-56]%
  {ward.waller1932che}
\end{egcite}
%</m|a|y>

\begin{bibexbox}
%<n|m><OGS \S15.2.6>
%<a|y><OGS \S15.2.6\textdagger>
{ward.waller1932che}
%<n|m>A. W. Ward and A. E. Waller (eds.), \emph{The Cambridge History of English Literature}, xii: \emph{The Nineteenth Century} (Cambridge: CUP, 1932).
%<a|y>Ward, A. W., and Waller, A. E. (1932) (eds.), \emph{The Cambridge History of English Literature}, xii: \emph{The Nineteenth Century} (Cambridge: CUP).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@mvcollection{ward.waller1932che,
  editor = {A. W. Ward and A. E. Waller},
  maintitle = {The Cambridge History of English Literature},
  volume = {12},
  title = {The Nineteenth Century},
  location = {Cambridge},
  publisher = {CUP},
  date = {1932}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

Where the volumes each have their own (sub)title,
and there are many volumes spanning years and possibly publishers,
the following form is used:

%<n|m>\spec{Author, \emph{VolTitle}, [\lit{vol.} VolNo \lit{of} Title] (Location: Publisher, Year), Pages.}
%<a|y>\spec{Author (Year), \emph{VolTitle}, [\lit{vol.} VolNo \lit{of} Title] (Location: Publisher), Pages.}

\tip{To get this format, use \code{book} instead of \code{mvbook}.}

\begin{bibexbox}
%<n|m><NHR \S18.2.7>
%<a|y><NHR \S18.2.7\textdagger>
{fischer1989asf}
%<n|m>David Hackett Fischer, \emph{Albion's Seed: Four British Folkways in America}, [vol.\@ i of \emph{America: A Cultural History}] (New York: Oxford University Press, 1989).
%<a|y>Fischer, D. H. (1989), \emph{Albion's Seed: Four British Folkways in America}, [vol.\@ i of \emph{America: A Cultural History}] (New York: Oxford University Press).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@book{fischer1989asf,
  author = {David Hackett Fischer},
  title = {Albion's Seed},
  subtitle = {Four British Folkways in America},
  volume = {1},
  maintitle = {America},
  mainsubtitle = {A Cultural History},
  location = {New York},
  publisher = {Oxford University Press},
  date = {1989}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\section{Additions, translations, and revisions}

Where works have significant introductions, forewords, afterwords, illustrations, etc.\@ this may be noted as follows:

%<n|m>\spec{Author, \emph{Title}, \lit{with an} Addition \lit{by} Contributor (Location: Publisher, Year).}
%<a|y>\spec{Author (Year), \emph{Title}, \lit{with an} Addition \lit{by} Contributor (Location: Publisher).}

\begin{bibexbox}
%<n|m><OGS \S15.2.1>
%<a|y><OGS \S15.2.1\textdagger>
{twain1971cyk}
%<n|m>Mark Twain, \emph{A Connecticut Yankee at King Arthur's Court}, with an introduction by Justin Kaplan (Harmondsworth: Penguin, 1971).
%<a|y>Twain, M. (1971), \emph{A Connecticut Yankee at King Arthur's Court}, with an introduction by J. Kaplan (Harmondsworth: Penguin).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@book{twain1971cyk,
  author = {Mark Twain},
  title = {A {Connecticut} Yankee at {King} {Arthur's} Court},
  introduction = {Justin Kaplan},
  location = {Harmondsworth},
  publisher = {Penguin},
  date = {1971}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

Translators are credited as follows:

%<n|m>\spec{Author, \emph{Title}, \lit{trans.} Translator(s) (Location: Publisher, Year).}
%<a|y>\spec{Author (Year), \emph{Title}, \lit{trans.} Translator(s) (Location: Publisher).}

\begin{bibexbox}
%<n|m><NHR \S18.2.14>
%<a|y><NHR \S18.2.14\textdagger>
{bischoff1990lpa}
%<n|m>Bernhard Bischoff, \emph{Latin Palaeography: Antiquity and the Middle Ages}, trans. Dáibhi Ó~Cróinín and David Ganz (Cambridge, 1990).
%<a|y>Bischoff, B. (1990), \emph{Latin Palaeography: Antiquity and the Middle Ages}, trans. D. Ó~Cróinín and D. Ganz (Cambridge).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@book{bischoff1990lpa,
  author = {Bernhard Bischoff},
  title = {Latin Palaeography},
  subtitle = {Antiquity and the Middle Ages},
  translator = {Dáibhi Ó~Cróinín and David Ganz},
  location = {Cambridge},
  date = {1990}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

%<n|m>\spec{Author, \emph{Title}, \lit{trans.\@ with} Addition Translator(s) (Location: Publisher, Year).}
%<a|y>\spec{Author (Year), \emph{Title}, \lit{trans.\@ with} Addition Translator(s) (Location: Publisher).}

\begin{bibexbox}
%<n|m><NHR \S18.2.14>
%<a|y><NHR \S18.2.14\textdagger>
{martorell1984tlb}
%<n|m>Joanat Martorell, \emph{Tirant lo Blanc}, trans. with foreword David H. Rosenthal (London, 1984).
%<a|y>Martorell, J. (1984), \emph{Tirant lo Blanc}, trans. with foreword D. H. Rosenthal (London).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@book{martorell1984tlb,
  author = {Joanat Martorell},
  title = {Tirant lo Blanc},
  translator = {David H. Rosenthal},
  foreword = {David H. Rosenthal},
  location = {London},
  date = {1984}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}


\section{Editions}

\subsection{Later edition only}

Where the author\slash editor is common to both, the following form is used:

%<n|m>\spec{Author, \emph{Title} (nth \lit{edn.}, Location: Publisher, Year).}
%<a|y>\spec{Author (Year), \emph{Title} (nth \lit{edn.}, Location: Publisher).}

\tip{This is the format used by the entry type \code{book}}

%</n|m|a|y>
%<*n>
\begin{egcite}{\dots (3rd edn., 1990), 419–21}
\cite[419-421]{baker1990iel}
\end{egcite}
%</n>
%<*n|m>

\begin{bibexbox}<OGS \S15.2.3>
{baker1990iel}
J. H. Baker, \emph{An Introduction to English Legal History} (3rd edn., 1990).
\tcblower
\begin{Verbatim}
%</n|m>
%<*n|m|bib>
@book{baker1990iel,
  author = {J. H. Baker},
  title = {An Introduction to {English} Legal History},
  edition = {3},
  date = {1990}}
%</n|m|bib>
%<*n|m>
\end{Verbatim}
\end{bibexbox}

%</n|m>
%<*a|y>
\begin{bibexbox}<NHR \S17.3.2*>
{maitland2001mvr}
Maitland, G. (2001), \emph{Maitland's Vertebral Manipulation} (6th edn., Oxford: Butterworth–Heinemann).
\tcblower
\begin{Verbatim}
%</a|y>
%<*a|y|bib>
@book{maitland2001mvr,
  author = {G. Maitland},
  title = {Maitland's Vertebral Manipulation},
  edition = {6},
  publisher = {Butterworth--Heinemann},
  location = {Oxford},
  date = {2001}}
%</a|y|bib>
%<*a|y>
\end{Verbatim}
\end{bibexbox}

%</a|y>
%<*n|m|a|y>
\begin{bibexbox}
%<n|m><NHR \S18.8.5>
%<a|y><NHR \S18.8.5\textdagger>
{beckford1823v}
%<n|m>William Beckford, \emph{Vathek} (4th edn., London, 1823) [online facsimile], \url{http://beckford.c18.net/wbvathek1823.html}, accessed 5 Nov. 2013.
%<a|y>Beckford, W. (1823), \emph{Vathek} (4th edn., London) [online facsimile], \url{http://beckford.c18.net/wbvathek1823.html}, accessed 5 Nov. 2013.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@book{beckford1823v,
  author = {William Beckford},
  title = {Vathek},
  edition = {4},
  location = {London},
  date = {1823},
  howpublished = {online facsimile},
  url = {http://beckford.c18.net/wbvathek1823.html},
  urldate = {2013-11-05}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

Where the editor has changed, the following form is used:

%<n|m>\spec{\emph{Title}, nth \lit{edn.}, \lit{ed.} Editor (Location: Publisher, Year).}
%<a|y>\spec{\emph{Title} (Year), nth \lit{edn.}, \lit{ed.} Editor (Location: Publisher).}

\tip{This format is used by entry type \code{reference}}

\begin{bibexbox}
%<n|m><OGS \S15.2.3>
%<a|y><OGS \S15.2.3\textdagger>
{knowles1999odq}
%<n|m>\emph{The Oxford Dictionary of Quotations}, 5th edn., ed. Elizabeth Knowles (Oxford, 1999).
%<a|y>\emph{The Oxford Dictionary of Quotations} (1999), 5th edn., ed. E. Knowles (Oxford).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@reference{knowles1999odq,
  title = {The {Oxford} Dictionary of Quotations},
  edition = {5},
  editor = {Elizabeth Knowles},
  publisher = {Oxford},
  date = {1999}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\subsection{Both first and later edition}

%<n|m>\spec{Author, \emph{Title} (Year; nth \lit{edn.}, Location: Publisher, Year).}
%<a|y>\spec{Author (Year), \emph{Title} (Year; nth \lit{edn.}, Location: Publisher).}

\tip{Use the \code{orig} fields for the earlier edition.}

%</n|m|a|y>
%<*n|m>
\begin{bibexbox}<OGS \S15.2.3>
{denniston1934gp}
J. D. Denniston, \emph{The Greek Particles} (1934; 2nd edn., Oxford, 1954).
\tcblower
\begin{Verbatim}
%</n|m>
%<*n|m|bib>
@book{denniston1934gp,
  author = {J. D. Denniston},
  title = {The Greek Particles},
  origdate = {1934},
  edition = {2},
  location = {Oxford},
  date = {1954}}
%</n|m|bib>
%<*n|m>
\end{Verbatim}
\end{bibexbox}

\tip{Use the localization key \code{revised} as the edition to get \enquote{revised edition}. Use the localization key \code{revisedenlarged} as the edition to get \enquote{revised and enlarged edition}}

\begin{bibexbox}<OGS \S15.2.1>
{gibbon1686dfs}[]
[John Gibbon], \emph{Day-Fatality: Or Some Observations on Days Lucky and Unlucky} (London, 1678; rev.~edn., 1686).
\tcblower
\begin{Verbatim}
%</n|m>
%<*n|m|bib>
@book{gibbon1686dfs,
  author = {John Gibbon},
  author+an = {=inferred},
  title = {Day-Fatality},
  subtitle = {Or Some Observations on Days Lucky and Unlucky},
  edition = {revised},
  origlocation = {London},
  origdate = {1678},
  date = {1686}}
%</n|m|bib>
%<*n|m>
\end{Verbatim}
\end{bibexbox}

\info{In the \emph{Oxford Guide to Style}, there is no comma after \enquote{rev. edn.} in the above reference; this may be an error.}
%</n|m>
%<*a|y>
\begin{bibexbox}<OGS \S15.19.2>
{marx1867ccp}
Marx, K. (1867), \emph{Capital: A Critique of Political Economy}, i, trans. B. Fowkes (New York, 1977).
\tcblower
\begin{Verbatim}
%</a|y>
%<*a|y|bib>
@mvbook{marx1867ccp,
  author = {K. Marx},
  origdate = {1867},
  title = {Capital},
  subtitle = {A Critique of Political Economy},
  volume = {1},
  translator = {B. Fowkes},
  location = {New York},
  date = {1977}}
%</a|y|bib>
%<*a|y>
\end{Verbatim}
\end{bibexbox}

%</a|y>
%<*n|m|a|y>

\subsection{Republications}

If the publication has not been revised, but has been re-typeset by a different publisher,
the \emph{Oxford Guide to Style} suggests putting the original date in a note at the end,
after rather than within the publication block%
%<n|m>.
%<a|y>, but this does not affect the author–date style since the original date is at the head of the reference anyway.

%<n|m>\spec{Author, \emph{Title} (Location: Publisher, Year) (\lit{originally pub.} Year).}
%<a|y>\spec{Author (OrigYear), \emph{Title} (Location: Publisher).}

%<*n|m>
\tip{This format is triggered if you specify an original date but do not specify the original publisher or location, nor the edition of the later publication.}
\info{In the \emph{Oxford Guide to Style}, the following example has the string \enquote{first pub.\@} in place of the more common \enquote{originally pub.\@};
to use this phrase in all entries, use the regular \pkg{biblatex} command to reset the string:}
\begin{tcblisting}{listing only,left skip=2em}
\DefineBibliographyStrings{english}{origpubin={first pub\adddot}}
\end{tcblisting}
%</n|m>

\begin{bibexbox}
%<n|m><OGS \S15.2.3*>
%<a|y><OGS \S15.2.3\textdagger>
{bettelheim1976uem}
%<n|m>Bruno Bettelheim, \emph{The Uses of Enchantment: The Meaning and Importance of Fairy Tales} (Harmondsworth: Penguin Books, 1988) (originally pub. 1976).
%<a|y>Bettelheim, B. (1976), \emph{The Uses of Enchantment: The Meaning and Importance of Fairy Tales} (Harmondsworth: Penguin Books, 1988).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@book{bettelheim1976uem,
  author = {Bruno Bettelheim},
  title = {The Uses of Enchantment},
  subtitle = {The Meaning and Importance of Fairy Tales},
  location = {Harmondsworth},
  publisher = {Penguin Books},
  date = {1988},
  origdate = {1976}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\subsection{Reprints}

%<n|m>\spec{Author, \emph{Title} (Location: Publisher, Year; \lit{repr.} Location: Publisher, Year).}
%<a|y>\spec{Author (Year–Year), \emph{Title} (Location: Publisher; \lit{repr.} Location: Publisher).}

\tip{Use localization key \code{reprint} as the edition. For a revised reprint, use \code{revisedreprint}.}

\begin{bibexbox}
%<n|m><OGS \S15.2.4>
%<a|y><OGS \S15.2.4\textdagger>
{adam.tannery1897odd}
%<n|m>C. Adam and D. Tannery (eds.), \emph{Œuvres de Descartes} (Paris: Cerf, 1897–1913; repr. Paris: J. Vrin, CNRS, 1964–76).
%<a|y>Adam, C., and Tannery, D. (1897–1913) (eds.), \emph{Œuvres de Descartes} (Paris: Cerf; repr. Paris: J. Vrin, CNRS, 1964–76).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@collection{adam.tannery1897odd,
  editor = {C. Adam and D. Tannery},
  title = {Œuvres de Descartes},
  origlocation = {Paris},
  origpublisher = {Cerf},
  origdate = {1897/1913},
  edition = {reprint},
  location = {Paris},
  publisher = {J. Vrin, CNRS},
  date = {1964/1976}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
%<n|m><OGS \S15.2.4>
%<a|y><OGS \S15.2.4\textdagger>
{southern1991sap}
%<n|m>R. W. Southern, \emph{Saint Anselm: A Portrait in a Landscape} (rev. repr., Cambridge: Cambridge University Press, 1991).
%<a|y>Southern, R. W. (1991), \emph{Saint Anselm: A Portrait in a Landscape} (rev. repr., Cambridge: Cambridge University Press).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@book{southern1991sap,
  author = {R. W. Southern},
  title = {Saint Anselm},
  subtitle = {A Portrait in a Landscape},
  edition = {revisedreprint},
  location = {Cambridge},
  publisher = {Cambridge University Press},
  date = {1991}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

%<n|m>\spec{Author, \emph{Title} (Location: Publisher, Year; \lit{facs. edn.}, Location: Publisher, Year).}
%<a|y>\spec{Author (Year–Year), \emph{Title} (Location: Publisher; \lit{facs. edn.}, Location: Publisher).}

\tip{Use localization key \code{facsimile} as the edition.}

\begin{bibexbox}
%<n|m><OGS \S15.2.4>
%<a|y><OGS \S15.2.4\textdagger>
{allen1594kkk}
%<n|m>E. Allen, \emph{A Knack to Know a Knave} (London, 1594; facs. edn., Oxford: Malone Society Reprints, 1963).
%<a|y>Allen, E. (1594), \emph{A Knack to Know a Knave} (London; facs. edn., Oxford: Malone Society Reprints, 1963).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@book{allen1594kkk,
  author = {E. Allen},
  title = {A Knack to Know a Knave},
  origlocation = {London},
  origdate = {1594},
  edition = {facsimile},
  location = {Oxford},
  publisher = {Malone Society Reprints},
  date = {1963}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\subsection{Title changes}

\emph{New Hart's Rules} recommends giving the original publication details first,
then the new title and its details after a semicolon.

\tip{The standard \code{relatedtype} value \code{reprintas} is supported.}

\begin{bibexbox}
%<n|m><NHR \S18.2.13>
%<a|y><NHR \S18.2.13\textdagger>
{hare1949wwb}
%<n|m>Cyril Hare, \emph{When the Wind Blows} (London, 1949); repr. as \emph{The Wind Blows Death} (London, 1987).
%<a|y>Hare, C. (1949), \emph{When the Wind Blows} (London); repr. as \emph{The Wind Blows Death} (London, 1987).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@book{hare1949wwb,
  author = {Cyril Hare},
  title = {When the Wind Blows},
  location = {London},
  date = {1949},
  related = {hare1987wbd},
  relatedtype = {reprintas}}
@book{hare1987wbd,
  author = {Cyril Hare},
  title = {The Wind Blows Death},
  location = {London},
  date = {1987}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\tip{A more generalized version of this relation is available.
  If you set the \code{relatedtype} to the \pkg[biblatex]{oxref}-specific keyword \code{editedas},
  the edition and any editorial contributions will be printed in the linking text.}

\begin{bibexbox}
%<n|m><NHR \S18.2.12*>
%<a|y><NHR \S18.2.128\textdagger>
{berkenhout1769onh}
%<n|m>John Berkenhout, \emph{Outlines of the Natural History of Great Britain}, 3 vols. (London, 1769–72); rev. edn., as \emph{A Synopsis of the Natural History of Great Britain}, 2 vols. (London, 1789).
%<a|y>Berkenhout, J. (1769–72), \emph{Outlines of the Natural History of Great Britain}, 3 vols. (London); rev. edn., as \emph{A Synopsis of the Natural History of Great Britain}, 2 vols. (London, 1789).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@mvbook{berkenhout1769onh,
  author = {John Berkenhout},
  title = {Outlines of the Natural History of Great Britain},
  volumes = {3},
  location = {London},
  date = {1769/1772},
  related = {berkenhout1789snh},
  relatedtype = {editedas}}
@mvbook{berkenhout1789snh,
  author = {John Berkenhout},
  title = {A Synopsis of the Natural History of Great Britain},
  volumes = {2},
  edition = {revised},
  location = {London},
  date = {1789}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
%<n|m><NHR \S18.2.13>
%<a|y><NHR \S18.2.13\textdagger>
{lower1665dtw}
%<n|m>Richard Lower, \emph{Diatribæ Thomæ Willisii Doct. Med. \& Profess. Oxon. De febribus Vindicatio adversus Edmundum De Meara Ormoniensem Hibernum M.D.} (London, 1665); facs. edn. with introduction, ed. and trans. Kenneth Dewhurst, as \emph{Richard Lower's \enquote{Vindicatio}: A Defence of the Experimental Method} (Oxford, 1983).
%<a|y>Lower, R. (1665), \emph{Diatribæ Thomæ Willisii Doct. Med. \& Profess. Oxon. De febribus Vindicatio adversus Edmundum De Meara Ormoniensem Hibernum M.D.} (London); facs. edn. with introduction, ed. and trans. K. Dewhurst, as \emph{Richard Lower's \enquote{Vindicatio}: A Defence of the Experimental Method} (Oxford, 1983).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@book{lower1665dtw,
  author = {Richard Lower},
  title = {Diatribæ Thomæ Willisii Doct. Med. \& Profess. Oxon. De febribus Vindicatio adversus
    Edmundum De Meara Ormoniensem Hibernum M.D.},
  location = {London},
  date = {1665},
  related = {dewhurst1983rlv},
  relatedtype = {editedas}}
@book{dewhurst1983rlv,
  author = {Richard Lower},
  introduction = {Kenneth Dewhurst},
  editor = {Kenneth Dewhurst},
  translator = {Kenneth Dewhurst},
  title = {Richard Lower's \enquote{Vindicatio}},
  subtitle = {A Defence of the Experimental Method},
  edition = {facsimile},
  location = {Oxford},
  date = {1983}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}


\subsection{Co-publications\slash co-editions}

%</n|m|a|y>
%<*y>
The \emph{Oxford Guide to Style} provides a special format for expressing works that are co-published by several publishers at once. \textsf{Oxnotes} implements it using the \code{relatedtype} keyword \code{copub}. Since it is not suitable for author–year citation styles, no effort is made to make it work for \textsf{oxyear}; you should cite the edition you used, and either ignore the other or mention it in an \code{addendum}.

%</y>
%<*n>
If the same book has been co-published by multiple publishers at approximately the same time,
you can express this by putting multiple sets of details in the publication block.
You should not do this, however, if you might want to switch to using the \textsf{oxyear} style at some point,
since it does not really work for author–year styles.

\spec{Author, \emph{Title} (Location: Publisher, Year; Location: Publisher, Year).}

\tip{Put each publication in the bib file separately. In the one you plan to cite, put the keys of the others in \code{related} and give \code{copub} as the \code{relatedtype}.}

\begin{bibexbox}
<OGS \S15.2.5>{holfordstrevens1988ag1}
L. A. Holford-Strevens, \emph{Aulus Gellius} (London: Duckworth, 1988; Chapel Hill: University of North Carolina Press, 1989).
\tcblower
\begin{Verbatim}
%</n>
%<*n|bib>
@book{holfordstrevens1988ag1,
  author = {L. A. Holford-Strevens},
  title = {Aulus Gellius},
  location = {London},
  publisher = {Duckworth},
  date = {1988},
  related = {holfordstrevens1988ag2},
  relatedtype = {copub}}
@book{holfordstrevens1988ag2,
  location = {Chapel Hill},
  publisher = {University of North Carolina Press},
  date = {1989}}
%</n|bib>
%<*n>
\end{Verbatim}
\end{bibexbox}

%</n>
%<*n|m|a|y>
If the work is published under two different titles, it is a good idea to
provide both to make it easier to locate.

\tip{Use a generic relation and specify the country details in the \code{relatedstring}.}

\begin{bibexbox}
%<n|m><OGS \S15.2.5>
%<a|y><OGS \S15.2.5\textdagger>
{salinger1953ns}
%<n|m>J. D. Salinger, \emph{Nine Stories} (Boston: Little, Brown, 1953), published in the UK as \emph{For Esmé—With Love and Squalor, and Other Stories} (London: Hamish Hamilton, 1953).
%<a|y>Salinger, J. D. (1953), \emph{Nine Stories} (Boston: Little, Brown), published in the UK as \emph{For Esmé—With Love and Squalor, and Other Stories} (London: Hamish Hamilton, 1953).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@book{salinger1953ns,
  author = {J. D. Salinger},
  title = {Nine Stories},
  location = {Boston},
  publisher = {Little, Brown},
  date = {1953},
  related = {salinger1953few},
  relatedstring = {published in the UK as},
  options = {relationpunct=comma}}
@book{salinger1953few,
  title = {For {Esmé}---With Love and Squalor, and Other Stories},
  location = {London},
  publisher = {Hamish Hamilton},
  date = {1953}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}


\section{Works from a series}

%<n|m>\spec{Author, \emph{Title} (Series; Location: Publisher, Year).}
%<a|y>\spec{Author (Year), \emph{Title} (Series; Location: Publisher).}
%<n|m>\spec{Author, \emph{Title} (Series, Number; Location: Publisher, Year).}
%<a|y>\spec{Author (Year), \emph{Title} (Series, Number; Location: Publisher).}

%</n|m|a|y>
%<*n|m>
\begin{bibexbox}<OGS \S15.2.7>
{garlandia1972dmm}
Johannes de Garlandia, \emph{De mensurabili musica}, ed. Erich Reimer, 2 vols. (Beihefte zum Archiv für Musikwissenschaft, 10–11; Wiesbaden, 1972).
\tcblower
\begin{Verbatim}
%</n|m>
%<*n|m|bib>
@mvbook{garlandia1972dmm,
  author = {Johannes de Garlandia},
  title = {De mensurabili musica},
  editor = {Erich Reimer},
  volumes = {2},
  series = {Beihefte zum Archiv für Musikwissenschaft},
  number = {10--11},
  publisher = {Wiesbaden},
  date = {1972}}
%</n|m|bib>
%<*n|m>
\end{Verbatim}
\end{bibexbox}

%</n|m>
%<*a|y>
\begin{bibexbox}<OGS \S15.19.2>
{barnes1982ari}
Barnes, J. (1982), \emph{Aristotle} (Past Masters; Oxford).
\tcblower
\begin{Verbatim}
%</a|y>
%<*a|y|bib>
@book{barnes1982ari,
  author = {Jonathan Barnes},
  date = {1982},
  title = {Aristotle},
  series = {Past Masters},
  location = {Oxford}}
%</a|y|bib>
%<*a|y>
\end{Verbatim}
\end{bibexbox}

%</a|y>
%<*n|m|a|y>

%<n|m>\spec{Author, \emph{Title} (nth \lit{ser.}, Year).}
%<a|y>\spec{Author (Year), \emph{Title} (nth \lit{ser.}).}

\section{Pre-publication book}

%<n|m>\spec{Author, \emph{Title} (Location: Publisher, \lit{forthcoming}).}
%<a|y>\spec{Author (\lit{forthcoming}), \emph{Title} (Location: Publisher).}

%</n|m|a|y>
%<*a|y>
\begin{bibexbox}<OGS \S15.19.2>
{smithFCgaf}
%<a>Smith, P. (forthcoming),
%<y>Smith, P. (forthcoming \emph{a}),
\emph{Gender and Famine}, 2 vols. (London).
\tcblower
\begin{Verbatim}
%</a|y>
%<*a|y|bib>
@mvbook{smithFCgaf,
  author = {P. Smith},
  title = {Gender and Famine},
  volumes = {2},
  location = {London},
  pubstate = {forthcoming}}
%</a|y|bib>
%<*a|y>
\end{Verbatim}
\end{bibexbox}

%</a|y>
%<*n|m|a|y>

\chapter{Works within books}\label{sec:inbook}
\chapterprecis{inbook, bookinbook, suppbook, incollection, suppcollection, inreference}

\section{Works in collections of a single author's works}

The \code{inbook} entry type is intended for books that consist of several self-contained works by the same author, for citing one of these works.

%<n|m>\spec{Author, \enquote{Title}, \lit{in id.}, \emph{BookTitle}, \lit{ed.} Editor(s) (Location: Publisher, Year), Pages.}
%<a|y>\spec{Author (Year), \enquote{Title}, \lit{in id.}, \emph{BookTitle}, \lit{ed.} Editor(s) (Location: Publisher), Pages.}

\tip{If you provide \code{bookauthor}, and it is the same as the \code{author}, the second instance of the name will replaced by \enquote{id.}\slash \enquote{ead.}\slash \enquote{eid.}\slash \enquote{eaed.} Use the \code{gender} field to select which is used.}

\begin{bibexbox}
%<n|m><OGS \S15.2.11*>
%<a|y><OGS \S15.2.11*\textdagger>
{kristeller1979thm}
%<n|m>Paul Oskar Kristeller, \enquote{The Aristotelian Tradition}, in id., \emph{Renaissance Thought and Its Sources}, ed. Michael Mooney (New York: Columbia University Press, 1979).
%<a|y>Kristeller, P. O. (1979), \enquote{The Aristotelian Tradition}, in id., \emph{Renaissance Thought and Its Sources}, ed. M. Mooney (New York: Columbia University Press).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@inbook{kristeller1979thm,
  author = {Paul Oskar Kristeller},
  gender = {sm},
  title = {The Aristotelian Tradition},
  bookauthor = {Paul Oskar Kristeller},
  booktitle = {Renaissance Thought and Its Sources},
  editor = {Michael Mooney},
  location = {New York},
  publisher = {Columbia University Press},
  date = {1979}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

%<n|m>\spec{Author, \enquote{Title}, \lit{in} \emph{BookTitle}, \lit{ed.} Editor(s) (Location: Publisher, Year), Pages.}
%<a|y>\spec{Author (Year), \enquote{Title}, \lit{in} \emph{BookTitle}, \lit{ed.} Editor(s) (Location: Publisher), Pages.}

\begin{bibexbox}
%<n|m><NHR \S18.2.6*>
%<a|y><NHR \S18.2.6*\textdagger>
{ashton1991d}
%<n|m>John Ashton, \enquote{Dualism}, in \emph{Understanding the Fourth Gospel} (Oxford, 1991), 205–37.
%<a|y>Ashton, J. (1991), \enquote{Dualism}, in \emph{Understanding the Fourth Gospel} (Oxford), 205–37.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@inbook{ashton1991d,
  author = {John Ashton},
  title = {Dualism},
  booktitle = {Understanding the Fourth Gospel},
  location = {Oxford},
  date = {1991},
  pages = {205-237}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\section{Works in collections}

The \code{incollection} entry type is intended for citing one of a collection of self-contained works by different authors.

\subsection{Works in a mixed collection}

%<n|m>\spec{Author, \enquote{Title}, \lit{in} Editors (\lit{eds.}), \emph{BookTitle} (Location: Publisher, Year), Pages.}
%<a|y>\spec{Author (Year), \enquote{Title}, \lit{in} Editors (\lit{eds.}), \emph{BookTitle} (Location: Publisher), Pages.}

%</n|m|a|y>
%<*n|m>
\begin{bibexbox}<OGS \S15.3>
{shearman1993vsf}
John Shearman, \enquote{The Vatican Stanze: Functions and Decoration}, in George Holmes (ed.), \emph{Art and Politics in Renaissance Italy: British Academy Lectures} (Oxford: Clarendon Press, 1993), 185–240.
\tcblower
\begin{Verbatim}
%</n|m>
%<*n|m|bib>
@incollection{shearman1993vsf,
  author = {John Shearman},
  title = {The Vatican Stanze},
  subtitle = {Functions and Decoration},
  editor = {George Holmes},
  booktitle = {Art and Politics in Renaissance Italy},
  booksubtitle = {British Academy Lectures},
  location = {Oxford},
  publisher = {Clarendon Press},
  date = {1993},
  pages = {185-240}}
%</n|m|bib>
%<*n|m>
\end{Verbatim}
\end{bibexbox}

%</n|m>
%<*a|y>
\begin{bibexbox}<NHR \S17.3.2>
{magarey1988ect}
Magarey, M. E. (1988), \enquote{Examination of the Cervical and Thoracic Spine}, in R. Grant (ed.), \emph{Physical Therapy of the Cervical and Thoracic Spine} (New York: Churchill Livingstone), 81–109.
\tcblower
\begin{Verbatim}
%</a|y>
%<*a|y|bib>
@incollection{magarey1988ect,
  author = {M. E. Magarey},
  date = {1988},
  title = {Examination of the Cervical and Thoracic Spine},
  editor = {R. Grant},
  booktitle = {Physical Therapy of the Cervical and Thoracic Spine},
  location = {New York},
  publisher = {Churchill Livingstone},
  pages = {81-109}}
%</a|y|bib>
%<*a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}<NHR \S17.3.2*>
{jessop1997gcc}
Jessop, B. (1997), \enquote{The Governance of Complexity and Complexity of Governance}, in A. Amin and J. Hausner (eds.), \emph{Beyond Markets and Hierarchy} (Aldershot: Edward Elgar).
\tcblower
\begin{Verbatim}
%</a|y>
%<*a|y|bib>
@incollection{jessop1997gcc,
  author = {Bob Jessop},
  date = {1997},
  title = {The Governance of Complexity and Complexity of Governance},
  editor = {Ash Amin and Jerzy Hausner},
  booktitle = {Beyond Markets and Hierarchy},
  location = {Aldershot},
  publisher = {Edward Elgar}}
%</a|y|bib>
%<*a|y>
\end{Verbatim}
\end{bibexbox}

%</a|y>
%<*n|m|a|y>

\subsection{Works by the editor in a mixed collection}

%<n|m>\spec{Author, \enquote{Title}, \lit{in id.} (\lit{ed.}), \emph{BookTitle} (Location: Publisher, Year), Pages.}
%<a|y>\spec{Author (Year), \enquote{Title}, \lit{in id.} (\lit{ed.}), \emph{BookTitle} (Location: Publisher), Pages.}

\tip{If you provide the same values for \code{author} and \code{editor}, the editor name will replaced by \enquote{id.}\slash \enquote{ead.}\slash \enquote{eid.}\slash \enquote{eaed.} Use the \code{gender} field to select which is used.}

\begin{bibexbox}
%<n|m><OGS \S15.3>
%<a|y><OGS \S15.3\textdagger>
{todd1974dhp}
%<n|m>W. B. Todd, \enquote{David Hume: A Preliminary Bibliography}, in id. (ed.), \emph{Hume and the Enlightenment: Essays Presented to Ernest Campbell Mossner} (Edinburgh: Edinburgh University Press, 1974).
%<a|y>Todd, W. B. (1974), \enquote{David Hume: A Preliminary Bibliography}, in id. (ed.), \emph{Hume and the Enlightenment: Essays Presented to Ernest Campbell Mossner} (Edinburgh: Edinburgh University Press).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@incollection{todd1974dhp,
  author = {W. B. Todd},
  gender = {sm},
  title = {David Hume},
  subtitle = {A Preliminary Bibliography},
  editor = {W. B. Todd},
  booktitle = {Hume and the Enlightenment},
  booksubtitle = {Essays Presented to Ernest Campbell Mossner},
  location = {Edinburgh},
  publisher = {Edinburgh University Press},
  date = {1974}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}


\section{Anthologies of independently published works}

Biblatex provides the \code{bookinbook} entry type for citing a part of an anthology that has previously been published as a book in its own right. The main difference from \code{inbook} is how the original publication information is handled.

\subsection{Later version more accessible}

\tip{Use \code{origdate} to give the date of original publication.}

\begin{bibexbox}
%<n|m><OGS \S15.3*>
%<a|y><OGS \S15.3*\textdagger>
{frege1892osr}
%<n|m>G. Frege, \enquote{On Sense and Reference}, in id., \emph{Philosophical Writings}, ed. and trans. P. T. Geach and M. Black (Oxford: Blackwell, 1952) (originally pub. 1892).
%<a|y>Frege, G. (1892), \enquote{On Sense and Reference}, in id., \emph{Philosophical Writings}, ed. and trans. P. T. Geach and M. Black (Oxford: Blackwell, 1952).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@bookinbook{frege1892osr,
  author = {G. Frege},
  gender = {sm},
  title = {On Sense and Reference},
  bookauthor = {G. Frege},
  booktitle = {Philosophical Writings},
  translator = {P. T. Geach and M. Black},
  editor = {P. T. Geach and M. Black},
  location = {Oxford},
  publisher = {Blackwell},
  date = {1952},
  origdate = {1892}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\info{In the \emph{Oxford Guide to Style}, the above example has the string \enquote{trans.\@ and ed.\@} in place of \enquote{ed.\@ and trans.\@};
to use this phrase in all entries, use the regular \pkg{biblatex} command to reset the string:}
\begin{tcblisting}{listing only,left skip=2em}
\DefineBibliographyStrings{english}{byeditortr={trans\adddotspace and ed\adddot}}
\end{tcblisting}

\subsection{Both versions equally accessible}

\tip{Put the key of the original work in \code{related}, and in \code{relatedtype} use the keyword \code{reprintfrom}.}

\begin{bibexbox}
%<n|m><OGS \S15.3>
%<a|y><OGS \S15.3\textdagger>
{owen1986pi}
%<n|m>G. E. L. Owen, \enquote{Philosophical Invective}, in id., \emph{Logic, Science and Dialectic}, ed. M. Nussbaum (Ithaca, NY: Cornell University Press, 1986), 347–64. From \emph{Oxford Studies in Ancient Philosophy}, 1 (1983), 1–25.
%<a|y>Owen, G. E. L. (1986), \enquote{Philosophical Invective}, in id., \emph{Logic, Science and Dialectic}, ed. M. Nussbaum (Ithaca, NY: Cornell University Press), 347–64. From \emph{Oxford Studies in Ancient Philosophy}, 1 (1983): 1–25.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@bookinbook{owen1986pi,
  author = {G. E. L. Owen},
  gender = {sm},
  title = {Philosophical Invective},
  booktitle = {Logic, Science and Dialectic},
  bookauthor = {G. E. L. Owen},
  editor = {M. Nussbaum},
  location = {Ithaca, NY},
  publisher = {Cornell University Press},
  date = {1986},
  pages = {347-364},
  related = {owen1983pi},
  relatedtype = {reprintfrom}}
@article{owen1983pi,
  author = {G. E. L. Owen},
  title = {Philosophical Invective},
  journaltitle = {Oxford Studies in Ancient Philosophy},
  volume = {1},
  date = {1983},
  pages = {1-25}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\section{Articles in yearbooks and works of reference}

Yearbooks may be treated either as collections or periodicals; the distinction boils down to whether you want to print the location and publisher.

The \emph{Oxford Guide to Style} suggests citing entries in dictionaries and encyclopaedias using a postnote like \code{[s.v.\@ `Tawdry']}, but for online works gives a format rather similar to yearbooks, that is, without \enquote{in}.

\tip{To omit the \enquote{in} before the book title, either use the \code{inreference} entry type without specifying an editor, or use the \code{incollection} type with an \code{entrysubtype} of \code{yearbook}.}

\begin{bibexbox}
%<n|m><OGS \S15.3>
%<a|y><OGS \S15.3\textdagger>
{dahlhaus1971mmf}
%<n|m>Carl Dahlhaus, \enquote{Miszellen zur Musiktheorie des 15.\@ Jahrhunderts}, \emph{Jahrbuch des Staatlichen Instituts für Musikforschung Preußischer Kulturbesitz, 1970} (Berlin, 1971), 21–33.
%<a|y>Dahlhaus, C. (1971), \enquote{Miszellen zur Musiktheorie des 15.\@ Jahrhunderts}, \emph{Jahrbuch des Staatlichen Instituts für Musikforschung Preußischer Kulturbesitz, 1970} (Berlin), 21–33.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@inreference{dahlhaus1971mmf,
  author = {Carl Dahlhaus},
  title = {Miszellen zur Musiktheorie des 15.\@ Jahrhunderts},
  booktitle = {Jahrbuch des Staatlichen Instituts für Musikforschung Preußischer Kulturbesitz,
    1970},
  location = {Berlin},
  date = {1971},
  pages = {21-33}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}


\section{Supplementary works in books and collections}

If the work is headed \enquote{Introduction}, \enquote{Foreword}, \enquote{Afterword}, or similar,
this is technically a descriptor rather than a title.

\tip{If the work has a true title, the descriptor goes in the \code{note} field.
  If it doesn't, the descriptor goes in the \code{title} field; annotate the field with the keyword \code{descriptor} to correct the formatting.
  Alternatively, use the (non-standard) \code{descriptor} field for the descriptor in all cases, and \pkg[biblatex]{oxref} will take care of this for you.}

\begin{bibexbox}
%<n|m><NHR \S18.2.6*>
%<a|y><NHR \S18.2.6*\textdagger>
{gill1987intro}
%<n|m>Roma Gill, introduction in \emph{The Complete Works of Christopher Marlow}, i (Oxford, 1987; repr.\@ 2001).
%<a|y>Gill, R. (1987), introduction in \emph{The Complete Works of Christopher Marlow}, i (Oxford; repr.\@ 2001).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@suppbook{gill1987intro,
  author = {Roma Gill},
  title = {introduction},
  title+an = {=descriptor},
  booktitle = {The Complete Works of Christopher Marlow},
  volume = {1},
  origlocation = {Oxford},
  origdate = {1987},
  edition = {reprint},
  date = {2001}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
{atwan2000fw}
(not in book)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@suppcollection{atwan2000fw,
  author = {Robert Atwan},
  title = {foreword},
  title+an = {=descriptor},
  address = {Boston},
  booktitle = {The Best American Essays of the Century},
  date = {2000},
  editor = {Joyce Carol Oates and Robert Atwan},
  publisher = {Houghton},
  pages = {x-xvi}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

It is quite rare for such items to have a true title in addition, so previous
versions of \pkg[biblatex]{oxref} treated all titles of \texttt{suppbook}
entries as descriptors.

\tip{To restore the previous behaviour, include the following code:}

\begin{tcblisting}{listing only}
\DeclareFieldFormat[suppbook]{title}{#1}
\end{tcblisting}

\chapter{Works presented at meetings}\label{sec:proceedings}
\chapterprecis{proceedings, mvproceedings, inproceedings, unpublished}

\section{Single volume proceedings}

The \code{proceedings} entry type is intended for a set of conference papers that have been collected together into a single volume.

%<n|m>\spec{\emph{Title}, \lit{ed.} Editor (Location: Publisher, Year).}
%<a|y>\spec{\emph{Title} (Year), \lit{ed.} Editor (Location: Publisher).}

\begin{bibexbox}
%<n|m><OGS \S15.2.12>
%<a|y><OGS \S15.2.12\textdagger>
{icp1975pic}
%<n|m>\emph{Proceedings of the XIV International Congress of Papyrologists: Oxford, 24–31 July 1974} (London, 1975).
%<a|y>\emph{Proceedings of the XIV International Congress of Papyrologists: Oxford, 24–31 July 1974} (1975) (London).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@proceedings{icp1975pic,
  title = {Proceedings of the {XIV} {International} {Congress} of {Papyrologists}},
  subtitle = {{Oxford}, 24--31 {July} 1974},
  location = {London},
  date = {1975}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\info{The \code{organization} is automatically converted into an \code{author}.}

%<*n>
\begin{egcite}{\dots Imperial College Bookstall, 1922), 1.52–3}
\cite[1.52-3]{iau1922tia}
\end{egcite}
%</n>
%<*m|a>
\begin{egcite}{}
\textcite[1.52-3]{iau1922tia}
\end{egcite}
%</m|a>
%<*y>
\begin{egcite}{}
\parencite[1.52-3]{iau1922tia}
\end{egcite}
%</y>

\begin{bibexbox}
%<n|m><OGS \S15.2.13>
%<a|y><OGS \S15.2.13\textdagger>
{iau1922tia}
%<n|m>International Astronomical Union, \emph{Transactions of the International Astronomical Union, Rome}, 12–20 May 1922 (London: Imperial College Bookstall, 1922).
%<a|y>International Astronomical Union (1922), \emph{Transactions of the International Astronomical Union, Rome}, 12–20 May 1922 (London: Imperial College Bookstall).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@proceedings{iau1922tia,
  organization = {{International Astronomical Union}},
  title = {Transactions of the {International} {Astronomical} {Union}, {Rome}},
  eventdate = {1922-05-12/1922-05-20},
  location = {London},
  publisher = {Imperial College Bookstall},
  date = {1922}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

Sometimes the title of the proceedings does not relate to the conference; in which case the following form might be used:

%<n|m>\spec{\emph{Title}, EventTitle, Venue, ConfDate, \lit{ed.} Editor (Series, Number; Location: Publisher, Year).}
%<a|y>\spec{\emph{Title} (Year), EventTitle, Venue, ConfDate, \lit{ed.} Editor (Series, Number; Location: Publisher).}

\begin{bibexbox}
{ecdl2009}
(not in book)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@proceedings{ecdl2009,
  editor = {Maristella Agosti and José Borbinha and Sarantos Kapidakis and Christos
    Papatheodorou and Giannis Tsakonas},
  title = {Research and Advanced Technology for Digital Libraries},
  eventtitle = {13th European Conference, ECDL 2009},
  venue = {Corfu, Greece},
  eventdate = {2009-09-27/2009-10-02},
  series = {Lecture Notes in Computer Science},
  number = {5714},
  location = {Berlin},
  publisher = {Springer},
  date = {2009}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\section{Multi-volume proceedings}

\textsf{Biblatex} provides \code{mvproceedings} for multi-volume proceedings.
The examples here are a combination of Oxford style for proceedings and multi-volume books.

\subsection{All volumes}

%<n|m>\spec{\emph{Title}, EventTitle, Venue, ConfDate, \lit{ed.} Editor, n \lit{vols.} (Series, Number; Location: Publisher, Year).}
%<a|y>\spec{\emph{Title} (Year), EventTitle, Venue, ConfDate, \lit{ed.} Editor, n \lit{vols.} (Series, Number; Location: Publisher).}

\begin{bibexbox}
{iced2009}
(not in book)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@mvproceedings{iced2009,
  title = {Proceedings of the 17th International Conference on Engineering Design (ICED ’09)},
  volumes = {10},
  editor = {Margareta Norell Bergendahl and Martin Grimheden and Larry Leifer},
  venue = {Stanford, CA},
  eventdate = {2009-08-24/2009-08-27},
  location = {Glasgow},
  publisher = {Design Society},
  date = {2009},
  isbn = {978-1-904670-12-4}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\subsection{One volume}

%<n|m>\spec{\emph{Title}, VolNo: \emph{VolTitle}, EventTitle, Venue, ConfDate, \lit{ed.} Editor (Series, Number; Location: Publisher, Year).}
%<a|y>\spec{\emph{VolTitle} (Year), VolNo \lit{of} \emph{Title}, EventTitle, Venue, ConfDate, \lit{ed.} Editor (Series, Number; Location: Publisher).}

\begin{bibexbox}
{iced2009dik}
(not in book)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@mvproceedings{iced2009dik,
  maintitle = {Proceedings of the 17th International Conference on Engineering Design (ICED ’09)},
  title = {Design Information and Knowledge},
  volume = {8},
  editor = {Margareta Norell Bergendahl and Martin Grimheden and Larry Leifer},
  venue = {Stanford, CA},
  eventdate = {2009-08-24/2009-08-27},
  location = {Glasgow},
  publisher = {Design Society},
  date = {2009},
  isbn = {978-1-904670-12-4}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\section{Published conference paper}

The \code{inproceedings} entry type is intended for a conference paper published as part of a proceedings volume. For papers that have not been collected into a proceedings volume, or presentation slide sets, use the \code{unpublished} entry type instead (see below).

%<n|m>\spec{Author, \enquote{Title}, \lit{in} \emph{BookTitle}, EventTitle, Venue, ConfDate, \lit{ed.} Editor (Series, Number; Location: Publisher, Year).}
%<a|y>\spec{Author (Year), \enquote{Title}, \lit{in} \emph{BookTitle}, EventTitle, Venue, ConfDate, \lit{ed.} Editor (Series, Number; Location: Publisher).}

\begin{bibexbox}
{tonkin.strelnikov2009iem}
(not in book)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@inproceedings{tonkin.strelnikov2009iem,
  author = {Emma Tonkin and Alexey Strelnikov},
  title = {Information Environment Metadata Schema Registry},
  editor = {Maristella Agosti and José Borbinha and Sarantos Kapidakis and Christos Papatheodorou and Giannis Tsakonas},
  booktitle = {Research and Advanced Technology for Digital Libraries},
  eventtitle = {13th European Conference, ECDL 2009},
  venue = {Corfu, Greece},
  eventdate = {2009-09-27/2009-10-02},
  series = {Lecture Notes in Computer Science},
  number = {5714},
  location = {Berlin},
  publisher = {Springer},
  date = {2009},
  pages = {487-488},
  isbn = {978-3-642-04345-1},
  issn = {0302-9743}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

%<n|m>\spec{Author, \enquote{Title}, \lit{in} \emph{BookTitle}, EventTitle, Venue, ConfDate, \lit{ed.} Editor, n \lit{vols.} (Series, Number; Location: Publisher, Year), VolNo. Pages.}
%<a|y>\spec{Author (Year), \enquote{Title}, \lit{in} \emph{BookTitle}, EventTitle, Venue, ConfDate, \lit{ed.} Editor, n \lit{vols.} (Series, Number; Location: Publisher), VolNo. Pages.}

\begin{bibexbox}
{ding.etal2009sfc}
(not in book)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@inproceedings{ding.etal2009sfc,
  author = {Lian Ding and Alex Ball and Manjula Patel and Jason Matthews and Glen Mullineux},
  title = {Strategies for the Collaborative Use of CAD Product Models},
  maintitle = {Proceedings of the 17th International Conference on Engineering Design (ICED ’09)},
  booktitle = {Design Information and Knowledge},
  volume = {8},
  editor = {Margareta Norell Bergendahl and Martin Grimheden and Larry Leifer},
  venue = {Stanford, CA},
  eventdate = {2009-08-24/2009-08-27},
  location = {Glasgow},
  publisher = {Design Society},
  date = {2009},
  pages = {123-134},
  isbn = {978-1-904670-12-4},
  url = {http://opus.bath.ac.uk/14285}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\section{Published orations, addresses, lectures, and speeches}

%<n|m>\spec{Author, \emph{Title}, Type, Venue, Date (Location: Publisher, Year).}
%<a|y>\spec{Author (Year), \emph{Title}, Type, Venue, Date (Location: Publisher).}

\begin{bibexbox}
%<n|m><OGS \S15.6>
%<a|y><OGS \S15.6\textdagger>
{gombrich1957as}
%<n|m>E. H. Gombrich, \emph{Art and Scholarship}, Inaugural Lecture, University College London, 14 Feb. 1957 (London: H. K. Lewis, 1957).
%<a|y>Gombrich, E. H. (1957), \emph{Art and Scholarship}, Inaugural Lecture, University College London, 14 Feb. 1957 (London: H. K. Lewis).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@proceedings{gombrich1957as,
  author = {E. H. Gombrich},
  title = {Art and Scholarship},
  eventtitle = {Inaugural Lecture},
  venue = {University College London},
  eventdate = {1957-02-14},
  location = {London},
  publisher = {H. K. Lewis},
  date = {1957}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\tip{Use the \texttt{eventtitle} field to indicate the type of the oration.}

\section{Unpublished conference paper}

%<n|m>\spec{Author, \enquote{Title}, \lit{paper given at the} ConfTitle, Venue, EventDate.}
%<a|y>\spec{Author (Year), \enquote{Title}, \lit{paper given at the} ConfTitle, Venue, EventDate.}

%</n|m|a|y>
%<*n|m>
\begin{bibexbox}<OGS \S15.6>
{holfordstrevens1999hlm}
Leofranc Holford-Strevens, \enquote{Humanism and the Language of Music Theory Treatises}, paper given at the 65th Annual Meeting of the American Musicological Society, Kansas City, MO, 4–7 Nov. 1999.
\tcblower
\begin{Verbatim}
%</n|m>
%<*n|m|bib>
@unpublished{holfordstrevens1999hlm,
  author = {Leofranc Holford-Strevens},
  title = {Humanism and the Language of Music Theory Treatises},
  howpublished = {paper given at the 65th Annual Meeting of the American Musicological Society},
  location = {Kansas City, MO},
  date = {1999-11-04/1999-11-07}}
%</n|m|bib>
%<*n|m>
\end{Verbatim}
\end{bibexbox}

%</n|m>
%<*a|y>
\begin{bibexbox}<OGS \S15.19.2>
{mason.etal1984nns}
Mason, J. B., Habicht, J. P., and Tabatabai, H. (1984), \enquote{Notes on Nutritional Surveillance}, paper delivered to the WHO conference.
\tcblower
\begin{Verbatim}
%</a|y>
%<*a|y|bib>
@unpublished{mason.etal1984nns,
  author = {J. B. Mason, and J. P. Habicht and H. Tabatabai},
  date = {1984},
  title = {Notes on Nutritional Surveillance},
  howpublished = {paper delivered to the WHO conference}}
%</a|y|bib>
%<*a|y>
\end{Verbatim}
\end{bibexbox}

%</a|y>
%<*n|m|a|y>

\section{Unpublished orations, addresses, lectures, and speeches}

%<n|m>\spec{Author, \enquote{Title}, Description.}
%<a|y>\spec{Author (Year), \enquote{Title}, Description.}

%</n|m|a|y>
%<*a|y>
\begin{bibexbox}<OGS \S15.19.2>
{pritchard.pritchard1990ard}
Pritchard, E., and Pritchard, J. (1990), \enquote{A Reply to Drèze}, unpub.\@ paper.
\tcblower
\begin{Verbatim}
%</a|y>
%<*a|y|bib>
@unpublished{pritchard.pritchard1990ard,
  author = {E. Pritchard and J. Pritchard},
  date = {1990},
  title = {A Reply to Drèze},
  howpublished = {unpub.\@ paper}}
%</a|y|bib>
%<*a|y>
\end{Verbatim}
\end{bibexbox}

%</a|y>
%<*n|m|a|y>


\chapter{Grey literature}\label{sec:report}
\chapterprecis{booklet, manual, patent, report, thesis, standard}

\section{One-off reports}

%<n|m>\spec{Author, \emph{Title} (Location: Institution, Year).}
%<a|y>\spec{Author (Year), \emph{Title} (Location: Institution).}

\begin{bibexbox}
%<n|m><OGS \S15.2.13>
%<a|y><OGS \S15.2.13\textdagger>
{botswana1980hdr}
%<n|m>Government of Botswana, \emph{A Human Drought Relief Programme for Botswana} (Gabarone: Ministry of Local Government and Lands, 1980).
%<a|y>Government of Botswana (1980), \emph{A Human Drought Relief Programme for Botswana} (Gabarone: Ministry of Local Government and Lands).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@report{botswana1980hdr,
  author = {{Government of Botswana}},
  title = {A Human Drought Relief Programme for Botswana},
  location = {Gabarone},
  institution = {Ministry of Local Government and Lands},
  date = {1980}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\tip{If the report does not specify an author, give the publishing institution in the \texttt{author} field.
  Some examples in the \emph{Oxford Guide to Style} repeat the institution in the publisher slot
  (i.e.\@ the \texttt{institution} field) and some do not.}

%</n|m|a|y>
%<*n|m>
\begin{bibexbox}<OGS \S15.2.13>
{pac1988upt}
Penal Affairs Consortium, \emph{An Unsuitable Place for Treatment: Diverting Mentally Disordered Offenders from Custody} (London, 1988).
\tcblower
\begin{Verbatim}
%</n|m>
%<*n|m|bib>
@report{pac1988upt,
  author = {{Penal Affairs Consortium}},
  title = {An Unsuitable Place for Treatment},
  subtitle = {Diverting Mentally Disordered Offenders from Custody},
  location = {London},
  date = {1988}}
%</n|m|bib>
%<*n|m>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}<NHR \S18.8.5>
{unesco2012unw}
UNESCO, \emph{The United Nations World Water Development Report 4}, vol. 1: \emph{Managing Water under Uncertainty and Risk} (Paris: UNESCO, 2012), \url{http://unesdoc.unesco.org/images/0021/002156/215644e.pdf}, accessed 9 Nov. 2013.
\tcblower
\begin{Verbatim}
%</n|m>
%<*n|m|bib>
@report{unesco2012unw,
  author = {UNESCO},
  maintitle = {The United Nations World Water Development Report 4},
  volume = {1},
  title = {Managing Water under Uncertainty and Risk},
  location = {Paris},
  institution = {UNESCO},
  date = {2012},
  url = {http://unesdoc.unesco.org/images/0021/002156/215644e.pdf},
  urldate = {2013-11-09}}
%</n|m|bib>
%<*n|m>
\end{Verbatim}
\end{bibexbox}

%</n|m>
%<*a|y>
\begin{bibexbox}<OGS \S15.9.1>
{who1986nde}
WHO (World Health Organization) (1986), \emph{Nutrition and Development in East Africa} (Geneva: WHO)
\tcblower
\begin{Verbatim}
%</a|y>
%<*a|y|bib>
@report{who1986nde,
  author = {{World Health Organization}},
  shortauthor = {WHO},
  title = {Nutrition and Development in {East Africa}},
  date = {1986},
  location = {Geneva},
  institution = {WHO}}
%</a|y|bib>
%<*a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}<NHR \S17.3.2*>
{cnnr2008tut}
CNNR/GMH (Comisión Nacional de Reparación y Reconciliación y Grupo de Memoria Historica) (2008), \emph{Trujilla: Una Tragedia que no Cesa} [\emph{Trujilla: A Tragedy Without End}] (Bogotá, Columbia: CNRR).
\tcblower
\begin{Verbatim}
%</a|y>
%<*a|y|bib>
@report{cnnr2008tut,
  shortauthor = {CNNR/GMH},
  author = {{Comisión Nacional de Reparación y Reconciliación y Grupo de Memoria Historica}},
  date = {2008},
  title = {Trujilla},
  subtitle = {Una Tragedia que no Cesa},
  titleaddon = {\printtext[title]{{Trujilla:} {A} Tragedy Without End}},
  location = {Bogotá, Columbia},
  institution = {CNRR}}
%</a|y|bib>
%<*a|y>
\end{Verbatim}
\end{bibexbox}

%</a|y>
%<*n|m|a|y>

\section{Reports with a type or series}

\tip{The number of a report will only be printed if you also supply a type or
  series, or both. The difference between the two is that the series will be
  separated from the (type and) number by a comma, while only a space
  separates the type and number. In addition, if you supply a series but no
  type, the number will be prefixed by `No.\@' or the localized equivalent.}

%<n|m>\spec{Author, \emph{Title}, Series, Type Number (Location: Institution, Year).}
%<a|y>\spec{Author (Year), \emph{Title}, Series, Type Number (Location: Institution).}

%</n|m|a|y>
%<*a|y>
\begin{bibexbox}<OGS \S15.19.2>
{opcs1979amt}
%<a>Office of Population Censuses and Surveys (1979),
%<y>Office of Population Censuses and Surveys (1979\emph{a}),
\emph{Area Mortality Tables: The Registrar-General's Decennial Supplement for England and Wales 1969–1973}, Series DS, No.~3 (London)
\tcblower
\begin{Verbatim}
%</a|y>
%<*a|y|bib>
@report{opcs1979amt,
  author = {{Office of Population Censuses and Surveys}},
  date = {1979},
  title = {Area Mortality Tables},
  subtitle = {The Registrar-General's Decennial Supplement for England and Wales 1969–1973},
  series = {Series DS},
  number = {3},
  location = {London}}
%</a|y|bib>
%<*a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}<OGS \S15.19.2>
{opcs1979pnc}
%<a>Office of Population Censuses and Surveys (1979),
%<y>Office of Population Censuses and Surveys (1979\emph{b}),
\emph{Projections of the New Commonwealth and Pakistani Population}, OPCS Monitor PP2 79/1 (London)
\tcblower
\begin{Verbatim}
%</a|y>
%<*a|y|bib>
@report{opcs1979pnc,
  author = {{Office of Population Censuses and Surveys}},
  date = {1979},
  title = {Projections of the {New Commonwealth} and {Pakistani} Population},
  type = {OPCS Monitor},
  number = {PP2 79/1},
  location = {London}}
%</a|y|bib>
%<*a|y>
\end{Verbatim}
\end{bibexbox}

\tip{If the name of the series consists of the institution name and a type, it may make more sense to give the institution name in \code{series} rather than \code{institution}.}

\begin{bibexbox}(hacked)<NHR \S17.3.2*>
{rosenblatt.etal1988cap}
Rosenblatt, J., et al. (1988), \emph{The Common Agricultural Policy of the European Community}, International Monetary Fund, occasional paper 62 (Nov.)
\tcblower
\begin{Verbatim}
%</a|y>
%<*a|y|bib>
@report{rosenblatt.etal1988cap,
  author = {Julius Rosenblatt and others},
  title = {The {Common Agricultural Policy} of the {European Community}},
  date = {1988-11},
  series = {International Monetary Fund},
  type = {occasional paper},
  number = {62}}
%</a|y|bib>
%<*a|y>
\end{Verbatim}
\end{bibexbox}

%</a|y>
%<*n|m|a|y>%

\section{Jointly published reports}

It is more common with reports than with books for a work to be branded
jointly by several issuing organizations. Neither the \emph{Oxford Guide to
Style} nor \emph{New Hart's Rules} give explicit guidance on this, but I
suggest handling it by giving corresponding lists as the \code{location}
and \code{institution}:

\begin{tcblisting}{listing only}
  location = {Place 1 and Place 2 and Place 3},
  institution = {Organization 1 and Organization 2 and Organization 3},
\end{tcblisting}

This will be printed as follows:

\begin{tcolorbox}
(Place 1: Organization 1, Place 2: Organization 2, and Place 3: Organization 3)
\end{tcolorbox}

\section{Theses}

%<n|m>\spec{Author, \enquote{Title}, Type (Institution, Year).}
%<a|y>\spec{Author (Year), \enquote{Title}, Type (Institution).}

\begin{bibexbox}
%<n|m><OGS \S15.5.1>
%<a|y><OGS \S15.5.1\textdagger>
{blackburn1970tlp}
%<n|m>Bonnie J. Blackburn, \enquote{The Lupus Problem}, Ph.D. diss. (University of Chicago, 1970).
%<a|y>Blackburn, B. J. (1970), \enquote{The Lupus Problem}, Ph.D. diss. (University of Chicago).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@thesis{blackburn1970tlp,
  author = {Bonnie J. Blackburn},
  title = {The Lupus Problem},
  type = {Ph.D. diss.},
  institution = {University of Chicago},
  date = {1970}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

The following forms are also supported; to use them, pass the \key{thesis} option:

\begin{itemize}
  \item \key{thesis}\texttt{=}\val{in}\par
%<n|m>\spec{Author, \enquote{Title} (Type, Institution, Year).}
%<a|y>\spec{Author (Year), \enquote{Title} (Type, Institution).}
  \item \key{thesis}\texttt{=}\val{plain}\par
%<n|m>\spec{Author, \enquote{Title}, Type, Institution, Year.}
%<a|y>\spec{Author (Year), \enquote{Title}, Type, Institution.}
\end{itemize}

\section{Booklets, leaflets, and other formal but unpublished texts}

There are no obvious examples of this kind of material in the \emph{Oxford Guide
to Style} or \emph{New Hart's Rules}. I welcome suggestions for how to make the
generated references more Oxford-like.

\begin{bibexbox}
{msbh1921fvd}
(not in book)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@booklet{msbh1921fvd,
  title = {The Facts about Venereal Diseases},
  date = {1921},
  howpublished = {distributed by the Missouri State Board of Health, Division of Venereal Diseases},
  location = {Jefferson City, MO}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
{lloyds2015m}
(not in book)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@booklet{lloyds2015m,
  author = {{Lloyds TSB Bank plc}},
  title = {Mortgages},
  date = {2015},
  howpublished = {obtained in Paisley branch}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\section{Patents}

There are no examples of patents in the \emph{Oxford Guide to Style} or
\emph{New Hart's Rules}. I welcome suggestions for how to make the
generated references more Oxford-like.

Following the conventions from \pkg{biblatex-chicago}, use \texttt{origdate} for
the date the patent was filed (or the application was published), and
\texttt{date} for the date the patent was finally issued or published.

\tip{You can override the default date descriptions with the (non-standard)
\code{origdatetype} and \code{datetype} fields.}

\begin{bibexbox}
{petroff.stapelbroek1980bib}
(not in book)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@patent{petroff.stapelbroek1980bib,
  author = {Petroff, M.~D. and Stapelbroek, M.~G.},
  title = {Blocked impurity band detectors},
  date = {1986-02-04},
  origdate = {1980-10-23},
  type = {patentus},
  number = {4,586,960},
  location = {Washington, DC},
  publisher = {U.S. Patent and Trademark Office}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
{arduengo.etal2001pmi}
(not in book)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@patent{arduengo.etal2001pmi,
  author = {Arduengo, III, Anthony J. and Gentry, Jr., Frederick P.
    and Taverkere,  Prakash~K. and Simmons, III, Howard E.},
  title = {Process for manufacture of imidazoles},
  year = {2001},
  type = {patentus},
  holder = {{E.~I. DuPont}},
  number = {6177575}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
{pm1981opa}
(not in book)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@patent{pm1981opa,
  author = {{Phillipp Morris Inc.}},
  title = {Optical perforating apparatus and system},
  origdate = {1981-01-07},
  date = {1985-05-15},
  type = {patenteu},
  number = {EP0021165}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
{hideki1992qmc}
(not in book)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@patent{hideki1992qmc,
  author = {U. Hideki},
  title = {Quadrature Modulation Circuit},
  type = {patentjp},
  number = {152932/92},
  date = {1992-05-20}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\section{Standards}

There are no examples of technical standards in the \emph{Oxford Guide
to Style} or \emph{New Hart's Rules}. I welcome suggestions for how to make the
generated references more Oxford-like.

The particular quirk with standards entries is that the number is promoted to
the head of the reference if an author is not specified (or \key{useauthor} is
\val{false}). If this happens, the number is copied to \code{sortkey} so the
entry appears in the right place in the reference list, unless you get there
first with your own value of \code{sortkey}. You may want to do this if, for
example, you want \enquote{ISO 1000} to come after \enquote{ISO 999}.

\tip{You are encouraged to put the standards body in \code{organization}, but
  you can use \code{publisher} instead.}

\tip{The examples don't demonstrate it, but you can use the \code{version} field
  for the version of the standard.}

\begin{bibexbox}
{bs5605:1990}
(not in book)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@standard{bs5605:1990,
  sortyear = {1990},
  title = {Recommendations for citing and referencing published material},
  number = {BS~5605:1990},
%<!n&!m&!y>  shorthand = {BS5605},
  organization = {British Standards Institute}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

%<*y>
\begin{egcite}{}
\cite{bs5605:1990}
\end{egcite}
%</y>

\begin{bibexbox}
{w3c2017html5.2}
(not in book)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@standard{w3c2017html5.2,
  title = {{HTML} 5.2},
  editor = {Steve Faulkner and Arron Eicholz and Travis Leithead and
    Alex Danilo and Sangwhan Moon},
  date = {2017-12-14},
  type = {W3C Recommendation},
  organization = {World Wide Web Consortium},
  url = {https://www.w3.org/TR/html52/},
  urldate = {2018-02-17}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
{ietf.rfc1155}
(not in book)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@standard{ietf.rfc1155,
  author = {M. T. Rose and K. McCloghrie},
  title = {Structure and identification of management information for {TCP/IP}-based internets},
  date = {1990-05},
  organization = {Internet Engineering Task Force},
  series = {Request for Comments},
  type = {Internet Standard},
  number = {RFC~1155/STD~16},
  doi = {10.17487/RFC1155}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}


\chapter{Audiovisual materials}\label{sec:audiovideo}
\chapterprecis{artwork, audio, inaudio, image, movie, music, inmusic, performance, video}

There are typically many contributors to an audiovisual work, and the priority given to each role is fluid. \pkg[biblatex]{Oxref} uses \code{author} for contributors that should go at the head of the reference, and \code{editor} for others. As well as the normal ones you can use the author\slash editor types \code{performer}, \code{conductor}, \code{director} and \code{reader}.

\section{Audio recordings}

The basic structure of audio recording entries is as follows:

%<n|m>\spec{Composer, \emph{Title}, Artist, RecordingDate (RecordingCompany Type Number, PublicationDate) [Medium].}
%<a|y>\spec{Composer (RecordingYear), \emph{Title}, Artist, RecordingDate (RecordingCompany Type Number, PublicationDate) [Medium].}

If the composer's name is not of interest, it may be omitted or replaced by the artist's name.
%<y>In the absence of examples to the contrary, \textsf{oxyear} uses the year of recording at the head of the reference if available, otherwise it uses the year of publication.

\tip{Use \code{origdate} to specify the date of recording. If you want it to be introduced by something other than the localized string \enquote{recorded}, use the (non-standard) \code{origdatetype} field%
%<y>, though this will be suppressed if only the year is given%
.}

The \emph{Oxford Guide to Style} offers several ways of expressing the recording company:

\begin{itemize}
\item
  a simple label name – e.g.\@ \enquote{Columbia}, \enquote{Hyperion}, \enquote{Archiv} – followed immediately by the type or number
\item
  a label name separated from the number by a comma, e.g.\@ \enquote{Valois,}
  \enquote{EMI Electrola,} \enquote{EMI Blues Series,}
\item
  a compiling organization, semicolon, publishing company, no comma, e.g.\@ \enquote{Smithsonian Institution; Columbia}
\item
  a publishing company, colon, label name, comma, e.g.\@ \enquote{Decca Record Company, Ltd.: Éditions de l'Oiseau-lyre,}
\item
  a publishing company, comma, location, comma, e.g.\@ \enquote{Christophorus-Verlag Herder, Freiburg im Breisgau,}
\end{itemize}

\emph{New Hart's Rules} sticks firmly with the first of these, so \pkg[biblatex]{oxref} makes this the easiest choice but provides workarounds to allow you to achieve most of the others if you really need to.

\tip{To get the normal format, put the label name in \code{publisher}, the type of release (e.g.\@ compact disc, audio cassette) in \code{type}, and the catalogue number in \code{number}. In the examples from \emph{New Hart's Rules}, the type is uniformly omitted.}

\tip{To put a comma between the label and the type\slash number, put the label name in \code{series} instead.}

\tip{If you provide both a \code{publisher} and a \code{series}, they will be separated by \cs{recordseriespunct}, which is initially set to \cs{addcomma}\cs{space}. You could set it to \cs{addcolon}\cs{space} instead to match the example.}

\tip{If the compiling organization is distinct from the publisher, put the former in \code{origpublisher}; it will be separated from the publisher by a semicolon.}

\tip{Contrary to the OGS example, but in common with other entry types, the location if provided will be printed before the publisher, separated from it by a colon. (This is why a comma is the default for \cs{recordseriespunct}.) In the absence of a publisher it will be followed by a comma.}

\begin{bibexbox}
%<n|m><NHR \S18.7.2*>
%<a|y><NHR \S18.7.2*\textdagger>
{carter1991fsq}
%<n|m>Elliott Carter, \emph{The Four String Quartets}, Juilliard String Quartet (Sony S2K 47229, 1991).
%<a|y>Carter, E. (1991), \emph{The Four String Quartets}, Juilliard String Quartet (Sony S2K 47229).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@music{carter1991fsq,
  author = {Elliott Carter},
  title = {The Four String Quartets},
  editor = {{Juilliard String Quartet}},
  editortype = {performer},
  publisher = {Sony},
  number = {S2K 47229},
  date = {1991}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
%<n|m><OGS \S15.14.1>
%<a|y><OGS \S15.14.1\textdagger>
{hillier1989p}
%<n|m>Paul Hillier, \emph{Proensa} (ECM Records compact disc ECM 1368, 1989).
%<a|y>Hillier, P. (1989), \emph{Proensa} (ECM Records compact disc ECM 1368).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@music{hillier1989p,
  author = {Paul Hillier},
  title = {Proensa},
  publisher = {ECM Records},
  type = {compact disc},
  number = {ECM 1368},
  date = {1989}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
%<n|m><OGS \S15.14.1>
%<a|y><OGS \S15.14.1\textdagger>
{couperin1970pdc}
%<n|m>Francois Couperin, \emph{Pièces de clavecin: Huit préludes de L'Art de toucher le clavecin. Livre I. Troisième et quatrième ordres}, Huguette Dreyfus (Valois, MB 797, 1970).
%<a|y>Couperin, F. (1970), \emph{Pièces de clavecin: Huit préludes de L'Art de toucher le clavecin. Livre I. Troisième et quatrième ordres}, H. Dreyfus (Valois, MB 797).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@music{couperin1970pdc,
  author = {Francois Couperin},
  title = {Pièces de clavecin},
  subtitle = {Huit préludes de L'Art de toucher le clavecin. Livre I. Troisième et quatrième
    ordres},
  editor = {Huguette Dreyfus},
  editortype = {performer},
  series = {Valois},
  number = {MB 797},
  date = {1970}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
%<n|m><OGS \S15.14.1>
%<a|y><OGS \S15.14.1\textdagger>
{pageNDmn}
%<n|m>\emph{The Mirror of Narcissus: Songs by Guillaume de Machaut}, Gothic Voices, dir. Christopher Page (Hyperion compact disc CDA 66087).
%<a|y>\emph{The Mirror of Narcissus: Songs by Guillaume de Machaut} (n.d.), Gothic Voices, dir. C. Page (Hyperion compact disc CDA 66087).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@music{pageNDmn,
  title = {The Mirror of Narcissus},
  subtitle = {Songs by Guillaume de Machaut},
  editor = {{Gothic Voices}},
  editortype = {performer},
  editora = {Christopher Page},
  editoratype = {director},
  publisher = {Hyperion},
  type = {compact disc},
  number = {CDA 66087}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\tip{To describe the medium in a separate note, use the \texttt{howpublished} field.}

\begin{bibexbox}
%<n|m><NHR \S18.7.2>
%<a|y><NHR \S18.7.2\textdagger>
{hopkinsNDcar}
%<n|m>Lightnin' Hopkins, \emph{The Complete Aladdin Recordings} (EMI Blues Series, CDP-7-96843-2) [2-vol.\@ CD set].
%<a|y>Lightnin' Hopkins (n.d.), \emph{The Complete Aladdin Recordings} (EMI Blues Series, CDP-7-96843-2) [2-vol.\@ CD set].
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@music{hopkinsNDcar,
  author = {{Lightnin’ Hopkins}},
  title = {The Complete Aladdin Recordings},
  series = {EMI Blues Series},
  number = {CDP-7-96843-2},
  howpublished = {2-vol.\@ CD set}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\tip{To describe the medium as part of the publication statement, use the \texttt{type} field.}

\begin{bibexbox}
%<n|m><OGS \S15.14.1>
%<a|y><OGS \S15.14.1\textdagger>
{lewis1981lww}
%<n|m>C. S. Lewis, \emph{The Lion, the Witch, and the Wardrobe}, read by Sir Michael Hordern (2 audio cassettes, TO1611, 1981).
%<a|y>Lewis, C. S. (1981), \emph{The Lion, the Witch, and the Wardrobe}, read by Sir M. Hordern (2 audio cassettes, TO1611).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@audio{lewis1981lww,
  author = {C. S. Lewis},
  title = {The Lion, the Witch, and the Wardrobe},
  editor = {title=Sir, given=Michael, family=Hordern},
  editortype = {reader},
  type = {2 audio cassettes},
  number = {TO1611},
  date = {1981}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\subsection{Combination releases}

Sometimes publishers will put several works on a single release without giving it an overall title.

\tip{Put the subsequent composer\slash title combinations in new entries, and relate them with a \code{relatedtype} of \code{includes}.}

\begin{bibexbox}
%<n|m><NHR \S18.7.2*>
%<a|y><NHR \S18.7.2*\textdagger>
{dutilleux1987as}
%<n|m>Henri Dutilleux, \emph{L'Arbre des songes}, and Peter Maxwell Davies, \emph{Concerto for Violin and Orchestra}, Royal Philharmonic Orchestra, cond. André Previn, violin Isaac Stern (CBS MK 42449, 1987).
%<a|y>Dutilleux, H. (1987), \emph{L'Arbre des songes}, and Maxwell Davies, P., \emph{Concerto for Violin and Orchestra}, Royal Philharmonic Orchestra, cond. A. Previn, violin I. Stern (CBS MK 42449).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@audio{dutilleux1987as,
  author = {Henri Dutilleux},
  title = {L'Arbre des songes},
  related = {maxwelldavies1987},
  relatedtype = {includes},
  editor = {{Royal Philharmonic Orchestra}},
  editortype = {performer},
  editora = {André Previn},
  editoratype = {conductor},
  editorb = {Isaac Stern},
  editorbtype = {violin},
  publisher = {CBS},
  number = {MK 42449},
  date = {1987}}
@audio{maxwelldavies1987,
  author = {Maxwell Davies, Peter},
  title = {Concerto for Violin and Orchestra},
  date = {1987}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\hack{Only the primary work will show up in citations; the subsequent ones will not.
  If this is not what you want, you will need to use \code{shortauthor}\slash\code{shorttitle} or \code{shorthand}, or build up the citation manually with \cs{citeauthor} and the like.}

\info{Depending on the thrust of your document, you could remove the complication by shifting the composers into the title and putting the performers in the author position.}

\info{If you are only interested in one of the works in the release, you might be better off using the \code{inaudio} entry type instead (see below).}


\subsection{Tracks from an album}

\tip{Use the non-standard entry types \code{inaudio} or \code{inmusic} to reference a single work within an album. Use \code{booktitle} (somewhat loosely) for the album title.}

\begin{bibexbox}
%<n|m><NHR \S18.7.2*>
%<a|y><NHR \S18.7.2*\textdagger>
{davis1997sw}
%<n|m>Miles Davis et al., \enquote{So What}, in \emph{Kind of Blue}, rec. 1959 (Columbia CK 64935, 1997) [CD].
%<a|y>Davis, M., et al. (1959), \enquote{So What}, in \emph{Kind of Blue} (Columbia CK 64935, 1997) [CD].
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@inaudio{davis1997sw,
  author = {Miles Davis and others},
  title = {So What},
  booktitle = {Kind of Blue},
  origdate = {1959},
  origdatetype = {rec\adddot},
  publisher = {Columbia},
  number = {CK 64935},
  date = {1997},
  howpublished = {CD}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\info{Note the use of \code{origdate} for the date of recording in this example.}


\section{Video recordings}

%<n|m>\spec{\emph{Title} (Publisher, Number, Year).}
%<a|y>\spec{\emph{Title} (Year) (Publisher, Number).}

\begin{bibexbox}
%<n|m><OGS \S15.14.2>
%<a|y><OGS \S15.14.2\textdagger>
{bbc1987ava}
%<n|m>\emph{The Ashes: Victory in Australia} (BBCV 4040, 1987).
%<a|y>\emph{The Ashes: Victory in Australia} (1987) (BBCV 4040).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@video{bbc1987ava,
  title = {The {Ashes}},
  subtitle = {Victory in {Australia}},
  publisher = {BBCV},
  number = {4040},
  date = {1987}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

%<n|m>\spec{\enquote{EpisodeTitle}, \emph{SeriesTitle} \lit{series} (Publisher, Number, Year).}
%<a|y>\spec{\enquote{EpisodeTitle} (Year), \emph{SeriesTitle} \lit{series} (Publisher, Number).}

\tip{For an episode in a series, set the \code{entrysubtype} to \code{episode} and put the series name in \code{maintitle}.}

\begin{bibexbox}
%<n|m><OGS \S15.14.2>
%<a|y><OGS \S15.14.2\textdagger>
{britt1986pho}
%<n|m>\enquote{Percy and Harold and Other Stories}, \emph{Thomas the Tank Engine and Friends \textup{series}} (Britt Allcroft 5-014861-100224, 1986).
%<a|y>\enquote{Percy and Harold and Other Stories} (1986), \emph{Thomas the Tank Engine and Friends \textup{series}} (Britt Allcroft 5-014861-100224).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@video{britt1986pho,
  entrysubtype = {episode},
  title = {{Percy} and {Harold} and Other Stories},
  maintitle = {Thomas the Tank Engine and Friends \textup{series}},
  publisher = {Britt Allcroft},
  number = {5-014861-100224},
  date = {1986}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

%<n|m>\spec{Director (\lit{dir.}), \emph{Title} (Publisher, Number, Year).}
%<a|y>\spec{Director (Year) (\lit{dir.}), \emph{Title} (Publisher, Number).}

\tip{Use the \texttt{author} field to place a credit at the head of the reference.}

\begin{bibexbox}
%<n|m><OGS \S15.14.2>
%<a|y><OGS \S15.14.2\textdagger>
{chaplin1936mt}
%<n|m>Charles Chaplin (dir.), \emph{Modern Times} (United Artists, 1936).
%<a|y>Chaplin, C. (1936) (dir.), \emph{Modern Times} (United Artists).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@movie{chaplin1936mt,
  author = {Charles Chaplin},
  authortype = {director},
  title = {Modern Times},
  publisher = {United Artists},
  date = {1936}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

%<n|m>\spec{\emph{Title}, \lit{dir.} Director (Publisher, Number, Year).}
%<a|y>\spec{\emph{Title} (Year), \lit{dir.} Director (Publisher, Number).}

\tip{Use the \texttt{editor} field to place a credit after the title.}

\begin{bibexbox}
%<n|m><OGS \S15.14.2>
%<a|y><OGS \S15.14.2\textdagger>
{reiner1983tst}
%<n|m>\emph{This is Spinal Tap: A Rockumentary by Marti Di Bergi}, dir.\@ Rob Reiner (Embassy Pictures, 1983).
%<a|y>\emph{This is Spinal Tap: A Rockumentary by Marti Di Bergi} (1983), dir.\@ R. Reiner (Embassy Pictures).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@movie{reiner1983tst,
  title = {This is {Spinal} {Tap}},
  subtitle = {A Rockumentary by {Marti} {Di} {Bergi}},
  editor = {Rob Reiner},
  editortype = {director},
  publisher = {Embassy Pictures},
  date = {1983}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

%<n|m>\spec{\emph{Title} (Publisher, Number, Year), Credit.}
%<a|y>\spec{\emph{Title} (Year) (Publisher, Number), Credit.}

\tip{You can place up to four credits in the editor position, more if any of them correspond to the built-in editor types like \texttt{commentator} or \texttt{translator}.
  If you do supply a lot of credits, the \emph{Oxford Guide to Style} recommends you shift them to the end of the reference.
  You can do this with the \key{endeditor} option.}


\begin{bibexbox}
%<n|m><OGS \S15.14.2*>
%<a|y><OGS \S15.14.2*\textdagger>
{kaurismaki1989lcg}
%<n|m>\emph{Leningrad Cowboys Go America} (Villealfa Filmproductions, 1989), dir.\@ and screenplay by Aki Kaurismäki, story by Sakke Järvenpää, Aki Kaurismäki, and Mato Valtonen.
%<a|y>\emph{Leningrad Cowboys Go America} (1989) (Villealfa Filmproductions), dir.\@ and screenplay by A. Kaurismäki, story by S. Järvenpää, A. Kaurismäki, and M. Valtonen.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@movie{kaurismaki1989lcg,
  title = {Leningrad Cowboys Go America},
  publisher = {Villealfa Filmproductions},
  date = {1989},
  editortype = {dir.\@ and screenplay by},
  editor = {Aki Kaurismäki},
  editoratype = {story by},
  editora = {Sakke Järvenpää and Aki Kaurismäki and Mato Valtonen},
  options = {endeditor}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\tip{For an online video, set the \code{entrysubtype} to \code{clip}.}

\begin{bibexbox}
%<n|m><NHR \S18.8.5>
%<a|y><NHR \S18.8.5\textdagger>
{bbc2013iim}
%<n|m>BBC News, \enquote{Inside India's Mars Mission HQ} [video] (5 Nov. 2013), \url{http://www.bbc.co.uk/news/world-24826253}, accessed 5 Nov. 2013.
%<a|y>BBC News (2013), \enquote{Inside India's Mars Mission HQ} [video] (5 Nov.), \url{http://www.bbc.co.uk/news/world-24826253}, accessed 5 Nov. 2013.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@video{bbc2013iim,
  entrysubtype = {clip},
  author = {{BBC News}},
  title = {Inside India's Mars Mission HQ},
  date = {2013-11-05},
  url = {http://www.bbc.co.uk/news/world-24826253},
  urldate = {2013-11-05}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
%<n|m><NHR \S18.8.5>
%<a|y><NHR \S18.8.5\textdagger>
{rubinstein1956rpc}
%<n|m>Arthur Rubinstein, \enquote{Rachmaninoff Piano Concerto No. 2, Op. 18, I Moderato, Allegro (Fritz Reiner)} [video], YouTube (recorded 9 Jan. 1956, uploaded 8 Nov. 2011), \url{http://www.youtube.com/watch?v=0Vv0Sy9FJrc&list=PLDB11C4F39E09047F}, accessed 9 Nov. 2013.
%<a|y>Rubinstein, A. (1956), \enquote{Rachmaninoff Piano Concerto No. 2, Op. 18, I Moderato, Allegro (Fritz Reiner)} [video], YouTube (recorded 9 Jan., uploaded 8 Nov. 2011), \url{http://www.youtube.com/watch?v=0Vv0Sy9FJrc&list=PLDB11C4F39E09047F}, accessed 9 Nov. 2013.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@video{rubinstein1956rpc,
  entrysubtype = {clip},
  author = {Arthur Rubinstein},
  title = {Rachmaninoff Piano Concerto No. 2, Op. 18, I Moderato, Allegro (Fritz Reiner)},
  organization = {YouTube},
  origdate = {1956-01-09},
  date = {2011-11-08},
  datetype = {uploaded},
  url = {http://www.youtube.com/watch?v=0Vv0Sy9FJrc&list=PLDB11C4F39E09047F},
  urldate = {2013-11-09}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\tip{Use \texttt{origdate} and, if necessary, the (non-standard) \texttt{origdatetype} field to specify the date of recording or original broadcast. Use the (non-standard) \texttt{datetype} field to clarify the event represented by the publication date.}

\section{Broadcasts}\label{sec:broadcasts}

The \emph{Oxford Guide to Style} prints all information about the transmission, including the date, bare. \emph{New Hart's Rules} tends to put the transmittion date in parentheses, perhaps because (\emph{a}) broadcast is a type of publication, (\emph{b}) episodes in some very long-running series are identified by date alone, and (\emph{c}) it may be important to know which broadcast is referenced since the edits might be different. \pkg[biblatex]{Oxref} sides with the latter.

%<n|m>\spec{\emph{Title}, Channel (Location, Date, Time).}
%<a|y>\spec{\emph{Title} (Year), Channel (Location, Day Month, Time).}

\tip{Put the channel in the \code{organization} field.}

\begin{bibexbox}
%<n|m><OGS \S15.14.3*>
%<a|y><OGS \S15.14.3*\textdagger>
{canal2001ch}
%<n|m>\emph{Un Cœur in Hiver}, Canal+ (Paris, 15 May 2001, 11.40 p.m.).
%<a|y>\emph{Un Cœur in Hiver} (2001), Canal+ (Paris, 15 May, 11.40 p.m.).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@video{canal2001ch,
  title = {Un Cœur in Hiver},
  organization = {Canal+},
  location = {Paris},
  date = {2001-05-15T23:40:00+02:00}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

%<n|m>\spec{\enquote{EpisodeTitle}, \emph{SeriesTitle}, \lit{Episode} EpisodeNumber, Channel, Date.}
%<a|y>\spec{\enquote{EpisodeTitle} (Year), \emph{SeriesTitle}, \lit{Episode} EpisodeNumber, Channel, Day Month.}

\tip{If the episode has a true title, the episide descriptor (e.g. \enquote{Episode 1}) goes in the \code{note} field.
  If it doesn't, the episode descriptor goes in the \code{title} field; annotate the field with the keyword \code{descriptor} to remove the quote marks.
  Alternatively, use the (non-standard) \code{descriptor} field for the episode descriptor in all cases, and \pkg[biblatex]{oxref} will take care of this for you.}

\begin{bibexbox}
%<n|m><NHR \S18.8.5>
%<a|y><NHR \S18.8.5\textdagger>
{berger1972ws}
%<n|m>John Berger, Episode 1, \emph{Ways of Seeing}, BBC (1972), \url{https://www.youtube.com/watch?v=0pDE4VX_9Kk}, accessed 9 Nov. 2013.
%<a|y>Berger, J. (1972), Episode 1, \emph{Ways of Seeing}, BBC, \url{https://www.youtube.com/watch?v=0pDE4VX_9Kk}, accessed 9 Nov. 2013.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@video{berger1972ws,
  entrysubtype = {episode},
  author = {John Berger},
  title = {Episode 1},
  title+an = {=descriptor},
  maintitle = {Ways of Seeing},
  organization = {BBC},
  date = {1972},
  url = {https://www.youtube.com/watch?v=0pDE4VX_9Kk},
  urldate = {2013-11-09}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}


\section{Podcasts, video podcasts and webcasts}

\tip{Set the \code{entrysubtype} to \code{podcast} for a podcast.}

\begin{bibexbox}
%<n|m><NHR \S18.7.3>
%<a|y><NHR \S18.7.3\textdagger>
{weldon2010did}
%<n|m>Fay Weldon, interview with Kirsty Young, \emph{Desert Island Discs Archive} [podcast], BBC Radio 4 (9 May 2010), \url{http://www.bbc.co.uk/podcasts/series/dida05/all}.
%<a|y>Weldon, F. (2010), interview with Kirsty Young, \emph{Desert Island Discs Archive} [podcast], BBC Radio 4 (9 May), \url{http://www.bbc.co.uk/podcasts/series/dida05/all}.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@audio{weldon2010did,
  entrysubtype = {podcast},
  author = {Fay Weldon},
  descriptor = {interview with {Kirsty Young}},
  maintitle = {Desert Island Discs Archive},
  organization = {BBC Radio 4},
  date = {2010-05-09},
  url = {http://www.bbc.co.uk/podcasts/series/dida05/all}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
%<n|m><NHR \S18.8.5*>
%<a|y><NHR \S18.8.5*\textdagger>
{perry2013ifm}
%<n|m>Grayson Perry, \enquote{I Found Myself in the Art World} [podcast], Reith Lecture, BBC Radio 4 (5 Nov. 2013), \url{http://downloads.bbc.co.uk/podcasts/radio4/reith/reith_20131105-0940b.mp3}, accessed 5 Nov. 2013.
%<a|y>Perry, G. (2013), \enquote{I Found Myself in the Art World} [podcast], Reith Lecture, BBC Radio 4 (5 Nov.), \url{http://downloads.bbc.co.uk/podcasts/radio4/reith/reith_20131105-0940b.mp3}, accessed 5 Nov. 2013.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@audio{perry2013ifm,
  entrysubtype = {podcast},
  author = {Grayson Perry},
  title = {I Found Myself in the Art World},
  note = {Reith Lecture},
  date = {2013-11-05},
  organization = {BBC Radio 4},
  url = {http://downloads.bbc.co.uk/podcasts/radio4/reith/reith_20131105-0940b.mp3},
  urldate = {2013-11-05}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\info{I am not sure why \emph{New Hart's Rules} places the channel after the date in the above case; it is probably a mistake or an odd variation, so I have adjusted it for consistency.}

\tip{As for other online videos, set the \code{entrysubtype} to \code{clip} for a video podcast.}

\begin{bibexbox}
%<n|m><NHR \S18.8.5*>
%<a|y><NHR \S18.8.5*\textdagger>
{nicholson2011qsm}
%<n|m>Christie Nicholson, \enquote{A Quirk of Speech May Become a New Vocal Style} [video], \emph{Scientific American} (17 Dec. 2011), \url{http://www.scientificamerican.com/podcast/episode.cfm?id=a-quirk-of-speech-may-become-a-new-11-12-17}, accessed 4 Nov. 2013.
%<a|y>Nicholson, C. (2011), \enquote{A Quirk of Speech May Become a New Vocal Style} [video], \emph{Scientific American} (17 Dec.), \url{http://www.scientificamerican.com/podcast/episode.cfm?id=a-quirk-of-speech-may-become-a-new-11-12-17}, accessed 4 Nov. 2013.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@video{nicholson2011qsm,
  entrysubtype = {clip},
  author = {Christie Nicholson},
  title = {A Quirk of Speech May Become a New Vocal Style},
  organization = {\emph{Scientific American}},
  date = {2011-12-17},
  url = {http://www.scientificamerican.com/podcast/episode.cfm?id=a-quirk-of-speech-may-become-a-new-11-12-17},
  urldate = {2013-11-04}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\info{The above is actually an episode of the audio podcast \emph{60-Second Mind} (which would be the \code{maintitle}).
  \emph{Scientific American} is in this instance the \code{organization} that is hosting it, but because it is also the name of a journal, it has been manually formatted to match.}

\tip{Perhaps a better way of achieiving consistency in this case would be to treat it like an article, and clarify the medium (i.e.\@ video, erroneously) using the \texttt{titleaddon} field.}

\tip{Set the \code{entrysubtype} to \code{webcast} for a webcast.}

\begin{bibexbox}
%<n|m><NHR \S18.8.5*>
%<a|y><NHR \S18.8.5*\textdagger>
{yousafzai2013mwa}
%<n|m>Malala Yousafzai, \enquote{Making a Wish for Action on Global Education: Malala Yousafzai Addresses Youth Assembly at UN on her 16th Birthday, 12 July 2013} [webcast], UN Web TV (12 July 2013), \url{http://webtv.un.org/search/malala-yousafzai-un-youth-assembly/2542094251001?term=malala}, accessed 15 Feb. 2015.
%<a|y>Yousafzai, M. (2013), \enquote{Making a Wish for Action on Global Education: Malala Yousafzai Addresses Youth Assembly at UN on her 16th Birthday, 12 July 2013} [webcast], UN Web TV (12 July), \url{http://webtv.un.org/search/malala-yousafzai-un-youth-assembly/2542094251001?term=malala}, accessed 15 Feb. 2015.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@video{yousafzai2013mwa,
  entrysubtype = {webcast},
  author = {Malala Yousafzai},
  title = {Making a Wish for Action on Global Education},
  subtitle = {Malala Yousafzai Addresses Youth Assembly at UN on her 16th Birthday, 12 July 2013},
  organization = {UN Web TV},
  date = {2013-07-12},
  url = {http://webtv.un.org/search/malala-yousafzai-un-youth-assembly/2542094251001?term=malala},
  urldate = {2015-02-15}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}


\section{Images and works of art}

\tip{If you need the type of image or artwork to appear in square brackets,
  put it in \code{titleaddon}. Otherwise, put it in \code{type}.}

\tip{Use \code{institution} (a list) or \code{venue} (a literal) for the
  organization, museum, gallery or building physically hosting the image, and
  \code{location} for where it is.}

\begin{bibexbox}
%<n|m><NHR \S18.8.5>
%<a|y><NHR \S18.8.5\textdagger>
{clarkeNDeci}
%<n|m>M. Clarke, \enquote{Exports of Coal to the IFS} [poster], Manchester Art Gallery, \url{http://www.machestergalleries.org/the-collections/search-the-collection/display.php?EMUSESSID=70bd7f1a388d79a82f52ea9aae713ef2&irn=4128}, accessed 5 Nov. 2013.
%<a|y>Clarke, M. (n.d.), \enquote{Exports of Coal to the IFS} [poster], Manchester Art Gallery, \url{http://www.machestergalleries.org/the-collections/search-the-collection/display.php?EMUSESSID=70bd7f1a388d79a82f52ea9aae713ef2&irn=4128}, accessed 5 Nov. 2013.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@image{clarkeNDeci,
  author = {M. Clarke},
  title = {Exports of Coal to the IFS},
  titleaddon = {poster},
  institution = {Manchester Art Gallery},
  url = {http://www.machestergalleries.org/the-collections/search-the-collection/display.php?EMUSESSID=70bd7f1a388d79a82f52ea9aae713ef2&irn=4128},
  urldate = {2013-11-05}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\tip{Use \code{organization} for the website or online location of the image.}

\begin{bibexbox}
%<n|m><NHR \S18.8.5>
%<a|y><NHR \S18.8.5\textdagger>
{ibwNDcgs}
%<n|m>\enquote{Christ the Good Shepherd}, stained glass window, Church of St Erfyl, Llanerfyl, Powys, Imaging the Bible in Wales Database, \url{http://imagingthebible.llgc.org.uk/object/1884}, accessed 10 Nov. 2013.
%<a|y>\enquote{Christ the Good Shepherd} (n.d.), stained glass window, Church of St Erfyl, Llanerfyl, Powys, Imaging the Bible in Wales Database, \url{http://imagingthebible.llgc.org.uk/object/1884}, accessed 10 Nov. 2013.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@image{ibwNDcgs,
  title = {Christ the Good Shepherd},
  type = {stained glass window},
  venue = {Church of St Erfyl},
  location = {Llanerfyl, Powys},
  organization = {Imaging the Bible in Wales Database},
  url = {http://imagingthebible.llgc.org.uk/object/1884},
  urldate = {2013-11-10}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
{davinci1480mr}
(not in book)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@artwork{davinci1480mr,
  author = {given=Leonardo, family=da Vinci},
  title = {Madonna of the Rocks},
  type = {oil on canvas},
  note = {78 x 48.5 in\adddot},
  year = {1480s},
  date+an = {=inferred},
  institution = {Louvre},
  location = {Paris}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
{gormley1998an}
(not in book)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@artwork{gormley1998an,
  author = {Anthony Gormley},
  title = {Angel of the {North}},
  date = {1998},
  type = {sculpture},
  location = {Low Fell, Gateshead}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
{rodin1882k}
(not in book)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@artwork{rodin1882k,
  author = {Auguste Rodin},
  title = {The Kiss},
  date = {1882},
  type = {marble},
  institution = {Musée Rodin},
  location = {Paris}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\section{Performances}

\tip{Use \code{origdate} for the date when the play, ballet, opera, or whatever
  was written or premièred, and \code{date} for the date of the performance you
  are referencing. You can specify what these dates signify with the
  (non-standard) \code{origdatetype} and \code{datetype} fields. You can also
  use \code{eventdate} in place of \code{date}, but then you won't be able to
  specify the type.}

\tip{As for recordings, you can use the \code{author} and \code{editor} fields
  to provide various credits. As for artworks, use \code{venue} and
  \code{location} for where the performance occurred, and \code{organization}
  for a website or organization hosting a recording of the performance online.}

\begin{bibexbox}
{ashton1937wb}
(not in book)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@performance{ashton1937wb,
  author = {Frederick Ashton},
  origdate = {1937},
  title = {A Wedding Bouquet},
  venue = {Royal Opera House},
  location = {London},
  date = {2004-10-22}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
{lord2007dc}
(not in book)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@performance{lord2007dc,
  author = {Jon Lord},
  date = {2007-10-20},
  title = {Durham Concerto},
  editor = {{Liverpool Philharmonic Orchestra}},
  editortype = {performer},
  editora = {Mischa Damev},
  editoratype = {conductor},
  venue = {Durham Cathedral},
  location = {Durham}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
{judge1995mnd}
(not in book)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@performance{judge1995mnd,
  options = {useauthor=false,useeditor=false},
  author = {William Shakespeare},
  title = {A Midsummer Night's Dream},
  editor = {Ian Judge},
  editortype = {director},
  date = {1995-02-26},
  venue = {Theatre Royal},
  location = {Newcastle upon Tyne}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\chapter{Digital media}\label{sec:electronic}
\chapterprecis{online, software, dataset}

In Section 18.8.5 of \emph{New Hart's Rules}, some publication dates are printed in parentheses and some are left bare.
In theory, the difference should be that parentheses indicate \enquote{proper} publication (bare dates are when the resource was created or issued). In practice, it seems to be random. I have therefore decided to ignore the variation and leave all such dates in parentheses.

\section{Website articles}

Standard \textsf{biblatex} only provides for one title for online resources, which is fine for whole websites but not if you want to cite one page or article within a website.

\tip{If the piece is unsigned, put the site name in the \code{author} field.}

\begin{bibexbox}
%<n|m><NHR \S18.8.5>
%<a|y><NHR \S18.8.5\textdagger>
{bbc2013cgh}
%<n|m>BBC News, \enquote{Colchester General Hospital: Police Probe Cancer Treatment} (5 Nov. 2013), \url{http://www.bbc.co.uk/news/uk-england-essex-24819973}, accessed 5 Nov. 2013.
%<a|y>BBC News (2013), \enquote{Colchester General Hospital: Police Probe Cancer Treatment} (5 Nov.), \url{http://www.bbc.co.uk/news/uk-england-essex-24819973}, accessed 5 Nov. 2013.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@online{bbc2013cgh,
  author = {{BBC News}},
  title = {Colchester General Hospital},
  subtitle = {Police Probe Cancer Treatment},
  date = {2013-11-05},
  url = {http://www.bbc.co.uk/news/uk-england-essex-24819973},
  urldate = {2013-11-05}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\tip{If the piece is signed, put the site name in the \code{organization} field.
  The rationale is that \textsf{biblatex} uses this for the organization hosting the site,
  and it can get a bit blurry between that and the name of the site itself.}

\begin{bibexbox}
%<n|m><NHR \S18.8.5>
%<a|y><NHR \S18.8.5\textdagger>
{hooper2013lfs}
%<n|m>Richard Hooper, \enquote{Lebanon's Forgotten Space Programme}, BBC News Magazine (14 Nov. 2013), \url{http://www.bbc.co.uk/news/magazine-24735423}, accessed 14 Nov. 2013.
%<a|y>Hooper, R. (2013), \enquote{Lebanon's Forgotten Space Programme}, BBC News Magazine (14 Nov.), \url{http://www.bbc.co.uk/news/magazine-24735423}, accessed 14 Nov. 2013.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@online{hooper2013lfs,
  author = {Richard Hooper},
  title = {Lebanon's Forgotten Space Programme},
  organization = {BBC News Magazine},
  date = {2013-11-14},
  url = {http://www.bbc.co.uk/news/magazine-24735423},
  urldate = {2013-11-14}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
%<n|m><NHR \S18.8.5>
%<a|y><NHR \S18.8.5\textdagger>
{tan2013wdt}
%<n|m>Siu-Lan Tan, \enquote{Why does this Baby Cry when her Mother Sings?} [including video], OUPblog (5 Nov. 2013), \url{http://blog.oup.com/2013/11/why-does-this-baby-cry-when-her-mother-sings-viral-video/}, accessed 9 Nov. 2013.
%<a|y>Tan, S.-L. (2013), \enquote{Why does this Baby Cry when her Mother Sings?} [including video], OUPblog (5 Nov.), \url{http://blog.oup.com/2013/11/why-does-this-baby-cry-when-her-mother-sings-viral-video/}, accessed 9 Nov. 2013.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@online{tan2013wdt,
  author = {Siu-Lan Tan},
  title = {Why does this Baby Cry when her Mother Sings?},
  titleaddon = {including video},
  organization = {OUPblog},
  date = {2013-11-05},
  url = {http://blog.oup.com/2013/11/why-does-this-baby-cry-when-her-mother-sings-viral-video/},
  urldate = {2013-11-09}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
%<n|m><NHR \S18.8.5>
%<a|y><NHR \S18.8.5\textdagger>
{allaby2013fll}
%<n|m>Michael Allaby, \enquote{Feathers and Lava Lamps}, Oxford Reference (2013), \url{http://www.oxfordreference.com/page/featherslavalamps}, accessed 9 Nov. 2013.
%<a|y>Allaby, M. (2013), \enquote{Feathers and Lava Lamps}, Oxford Reference, \url{http://www.oxfordreference.com/page/featherslavalamps}, accessed 9 Nov. 2013.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@online{allaby2013fll,
  author = {Michael Allaby},
  title = {Feathers and Lava Lamps},
  organization = {Oxford Reference},
  date = {2013},
  url = {http://www.oxfordreference.com/page/featherslavalamps},
  urldate = {2013-11-09}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\tip{If the site looks more like a traditional journal (e.g.\@ with an ISSN), use the \code{article} entry type instead of \code{online}.}

\begin{bibexbox}
%<n|m><NHR \S18.8.5>
%<a|y><NHR \S18.8.5\textdagger>
{mcewen2013tte}
%<n|m>Stephen McEwen, \enquote{Tan Twan Eng Interview: \enquote{I Have No Alternative but to Write in English}}, \emph{The Spectator} (20 May 2013), \url{http://blogs.spectator.co.uk/books/2013/05/tan-twang-eng-interview-i-have-no-alternative-but-to-write-in-english/}, accessed 9 Nov. 2013.
%<a|y>McEwen, S. (2013), \enquote{Tan Twan Eng Interview: \enquote{I Have No Alternative but to Write in English}}, \emph{The Spectator} (20 May), \url{http://blogs.spectator.co.uk/books/2013/05/tan-twang-eng-interview-i-have-no-alternative-but-to-write-in-english/}, accessed 9 Nov. 2013.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@article{mcewen2013tte,
  author = {Stephen McEwen},
  title = {Tan Twan Eng Interview: \enquote{I Have No Alternative but to Write in English}},
  journaltitle = {The Spectator},
  date = {2013-05-20},
  options = {varissuedate=false},
  url = {http://blogs.spectator.co.uk/books/2013/05/tan-twang-eng-interview-i-have-no-alternative-but-to-write-in-english/},
  urldate = {2013-11-09}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}


\section{Online reference article}

\begin{bibexbox}
%<n|m><NHR \S18.8.5>
%<a|y><NHR \S18.8.5\textdagger>
{eb2013gp}
%<n|m>\enquote{Gunpowder Plot}, \emph{Encyclopaedia Britannica}, \url{http://www.britannica.com/EBchecked/topic/249505/Gunpowder-Plot}, accessed 5 Nov. 2013.
%<a|y>\enquote{Gunpowder Plot} (n.d.), \emph{Encyclopaedia Britannica}, \url{http://www.britannica.com/EBchecked/topic/249505/Gunpowder-Plot}, accessed 5 Nov. 2013.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@online{eb2013gp,
  title = {Gunpowder Plot},
  maintitle = {Encyclopaedia Britannica},
  url = {http://www.britannica.com/EBchecked/topic/249505/Gunpowder-Plot},
  urldate = {2013-11-05}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\tip{Unlike standard \textsf{biblatex}, \pkg[biblatex]{oxref} supports \code{maintitle} for online entries and prints the result in italics. For more portability, you could either hard-code the italics into the \code{organization} field or use the \code{article} entry type.}

\info{It is not made explicit why \emph{Encyclopaedia Britannica} is in italics and \emph{Wikipedia} is not.
  It might be historical or customary, because \emph{Encyclopaedia Britannica} was established as a print publication and \emph{Wikipedia} has only been online;
  it might be because \emph{Encyclopaedia Britannica} is a Latin title;
  it might reflect an opinion on the two resources;
  or it may just be illustrative of variant practice.}

\begin{bibexbox}
%<n|m><NHR \S18.8.5>
%<a|y><NHR \S18.8.5\textdagger>
{wp2013oup}
%<n|m>\enquote{Oxford University Press}, Wikipedia (last modified 5 Nov. 2013), \url{http://en.wikipedia.org/wiki/Oxford_University_Press}, accessed 5 Nov. 2013.
%<a|y>\enquote{Oxford University Press} (2013), Wikipedia (last modified 5 Nov.), \url{http://en.wikipedia.org/wiki/Oxford_University_Press}, accessed 5 Nov. 2013.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@online{wp2013oup,
  title = {Oxford University Press},
  organization = {Wikipedia},
  date = {2013-11-05},
  datetype = {modified},
  url = {http://en.wikipedia.org/wiki/Oxford_University_Press},
  urldate = {2013-11-05}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\tip{Use the (non-standard) \texttt{datetype} field to clarify the event represented by the main date.}


\section{Social media}

\begin{bibexbox}
%<n|m><NHR \S18.8.5>
%<a|y><NHR \S18.8.5\textdagger>
{obama2013tvd}
%<n|m>Barack Obama, \enquote{Tomorrow is Veterans Day} [Facebook post] (10 Nov. 2013), \url{https://www.facebook.com/barackobama/photos/a.53081056748.66806.6815841748/10151936988101749/}, accessed 13 Nov. 2013.
%<a|y>Obama, B. (2013), \enquote{Tomorrow is Veterans Day} [Facebook post] (10 Nov.), \url{https://www.facebook.com/barackobama/photos/a.53081056748.66806.6815841748/10151936988101749/}, accessed 13 Nov. 2013.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@online{obama2013tvd,
  entrysubtype = {facebook},
  author = {Barack Obama},
  title = {Tomorrow is Veterans Day},
  date = {2013-11-10},
  url = {https://www.facebook.com/barackobama/photos/a.53081056748.66806.6815841748/10151936988101749/},
  urldate = {2013-11-13}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
%<n|m><NHR \S18.8.5>
%<a|y><NHR \S18.8.5\textdagger>
{harvey2013tfm}
%<n|m>John Harvey, \enquote{\enquote{These are a Few of My Favourite Things}, No.~28} [Facebook post] (13 Nov. 2013), \url{https://www.facebook.com/photo.php?fbid=229786530530896&set=a.108896335953250.15125.100004986510149&type=1&theatre}, accessed 13 Nov. 2013.
%<a|y>Harvey, J. (2013), \enquote{\enquote{These are a Few of My Favourite Things}, No.~28} [Facebook post] (13 Nov.), \url{https://www.facebook.com/photo.php?fbid=229786530530896&set=a.108896335953250.15125.100004986510149&type=1&theatre}, accessed 13 Nov. 2013.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@online{harvey2013tfm,
  entrysubtype = {facebook},
  author = {John Harvey},
  title = {\enquote{These are a Few of My Favourite Things}, No.~28},
  date = {2013-11-13},
  url = {https://www.facebook.com/photo.php?fbid=229786530530896&set=a.108896335953250.15125.100004986510149&type=1&theatre},
  urldate = {2013-11-13}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
%<n|m><NHR \S18.8.5*>
%<a|y><NHR \S18.8.5*\textdagger>
{globe2013otd}
%<n|m>Shakespeare's Globe, \enquote{On this day in 1611 first production of The Tempest was performed by King's Men at Whitehall Palace before James I} [Twitter post] (5.48~a.m., 1~Nov. 2013), \url{https://twitter.com/The_Globe/status/396257422928400385}, accessed 5 Nov. 2013.
%<a|y>Shakespeare's Globe (2013), \enquote{On this day in 1611 first production of The Tempest was performed by King's Men at Whitehall Palace before James I} [Twitter post] (5.48~a.m., 1~Nov.), \url{https://twitter.com/The_Globe/status/396257422928400385}, accessed 5 Nov. 2013.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@online{globe2013otd,
  entrysubtype = {tweet},
  author = {{Shakespeare's Globe}},
  title = {On this day in 1611 first production of The Tempest was performed by King's Men at Whitehall Palace before James I},
  date = {2013-11-01T05:48:00},
  options = {timefirst},
  url = {https://twitter.com/The_Globe/status/396257422928400385},
  urldate = {2013-11-05}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\tip{If it feels odd putting the entire content of a tweet in your reference, \emph{New Hart's Rules} suggests using a descriptor like \enquote{Twitter post} instead of the title. As described in \cref{sec:broadcasts}, you can do this either by annotating the title field with the keyword \code{descriptor} or by using the (non-standard) \code{descriptor} field in place of \code{title}.}

\begin{bibexbox}
{oup2015tweet}
(not in book)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@online{oup2015tweet,
  author = {{Oxford University Press}},
  shortauthor = {OUP},
  descriptor = {Twitter post},
  date = {2015-11-16T01:07:00},
  url = {https://twitter.com/OxUniPress/status/666180787251843072},
  urldate = {2015-12-25}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\section{Software}

\begin{bibexbox}
%<n|m><NHR \S18.8.5>
%<a|y><NHR \S18.8.5\textdagger>
{simoga1.1d6}
%<n|m>Simoga, \emph{Device 6} (version 1.1) [mobile application for iPhone and iPad], downloaded 9 Nov. 2013.
%<a|y>Simoga (n.d.), \emph{Device 6} (version 1.1) [mobile application for iPhone and iPad], downloaded 9 Nov. 2013.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@software{simoga1.1d6,
  author = {Simoga},
  title = {Device 6},
  version = {1.1},
  titleaddon = {mobile application for iPhone and iPad},
  urldate = {2013-11-09}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
%<n|m><NHR \S18.8.5>
%<a|y><NHR \S18.8.5\textdagger>
{eliot1.1.1twl}
%<n|m>T. S. Eliot, \emph{The Waste Land} (version 1.1.1) [mobile application for iPad] (London: Touch Press, 2013), downloaded 9 Nov. 2013.
%<a|y>Eliot, T. S. (2013), \emph{The Waste Land} (version 1.1.1) [mobile application for iPad] (London: Touch Press), downloaded 9 Nov. 2013.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@software{eliot1.1.1twl,
  author = {T. S. Eliot},
  title = {The Waste Land},
  version = {1.1.1},
  titleaddon = {mobile application for iPad},
  location = {London},
  publisher = {Touch Press},
  date = {2013},
  urldate = {2013-11-09}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}


\section{Database}

\begin{bibexbox}
%<n|m><NHR \S18.8.5>
%<a|y><NHR \S18.8.5\textdagger>
{un2011wpp}
%<n|m>United Nations, \emph{World Population Prospects: The 2010 Revision} [CD-ROM] (New York: United Nations Department of Economic and Social Affairs, Population Division, 2011).
%<a|y>United Nations (2011), \emph{World Population Prospects: The 2010 Revision} [CD-ROM] (New York: United Nations Department of Economic and Social Affairs, Population Division).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@dataset{un2011wpp,
  author = {{United Nations}},
  title = {World Population Prospects},
  subtitle = {The 2010 Revision},
  titleaddon = {CD-ROM},
  location = {New York},
  publisher = {{United Nations Department of Economic and Social Affairs, Population Division}},
  date = {2011}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}


\chapter{Legal references}\label{sec:legal}
\chapterprecis{commentary, jurisdiction, legal, legislation}

\pkg[biblatex]{Oxref} provides only a basic level of support for legal references, in case you need to use some in a mainly non-legal text.
For a more thorough and robust treatment, intended for a specialist readership, I recommend you use the \pkg{oscola} style instead.

Since there is a family resemblence between the \emph{Oxford Guide to Style\slash New Hart's Rules}
and the \emph{Oxford Standard for the Citation of Legal Authorities},
\pkg[biblatex]{oxref} largely mimics \pkg{oscola} and its data model, though there are some small formatting differences.
What you should \emph{not} expect from \pkg[biblatex]{oxref} are facilities for compiling specialist indices of sources,
or anything special regarding the handling of postnotes.

\pkg[biblatex]{Oxref} follows \pkg{oscola} in stripping out abbreviation dots from most fields using regular expressions,
but if you want to retain a dot that it strips, you can do so by writing it \verb|{.}|, \cs{adddot} or \cs{addotspace}.

%<y>Since legal references are usually cited using footnotes, how \textsf{oxyear} should behave is not well defined. As a result, I have not configured it to do anything fancy: the full reference will be formatted just the same as with \textsf{oxnotes}, and citations will typically be title–year using parentheses in the usual way. I am open to suggestions for how to handle things better.

\section{Cases}

\subsection{Reported cases}

Use the \code{jurisdiction} entry type for citing cases.

\tip{Use the \code{keywords} field to specify the jurisdiction. The following are recognized:
  \begin{itemize}
  \item\val{gb}
    United Kingdom
  \item\val{en}:
    England (default)
  \item\val{cy}:
    Wales
  \item\val{sc}:
    Scotland
  \item\val{ni}:
    Northern Ireland
  \item\val{eu}:
    European Union (including the EEC, EC, ECSC and EURATOM)
  \item\val{echr}:
    Organs of the Council of Europe dealing with the European Convention on Human Rights
  \item\val{int}:
    (Public) international law cases and materials
  \item\val{us}:
    United States of America
  \item\val{ca}:
    Canada
  \item\val{aus}:
    Australia
  \item\val{nz}:
    New Zealand
  \end{itemize}
}

\tip{Scottish cases heard at the House of Lords or the Supreme Court should technically be given the keyword \val{gb}, therefore you can also identify them with the \key{scottish-style} option.}

\tip{Use either the (non-standard) \code{reporter} or \code{journaltitle} field for the (abbreviated) name of the report series. Use the \code{series} field for a numeric sub-series.}

\tip{Several additional pagination types are defined for use with legal citations:
  \val{article}, \val{clause}, \val{regulation}, and \val{rule} all work as normal.
  The default is a bare number (\val{none}), indicating a page reference, though EU and ECHR cases default to using the \enquote{para} (\val{paragraph}) prefix.
  There is also an alternative pagination type for paragraphs, \val{[]}, which prints the number in square brackets instead of giving it a prefix.
}

\tip{If you want to include a parallel citation, you can use the non-standard \code{pardate}, \code{parreporter}, \code{parseries}, \code{parvolume}, and \code{parpages} fields.}

\tip{If you need to, use either the (non-standard) \code{court} or \code{institution} field for the court that decided the case.}

\tip{Use the \code{location} field for the location of the court in American, Australian or Canadian cases.}

%<*n>
\begin{egcite}{\emph{Ridge v Baldwin} [1964] AC 40 at 78–9}
\cite[78-79]{ridge1964}
\end{egcite}
%</n>
%<*m|a>
\begin{egcite}{}
\textcite[78-79]{ridge1964}
\end{egcite}
%</m|a>
%<*y>
\begin{egcite}{(\emph{Ridge v Baldwin} 1964: 78–9)}
\parencite[78-79]{ridge1964}
\end{egcite}
%</y>

\begin{bibexbox}
%<n|m><NHR \S13.4.1>
%<a|y><NHR \S13.4.1\textdagger>
{ridge1964}
%<n|m>\emph{Ridge v Baldwin} [1964] AC 40
%<a|y>\emph{Ridge v Baldwin} [1964] AC 40
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{ridge1964,
  title = {Ridge v. Baldwin},
  keywords = {gb},
  date = {1964},
  journaltitle = {A.C.},
  pages = {40}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\tip{Use the \key{year-essential} Boolean entry option to specify whether the year is essential for locating the report, in cases where automatic detection (based on the presence or otherwise of a volume number) fails.
  There is a similar \key{paryear-essential} option for the parallel year.}

\begin{bibexbox}
<NHR \S13.4.1>
{lambert2001}
\emph{R v Lambert} [2001] 2 WLR 211 (QBD)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{lambert2001,
  title = {R v Lambert},
  keywords = {gb},
  date = {2001},
  volume = {2},
  journaltitle = {WLR},
  pages = {211},
  institution = {QBD},
  options = {year-essential=true}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
<NHR \S13.4.1>
{badische1897}
\emph{Badische v Soda-Fabrics} (1897) 14 RPC 919 (HL)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{badische1897,
  title = {Badische v. Soda-Fabrics},
  date = {1897},
  journaltitle = {RPC},
  volume = {14},
  pages = {919},
  institution = {HL}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\tip{Use the (non-standard) \code{neutralcite} or \code{number} field for the neutral citation or case number.}

\begin{bibexbox}
<OSCOLA \S2.1.1>
{corr08}
\emph{Corr v IBC Vehicles Ltd} [2008] UKHL 13, [2008] 1 AC 884
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{corr08,
  title = {Corr v. I.B.C. Vehicles Ltd.},
  keywords = {gb},
  date = {2008},
  neutralcite = {[2008] UKHL 13},
  journaltitle = {A.C.},
  volume = {1},
  pages = {884},
  options = {year-essential}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
<NHR \S13.4.1>
{rvg2004}
\emph{R v G} [2003] UKHL 50, [2004] 1 AC 1034
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{rvg2004,
  title = {R. v. G.},
  number = {[2003] UKHL 50},
  date = {2004},
  journaltitle = {A.C.},
  volume = {1},
  pages = {1034},
  options = {year-essential},
  pagination = {[]}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

%<*n>
\begin{egcite}{}
Test\footcite[13]{rvg2004}
\end{egcite}
%</n>
%<*m|a>
\begin{egcite}{}
\textcite[13]{rvg2004}
\end{egcite}
%</m|a>
%<*y>
\begin{egcite}{}
\parencite[13]{rvg2004}
\end{egcite}
%</y>

%<y>\hack{Note that in the cases above and below, the head of the reference won't match the citation, which may cause confusion. You may wish to hack the in-text citation to fix this.}

\tip{If a report is published a long time after the decision, you can put the decision date in \code{origdate} to clarify the situation.}

\begin{bibexbox}
<NHR \S13.4.3>
{smith2001}
\emph{Smith v Jones} [2001] (1948) 2 All ER 431
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{smith2001,
  title = {Smith v Jones},
  date = {2001},
  origdate = {1948},
  journaltitle = {All ER},
  volume = {2},
  pages = {431},
  options = {year-essential}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

Both the \emph{Oxford Guide to Style} and \emph{New Hart's Rules} are inconsistent on whether the court of decision should be printed plain or in parentheses at the end of a reference to a reported case. The default chosen by \pkg[biblatex]{oxref} is to use parentheses as per the \emph{Oxford Standard for the Citation of Legal Authorities}.

\tip{To print the court of decision plain, you can use the \key{court-plain} option. You can set this globally at the style level or on a per-entry basis.}

\begin{bibexbox}
<NHR \S13.4.3>
{bowman1978}
\emph{Bowman v Fussy} [1978] RPC 545, HL
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{bowman1978,
  title = {Bowman v Fussy},
  keywords = {gb},
  date = {1978},
  journaltitle = {RPC},
  pages = {545},
  institution = {HL},
  options = {court-plain}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
<NHR \S13.4.1>
{hughes1907}
\emph{Hughes v Stewart}, 1907 SC 791
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{hughes1907,
  title = {Hughes v. Stewart},
  date = {1907},
  reporter = {SC},
  pages = {791},
  keywords = {sc}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
<NHR \S13.4.1>
{corcoran1932}
\emph{Corcoran v HM Advocate}, 1932 JC 42
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{corcoran1932,
  title = {Corcoran v. H.M. Advocate},
  date = {1932},
  reporter = {JC},
  pages = {42},
  keywords = {sc}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
<OSCOLA \S2.2*>
{hislop42}
\emph{Hislop v Durham} (1842) 4 D 1168
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{hislop42,
  title = {Hislop v. Durham},
  date = {1842},
  volume = {4},
  reporter = {D},
  pages = {1168},
  keywords = {sc}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
<OSCOLA \S2.2*>
{crofters02}
\emph{Crofters Commission v Scottish Ministers}, 2002 SLT (Land Ct) 19
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{crofters02,
  title = {Crofters Commission v. Scottish Ministers},
  date = {2002},
  reporter = {SLT},
  series = {(Land Ct)},
  pages = {19},
  keywords = {sc}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\subsection{Unreported cases}

\tip{For cases reported in newspapers, set the \code{entrysubtype} to \code{newspaper}.}

\begin{bibexbox}
<NHR \S13.4.2*>
{powick1993}
\emph{Powick v Malvern Wells Water Co}, The Times, 28 Sept.\@ 1993
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{powick1993,
  entrysubtype = {newspaper},
  title = {Powick v. Malvern Wells Water Co},
  date = {1993-09-28},
  journaltitle = {The Times}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
<NHR \S13.4.2*>
{marianishi1965}
\emph{R v Marianishi, ex p London Borough of Camden} (CA, 13 Apr.\@ 1965)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{marianishi1965,
  title = {R v Marianishi, ex p London Borough of Camden},
  date = {1965-04-13},
  institution = {C.A.}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\tip{Unreported cases with a \code{neutralcite} or \code{number} do not show the date after the \code{institution}.}

\begin{bibexbox}
<OSCOLA \S2.1.4>
{calvert02}
\emph{Calvert v Gardiner} [2002] EWHC 1394 (QB)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{calvert02,
  title = {Calvert v. Gardiner},
  neutralcite = {[2002] EWHC 1394},
  institution = {QB},
  date = {2002-01-01}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\subsection{European cases}

\tip{You can record the European Case Law Identifier for a case using the \code{ecli} field.
  The \key{ecli} option determines under what circumstances the identifier is printed.}

\tip{European cases still get sorted by title, even if the entry begins with the case number.
  Use \code{sorttitle} if you would rather they were sorted under \enquote{Case} or \enquote{Joined Cases}.}

\tip{The number will be classed as \enquote{Joined Cases} if it contains a comma, a double hyphen (\code{--}),
  or the string \cs{oxrefand}, which defaults to \enquote{\code{\textvisiblespace and\textvisiblespace}}.}

\tip{For ECR cases, you can use either \code{number} or the non-standard \code{casenumber} field
  for the case number.}

\begin{bibexbox}
<OGS \S13.4.4>
{C118/07}
Case C–118/07 \emph{Commission of the European Communities v Finland} [2002] ECR I–10889
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{C118/07,
  keywords = {eu},
  title = {Commission of the European Communities v. Finland},
  sorttitle = {Case C0118/0007},
  number = {C\textendash118/07},
  journaltitle = {ECR},
  volume = {I},
  pages = {10889},
  date = {2002}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
<OSCOLA \S2.6.2>
{C430/93}
Joined Cases C-430/93–C-431/93 \emph{Jereon van Schijndel v Stichting Pensioenfonds voor Fysiotherapeuten} [1998] ECR I–4705
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{C430/93,
  keywords = {eu},
  title = {Jereon van Schijndel v Stichting Pensioenfonds voor Fysiotherapeuten},
  shorttitle = {van Schijndel},
  number = {C-430/93--C-431/93},
  institution = {ECJ},
  journaltitle = {ECR},
  volume = {I},
  date = {1998},
  pages = {4705},
  hyphenation = {dutch}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\tip{Indicate Commission Decisions by putting \code{Commission} in the \code{institution} field.
  If a decision has a formal decision number, put this in the \code{number} field,
  and put the case number in the (non-standard) \code{casenumber} field;
  the \enquote{Case} prefix is added automatically in this case.
  Alternatively, you can put the case number (including the word \enquote{Case} if needed)
  in the \code{userb} field for compatibility with \pkg{oscola},
  or in the \code{titleaddon} field for wider portability.}

\begin{bibexbox}
<OGS \S13.2.6>
{alcatel}
\emph{Alcatel/Telettra} (Case IV/M042) [1991] OJ L122/48, [1991] 4 CLMR 391
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{alcatel,
  keywords = {eu},
  title = {Alcatel/Telettra},
  casenumber = {IV/M042},
  institution = {Commission},
  date = {1991},
  journaltitle = {OJ},
  series = {L},
  volume = {122},
  pages = {48},
  pardate = {1991},
  parreporter = {CLMR},
  parvolume = {4},
  parpages = {391},
  options = {paryear-essential}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
<OSCOLA \S2.6.3>
{verkehrsorgani}
\emph{Georg Verkehrsorgani v Ferrovie dello Stato} (Case COMP/37.685) Commission Decision 2004/33/EC [2004] OJ L11/17
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{verkehrsorgani,
  keywords = {eu},
  title = {Georg Verkehrsorgani v Ferrovie dello Stato},
  userb = {Case COMP\slash 37.685},
  number = {2004\slash 33\slash EC},
  institution = {commission},
  year = {2004},
  journaltitle = {OJ},
  series = {L},
  issue = {11},
  pages = {17}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\tip{For ECHR cases, put the application number in the \code{number} field;
unlike \emph{OSCOLA}, \emph{New Hart's Rules} puts parentheses around it.}

\begin{bibexbox}
<NHR \S13.4.5>
{young1982}
\emph{Young, James and Webster v UK} (App no 7601/76) (1982) 4 EHRR 38
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{young1982,
  title = {Young, James and Webster v. UK},
  number = {7601/76},
  reporter = {EHRR},
  volume = {4},
  date = {1982},
  pages = {38},
  keywords = {echr}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
<OSCOLA \S2.7.1>
{balogh04}
\emph{Balogh v Hungary} (App no 47940/99) (ECtHR, 20 July 2004)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{balogh04,
  title = {Balogh v. Hungary},
  number = {47940/99},
  date = {2004-07-20},
  institution = {ECtHR},
  keywords = {echr}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\tip{Special formatting is triggered if you specify \code{Series A} or \code{ECHR} as the \code{journaltitle} or \code{reporter}.}

\begin{bibexbox}
<NHR \S13.4.5>
{plattform1988}
\emph{Plattform \enquote{Artze für das Leben} v Austria} (App no 10126/82) (1988) Series A no 139
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{plattform1988,
  title = {Plattform \enquote{Artze für das Leben} v. Austria},
  number = {10126/82},
  reporter = {Series A},
  date = {1988},
  pages = {139},
  keywords = {echr}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
<NHR \S13.4.5>
{osman1998}
\emph{Osman v UK} (App no 23452/94) ECHR 1998–VIII 3124
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{osman1998,
  title = {Osman v UK},
  number = {23452/94},
  reporter = {ECHR},
  date = {1998},
  volume = {8},
  pages = {3124},
  institution = {ECtHR},
  keywords = {echr}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\tip{For the older European Commission of Human Rights, the \code{institution}
should be set to \code{Commission} but the information is effectively discarded
if you give the \code{journltitle} as \code{CD} or \code{DR}.}

\begin{bibexbox}
<OSCOLA \S2.7.2>
{x71}
\emph{X v Netherlands} (1971) 38 CD 9
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{x71,
  title = {X v. Netherlands},
  date = {1971},
  volume = {38},
  journaltitle = {CD},
  pages = {9},
  institution = {Commission},
  keywords = {echr}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
<OSCOLA \S2.7.2>
{ccsu87}
\emph{Council of Civil Service Unions v UK} (1987) 10 EHRR 269 (Commission Decision)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{ccsu87,
  title = {Council of Civil Service Unions v. UK},
  date = {1987},
  volume = {10},
  journaltitle = {EHRR},
  pages = {269},
  institution = {Commission},
  keywords = {echr}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
<OSCOLA \S2.7.2>
{simpson86}
\emph{Simpson v UK} (1989) 64 DR 188
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{simpson86,
  title = {Simpson v. UK},
  date = {1989},
  volume = {64},
  journaltitle = {DR},
  pages = {188},
  institution = {Commission},
  keywords = {echr}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
<OSCOLA \S2.7.2*>
{p.uk88}
\emph{P v UK} (App no 13473/87) (Commission Decision, 11 July 1988)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{p.uk88,
  title = {P v. UK},
  date = {1988-07-11},
  number = {13473/87},
  institution = {Commission},
  keywords = {echr}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\subsection{Cases from other jurisdictions}

The \emph{Oxford Guide to Style}, \emph{New Hart's Rules}, and \emph{OSCOLA}
provide only limited information on citing cases from other jurisdictions,
deferring to other authorities I can't effectively support in
\pkg[biblatex]{oxref}. The examples in this section demonstrate a few
formats that can nevertheless be achieved.

\subsubsection{Australia}

\begin{bibexbox}
<OSCOLA \S2.8.1>
{waltons88}
\emph{Waltons Stores (Interstate) Ltd v Maher} (1988) 164 CLR 387
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{waltons88,
  title = {Waltons Stores (Interstate) Ltd v Maher},
  date = {1988},
  volume = {164},
  reporter = {C.L.R.},
  pages = {387},
  keywords = {au}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
{bakker}
\emph{Bakker v Stewart} [1980] VR 17
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{bakker,
  title = {Bakker v. Stewart},
  date = {1980},
  reporter = {V.R.},
  pages = {17},
  keywords = {au}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\subsubsection{Canada}

\info{\emph{New Hart's Rules} prefers to put commas between case titles and bare
numbers, but you can suppress this for Canadian cases with the following command:}
\begin{tcblisting}{listing only,left skip=2em}
\renewcommand*{\cacasetitlepunct}{\addspace}
\end{tcblisting}

\begin{bibexbox}
{clearbrook}
\emph{Clearbrook Ironworks Ltd v Letorneau}, 2006 FCA 42, 46 CPR (4th) 241
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{clearbrook,
  title = {Clearbrook Ironworks Ltd. v. Letorneau},
  number = {2006 FCA 42},
  volume = {46},
  reporter = {C.P.R.},
  series = {4th},
  pages = {241},
  date = {2006},
  pagination = {paragraph},
  keywords = {ca}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\subsubsection{United States of America}

\info{\emph{New Hart's Rules} prefers to put commas between case titles and bare
numbers, but you can suppress this for American cases with the following command:}
\begin{tcblisting}{listing only,left skip=2em}
\renewcommand*{\uscasetitlepunct}{\addspace}
\end{tcblisting}

\begin{bibexbox}
<NHR \S13.4.1>
{michael1976}
\emph{Michael v Johnson}, 426 US 346 (1976)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{michael1976,
  title = {Michael v. Johnson},
  volume = {426},
  reporter = {U.S.},
  pages = {346},
  date = {1976},
  keywords = {us}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}
  
\begin{bibexbox}
<OSCOLA \S2.8.1*>
{henningsen60}
\emph{Henningsen v Bloomfield Motors Inc}, 161 A 2d 69 (NJ 1960)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{henningsen60,
  title = {Henningsen v. Bloomfield Motors Inc.},
  volume = {161},
  reporter = {A.},
  series = {2},
  pages = {69},
  location = {NJ},
  date = {1960},
  keywords = {us}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
<OSCOLA \S2.8.1*>
{roe73}
\emph{Roe v Wade}, 410 US 113, 163–64 (1973)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{roe73,
  title = {Roe v. Wade},
  volume = {410},
  reporter = {U.S.},
  pages = {113, 163--64},
  date = {1973},
  keywords = {us}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
{operadora09}
\emph{Re Operadora DB Mexico SA}, 6:09-cv-383-Orl 022GJK, 2009 WL 2423138 (MD Fla 2009)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{operadora09,
  title = {Re Operadora D.B. Mexico S.A.},
  number = {6:09-cv-383-Orl 022GJK},
  eprint = {2009 WL 2423138},
  court = {M.D. Fla.},
  date = {2009},
  keywords = {us}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\subsubsection{International}

\begin{bibexbox}
{corfu}
\emph{Corfu Channel Case (UK v Albania)} (Merits) [1949] ICJ Rep 4
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{corfu,
  title = {Corfu Channel Case},
  subtitle = {UK v Albania},
  titleaddon = {Merits},
  date = {1949},
  journaltitle = {ICJ Rep},
  pages = {4},
  keywords = {int}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
{nicaragua}
\emph{Land, Island and Maritime Frontier Case (El Salvador/Honduras, Nicaragua intervening)} (Application for Intervention) [1994] ICJ Rep 92
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{nicaragua,
  title = {Land, Island and Maritime Frontier Case},
  subtitle = {El Salvador\slash Hon\-duras, Nicaragua intervening},
  titleaddon = {Application for Intervention},
  date = {1994},
  journaltitle = {ICJ Rep},
  pages = {92},
  keywords = {int}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
{wall}
\emph{Legal Consequences of the Construction of a Wall} (Advisory Opinion) (2004), \url{http://www.icj-cij.org/icjwww/imwp/imwpframe.htm}, accessed 21 July 2005
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{wall,
  title = {Legal Consequences of the Construction of a Wall},
  titleaddon = {Advisory Opinion},
  date = {2004},
  url = {http://www.icj-cij.org/icjwww/imwp/imwpframe.htm},
  urldate = {2005-07-21},
  pagination = {[]},
  keywords = {int}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
{chorzow}
\emph{Case Concerning the Factory at Chorzów (Germany v Poland)} (Merits) [1928] PCIJ Rep Series A No 17
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@jurisdiction{chorzow,
  title = {Case Concerning the Factory at Chorzów},
  indextitle = {Chorzów Factory Case},
  subtitle = {Germany v Poland},
  titleaddon = {Merits},
  journaltitle = {PCIJ Rep},
  series = {A},
  pages = {17},
  date = {1928},
  keywords = {int}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\section{Legislation}

Use the \code{legislation} entry type for citing Acts, Bills, Orders, Measures, and the like.

\subsection{UK legislation}

\tip{Specify an \code{entrysubtype} of \code{primary} for primary legislation.
  This ensures only the title and year are printed.}

\begin{bibexbox}
<OGS \S13.2.3>
{fwa1891}
Factory and Workshop Act 1891
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@legislation{fwa1891,
  entrysubtype = {primary},
  title = {Factory and Workshop Act},
  shorttitle = {FWA 91},
  date = {1891},
  pagination = {section},
  keywords = {en},
  number = {54 \& 55 Vict, c. 75}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
<OSCOLA \S2.4.6>
{learner08}
Learner Travel (Wales) Measure 2008 (nawm 2)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@legislation{learner08,
  title = {Learner Travel (Wales) Measure},
  date = {2008},
  number = {nawm 2},
  keywords = {cy},
  entrysubtype = {primary},
  pagination = {section}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
<OSCOLA \S2.4.5>
{confund}
  Consolidated Fund HC Bill (2008–09) [5]
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@legislation{confund,
  title = {Consolidated Fund Bill},
  date = {2008/2009},
  institution = {HC},
  number = {5},
  keywords = {gb, draft},
  entrysubtype = {primary},
  pagination = {clause}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
<OSCOLA \S2.4.5>
{academies}
Academies HL Bill (2010–11) 1
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@legislation{academies,
  title = {Academies Bill},
  date = {2010/2011},
  institution = {HL},
  number = {1},
  keywords = {gb, draft},
  entrysubtype = {primary},
  pagination = {clause}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
<OSCOLA \S2.4.4>
{charitiesnotes}
Explanatory Notes on the Charities Act 2006
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@legal{charitiesnotes,
  title = {Explanatory Notes on the Charities Act 2006},
  indextitle = {Charities Act 2006, Explanatory Note},
  pagination = {paragraph},
  entrysubtype = {explanatory note}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\tip{Specify an \code{entrysubtype} of \code{secondary} for secondary legislation.
  The number is then printed as well.}

\begin{bibexbox}
<NHR \S13.5.1>
{lap1897}
Local Authority Precepts Order 1897, SR~\&~O 1897/201
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@legislation{lap1897,
  entrysubtype = {secondary},
  title = {Local Authority Precepts Order},
  date = {1897},
  number = {SR~\&~O 1897\slash 201},
  pagination = {rule}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
<OSCOLA \S2.5.3>
{eggs}
Eggs and Chicks (England) Regulations 2009, SI 2009/2163
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@legislation{eggs,
  entrysubtype = {secondary},
  title = {Eggs and Chicks (England) Regulations},
  date = {2009},
  number = {SI 2009\slash 2163},
  pagination = {regulation}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

%<*n>
\begin{egcite}{\emph{Eggs and Chicks (England) Regulations}, reg.~7(3)}
\cite[\pno~7(3)]{eggs}
\end{egcite}
%</n>
%<*m|a>
\begin{egcite}{}
\textcite[\pno~7(3)]{eggs}
\end{egcite}
%</m|a>
%<*y>
\begin{egcite}{}
\parencite[\pno~7(3)]{eggs}
\end{egcite}
%</y>

\subsection{European legislation}

As with European cases, European legislation should be given the \val{eu} keyword.
This is currently the only keyword that makes a difference to the formatting.

According to both the \emph{Oxford Guide to Style} and \emph{New Hart's Rules},
you can provide an even sparser reference for primary European legislation.

%<*n>
\begin{egcite}{EC Treaty (Treaty of Rome, as amended), art.~3b}
\cite[\pno~3b]{ECT:Rome}
\end{egcite}
%</n>
%<*m|a>
\begin{egcite}{}
\textcite[\pno~3b]{ECT:Rome}
\end{egcite}
%</m|a>
%<*y>
\begin{egcite}{}
\parencite[\pno~3b]{ECT:Rome}
\end{egcite}
%</y>

\begin{bibexbox}
%<n><OGS \S13.2.7*>
%<y><OGS \S13.2.7*\textdagger>
{ECT:Rome}%
EC Treaty
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@legislation{ECT:Rome,
  entrysubtype = {eu-treaty},
  title = {EC Treaty},
%<!m|a|y>  shorthandintro = {Treaty of Rome, as amended},
%<!m|a>  shorthand = {EC Treaty},
  pagination = {article},
  keywords = {eu}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

If this seems scandalously short, you may prefer to provide a full reference (including the relevant entry in the OJ or OJ Spec Ed) for the bibliography and use, say, \cs{citetitle} for citations.

\begin{bibexbox}
<OSCOLA \S2.6.1>
{teu}
Consolidated Version of the Treaty on European Union [2008] OJ C115/13
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@legislation{teu,
  entrysubtype = {eu-treaty},
  title = {Consolidated Version of the Treaty on European Union},
  indextitle = {Treaty on European Union},
  date = {2008},
  journaltitle = {OJ},
  series = {C},
  volume = {115},
  pages = {13},
  pagination = {article},
  keywords = {eu}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

Secondary legislation should always have a full reference.

\begin{bibexbox}
<NHR \S13.5.2>
{EC:97/1}
Council Directive (EC) 97/1 on banking practice [1997] OJ L234/3
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@legislation{EC:97/1,
  title = {Council Directive (EC) 97/1 on banking practice},
  date = {1997},
  journaltitle = {OJ},
  series = {L},
  issue = {234},
  pages = {3},
  pagination = {article},
  keywords = {eu}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
<NHR \S13.5.2>
{EEC:1017/68}
Council Regulation (EEC) 1017/68 applying rules of competition to transport [1968] OJ Spec Ed 302
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@legislation{EEC:1017/68,
  title = {Council Regulation (EEC) 1017/68 applying rules of competition to transport},
  date = {1968},
  journaltitle = {OJ Spec Ed},
  pages = {302},
  pagination = {article},
  keywords = {eu}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\tip{Add amendment notices to the \code{note} field; \pkg[biblatex]{oxref} does not, sadly, provide a clever way of constructing these from their component parts so you have to write them verbatim.}

\begin{bibexbox}
<NHR \S13.5.2>
{ECN:1986}
Commission Notice on agreements of minor importance [1986] OJ C231/2, as amended [1994] OJ C368/20
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@legislation{ECN:1986,
  title = {Commission Notice on agreements of minor importance},
  date = {1986},
  journaltitle = {OJ},
  series = {C},
  issue = {231},
  pages = {2},
  note = {as amended [1994] OJ C368/20},
  keywords = {eu}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}


\section{Treaties}

Treaties use the \code{legal} entry type, with \code{piltreaty} as the \code{entrysubtype}.

\tip{Don't use the \code{date} field for treaties; instead, use the \code{execution} field to give a list of dates. Each date should be given in the form \meta{type}=\meta{year-month-day}, where \meta{type} is one of \key{opened}, \key{signed}, \key{adopted}, or \key{inforce}. The dates won't be sorted; they will be printed in the order given.}

\begin{bibexbox}
<NHR \S13.6*>
{refugees}
Convention Relating to the Status of Refugees (adopted 28 July 1951, entered into force 22 Apr.\@ 1954) 189 UNTS 137
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@legal{refugees,
  entrysubtype = {piltreaty},
  title = {Convention Relating to the Status of Refugees},
%<!m&!a>  shorthand = {Refugee Convention},
  execution = {adopted=1951-07-28 and inforce=1954-04-22},
  pagination = {article},
  volume = {189},
  journaltitle = {UNTS},
  pages = {137}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

%<*y>
\tip{Since the lack of a \code{date} field may cause an inaccurate \enquote{n.d.\@} label to be printed, use the \code{shorthand} field to provide a sensible citation label. You could use \cs{citetitle} the first time to ensure the reader can find it in the bibliography. You can also suppress the \enquote{n.d.\@} label by specifying \code{sortyear} or using the \key{nonodate} option.}

\begin{egcite}{(Refugee Convention: art.\@ 24)}
  \parencite[24]{refugees}
\end{egcite}

%</y>

\begin{bibexbox}
{echr:treaty}
Convention for the Protection of Human Rights and Fundamental Freedoms (opened for signature 4 Nov.\@ 1950, entered into force 3 Sept.\@ 1953) 213 UNTS 221, as amended by Protocol No 14bis to the Convention for the Protection of Human Rights and Fundamental Freedoms (opened for signature 27 May 2009, entered into force 1 Sept.\@ 2009) CETS No. 204
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@legal{echr:treaty,
  entrysubtype = {piltreaty},
  title = {Convention for the Protection of Human Rights and Fundamental Freedoms},
  execution = {opened=1950-11-04 and inforce=1953-09-03},
  volume = {213},
  reporter = {UNTS},
  pages = {221},
  shorthand = {ECHR},
  related = {echr:protocol},
  relatedtype = {amendedby}}
@legal{echr:protocol,
  entrysubtype = {piltreaty},
  title = {Protocol No 14bis to the Convention for the Protection of Human Rights
    and Fundamental Freedoms},
  execution = {opened=2009-05-27 and inforce=2009-09-01},
  series = {CETS},
  number = {204}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\section{Hansard}

References to Hansard use the \code{legal} entry type, with \code{parliamentary} as the \code{entrysubtype}.

\tip{For debates since 1909, give \code{Hansard} as the \code{title} and put either \code{HC} or \code{HL} in the \code{type} field.}

\tip{Put the column numbers in the \code{pages} field, and put \code{column} in the \code{bookpagination} field.}

\begin{bibexbox}
<NHR \S13.7.3*>
{hc357}
Hansard, HC vol.\@ 357, cols.\@ 234–45 (13 Apr.\@ 1965)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@legal{hc357,
  entrysubtype = {parliamentary},
  title = {Hansard},
  type = {HC},
  volume = {357},
  pages = {234-245},
  date = {1965-04-13},
  bookpagination = {column}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\tip{For debates before 1909, give \code{Parl. Deb.} as the \code{title}.}

\begin{bibexbox}
<NHR \S13.7.3*>
{pd4/24}
Parl.\@ Deb.\@ (series 4) vol.\@ 24, col.\@ 234 (24 Mar.\@ 1895)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@legal{pd4/24,
  entrysubtype = {parliamentary},
  title = {Parl\adddotspace Deb\adddot},
  series = {4},
  volume = {24},
  pages = {234},
  date = {1895-03-24},
  bookpagination = {column}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}


\section{Legal reports}

Reports of Parliamentary select committees and the Law Commission should be entered using the \code{report} entry type, with the \code{entrysubtype} set to \code{legal}.

\tip{To print the identifying codes within the publication block, put them all in \code{number}; do not specify a \code{type} or \code{series}.}

\begin{bibexbox}
%<n|m><NHR \S13.7.2>
%<a|y><NHR \S13.7.2\textdagger>
{lc2009icl}
%<n|m>Law Commission, \emph{Intoxication and Criminal Liability} (Law Comm No 314, Cm 7526, 2009) para 1.15
%<a|y>Law Commission (2009), \emph{Intoxication and Criminal Liability} (Law Comm No 314, Cm 7526) para 1.15
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@report{lc2009icl,
  entrysubtype = {legal},
  author = {{Law Commission}},
  title = {Intoxication and Criminal Liability},
  number = {Law Comm No 314, Cm 7526},
  date = {2009},
  pages = {1.15},
  bookpagination = {paragraph}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}


\section{Commentaries}

\pkg[biblatex]{Oxref} does not provide any special formatting for legal commentaries;
it provides the \code{commentary} entry type simply as an alias for \code{book}.


\chapter{Specialist materials}\label{sec:special}
\chapterprecis{misc, unpublished, letter, manuscript}

\section{Poems}\label{sec:poem}

\subsection{Short poems}

\tip{Use the \code{incollection} entry type for a poem in a collection.
  If it appears in an article or a work that is itself in a collection,
  use the \code{misc} entry type for the poem, with a relation of type \code{in} pointing to the containing work.}

\begin{bibexbox}
%<n|m><OGS \S15.8>
%<a|y><OGS \S15.8\textdagger>
{auden1990era}
%<n|m>W. H. Auden, \enquote{Es regnet auf mir in den Schottische Lände} [\emph{sic}], in \enquote{The German Auden: Six Early Poems}, trans. David Constantine, in Katherine Bucknell and Nicholas Jenkins (eds.), \emph{W. H. Auden, \enquote{The Map of All my Youth}: Early Works, Friends, and Influences} (Auden Studies, 1; Oxford, 1990), 1–15 at 6.
%<a|y>Auden, W. H. (n.d.), \enquote{Es regnet auf mir in den Schottische Lände} [\emph{sic}], in \enquote{The German Auden: Six Early Poems}, trans. D. Constantine, in K. Bucknell and N. Jenkins (eds.), \emph{W. H. Auden, \enquote{The Map of All my Youth}: Early Works, Friends, and Influences} (Auden Studies, 1; Oxford, 1990), 1–15 at 6.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@misc{auden1990era,
  author = {W. H. Auden},
  title = {Es regnet auf mir in den Schottische Lände},
  titleaddon = {\emph{sic}},
  related = {constantine1990gas},
  relatedtype = {in},
  pages = {6}}
@incollection{constantine1990gas,
  title = {The {German} {Auden}},
  subtitle = {Six Early Poems},
  author = {David Constantine},
  authortype = {translator},
  options = {useauthor=false},
  editor = {Katherine Bucknell and Nicholas Jenkins},
  booktitle = {W. H. Auden, \enquote{The Map of All my Youth}},
  booksubtitle = {Early Works, Friends, and Influences},
  series = {Auden Studies},
  number = {1},
  location = {Oxford},
  date = {1990},
  pages = {1-15}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}


\begin{bibexbox}
%<n|m><OGS \S15.8>
%<a|y><OGS \S15.8\textdagger>
{blois1993qff}
%<n|m>William of Blois, \enquote{The Quarrel of the Flea and the Fly} (\emph{Pulicis et musce iurgia}), trans. in Jan M. Ziolkowski, \emph{Talking Animals: Medieval Latin Beast Poetry, 750-1150} (Middle Ages Series, ed. Edward Peters; Philadelphia: University of Pennsylvania Press, 1993), 274–8.
%<a|y>William of Blois (n.d.), \enquote{The Quarrel of the Flea and the Fly} (\emph{Pulicis et musce iurgia}), trans. in Ziolkowski, J. M., \emph{Talking Animals: Medieval Latin Beast Poetry, 750-1150} (Middle Ages Series, ed. E. Peters; Philadelphia: University of Pennsylvania Press, 1993), 274–8.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@misc{blois1993qff,
  author = {{William of Blois}},
  title = {The Quarrel of the Flea and the Fly},
  origtitle = {Pulicis et musce iurgia},
  related = {ziolkowski1993tam},
  relatedtype = {in},
  relatedstring = {trans.\@ in},
  pages = {274-278}}
@book{ziolkowski1993tam,
  author = {Jan M. Ziolkowski},
  title = {Talking Animals},
  subtitle = {Medieval Latin Beast Poetry, 750-1150},
  series = {Middle Ages Series},
  serieseditor = {Edward Peters},
  location = {Philadelphia},
  publisher = {University of Pennsylvania Press},
  date = {1993}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\subsection{Long poems}

If a poem is divided into cantos, the title is set in italics rather than quoted.

\tip{To achieve this, use the entry type \code{book} if the poem is published on its own,
  and \code{bookinbook} with entry subtype \code{poem} if the poem is published in an anthology.}

\tip{To assist with quoting passages, \pkg[biblatex]{oxref} provides the additional pagination types
  \code{book}, \code{canto}, and \code{stanza} (\code{line} is already defined),
  though in reality you are probably better off doing it by hand.}

%<*n>
\begin{egcite}{\dots 1590–6), bk. ii, canto vi, stanza iii}
\cite[\pno~ii, canto vi, stanza iii]{spenser1965fq}
\end{egcite}
%</n>
%<*m|a>
\begin{egcite}{}
\textcite[\pno~ii, canto vi, stanza iii]{spenser1965fq}
\end{egcite}
%</m|a>
%<*y>
\begin{egcite}{}
\parencite[\pno~ii, canto vi, stanza iii]{spenser1965fq}
\end{egcite}
%</y>

\begin{bibexbox}
%<n|m><OGS \S15.8*>
%<a|y><OGS \S15.8*\textdagger>
{spenser1965fq}%
%<n|m>Edmund Spenser, \emph{The Faerie Queene} (Everyman's Library, 443–4; London: Dent, 1965–6) (originally pub. 1590–6).
%<a|y>Spenser, E. (1590–6), \emph{The Faerie Queene} (Everyman's Library, 443–4; London: Dent, 1965–6).
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@book{spenser1965fq,
  author = {Edmund Spenser},
  title = {The Faerie Queene},
  shorttitle = {Faerie Queene},
  series = {Everyman's Library},
  number = {443--4},
  location = {London},
  publisher = {Dent},
  date = {1965/1966},
  origdate = {1590/1596},
  pagination = {book}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}


\section{Plays}\label{sec:play}

Play titles, like those of epic poems, are set in italics rather than quoted.

\tip{To achieve this, use the entry type \code{book} if the play is published on its own,
  and \code{bookinbook} with entry subtype \code{play} if the play is published in an anthology.}

\tip{To assist with quoting passages, \pkg[biblatex]{oxref} provides the additional pagination types
  \code{act} and \code{scene} (\code{line} is already defined),
  though in reality you are probably better off doing it by hand.}


\section{Manuscripts}\label{sec:ms}

%<*y>
An author–date system like \textsf{oxyear} does not really lend itself to manuscript references,
but support is provided anyway for the sake of completeness.

%</y>
%<n|m>\spec{Author, \enquote{Title}/Descriptor, Date, Archive, Location, Collection Series, Shelfmark, Folios.}
%<a|y>\spec{Author (Year), \enquote{Title}/Descriptor, Date, Archive, Location, Collection Series, Shelfmark, Folios.}

With \pkg[biblatex]{oxref}, you can enter manuscripts in either of two ways. The first uses the \code{unpublished} entry type.

\tip{If the manuscript has a descriptor but no title, put the descriptor in the \code{title} field and annotate the field with the term \enquote{\code{descriptor}}. If you want to supply both a title and a descriptor, put the descriptor in the \code{note} field. Alternatively, you can use the (\pkg[biblatex]{oxref}-specific) \code{descriptor} field, and \pkg[biblatex]{oxref} will handle all this for you.}

\tip{Use \code{author} and \code{date} as normal. Note that the \code{date} will not be printed if both the \code{author} and \code{title}\slash \code{descriptor} fields are left blank.}

\tip{Put the library or archive where the manuscript is kept in the \code{library} field, and the city or place name in the \code{location} field. Note that the \code{library} field is required to switch on the special support for manuscripts.}

\tip{Put the collection name in the \code{series} field and the shelfmark in the \code{number} field.}

\tip{Put the page range studied (or some other subdivision) in the \code{pages} field. You can use \cs{recto} and \cs{verso} for the respective sides of a folio, and you can also specify a \code{pagetotal}.}

\tip{You can use the \code{folio} key in the \code{pagination} and \code{bookpagination} fields.}

\begin{bibexbox}
%<n|m><NHR 18.6.3*>
%<a|y><NHR 18.6.3*\textdagger>
{smithMS23116}
%<n|m>Francis Smith, travel diaries, 1912–7, British Library, Add. MS 23116.
%<a|y>Smith, F. (1912–7), travel diaries, British Library, Add. MS 23116.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@unpublished{smithMS23116,
  author = {Francis Smith},
  descriptor = {travel diaries},
  date = {1912/1917},
  library = {British Library},
  series = {Add. MS},
  number = {23116}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

The second uses the dedicated \code{manuscript} entry type from \textsf{biblatex-manuscripts-philology}.
\pkg[biblatex]{Oxref} does not have all the bells and whistles of that style, but it understands a subset of its data model.

\tip{You can use \code{author}, \code{title}\slash \code{note}\slash \code{descriptor} and \code{date} as described above. (This is a departure from \textsf{biblatex-manuscripts-philology}.)}

\tip{Put the library or archive where the manuscript is kept in the \code{library} field, and the city or place name in the \code{location} field}

\tip{Put the collection name in the \code{collection} field and the shelfmark in the \code{shelfmark} field.}

\tip{If the date is vague (e.g. a century), you can put this in the \code{dating} field. Note that it will only be printed if the \code{date} is missing\slash not printed.}

\tip{Put the page range studied (or some other subdivision) in the \code{pages} field. You can use \cs{recto} and \cs{verso} for the respective sides of a folio, and you can also specify a \code{pagetotal}.}

\tip{You can specify the number of columns (either \code{1} or \code{2}) in the \code{columns} field.}

\tip{You can specify the layer of a palimpsest in the \code{layer} field. Use \code{inf} for the inferior layer and \code{sup} for the superior layer.}

\tip{You can specify the writing support material in the \code{support} field. Three special keys – \code{papyrus}, \code{paper}, and \code{parchment} – are recognized and (potentially) translated, but other values will be printed as-is.}

\begin{bibexbox}
%<n|m><NHR 18.6.2>
%<a|y><NHR 18.6.2\textdagger>
{chaundlerMS288}
%<n|m>Thomas Chaundler, \enquote{Collocutiones}, Balliol College, Oxford, MS288.
%<a|y>Chaundler, T. (n.d.), \enquote{Collocutiones}, Balliol College, Oxford, MS288.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@manuscript{chaundlerMS288,
  author = {Thomas Chaundler},
  title = {Collocutiones},
  library = {Balliol College},
  location = {Oxford},
  shelfmark = {MS288}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
%<n|m><NHR 18.6.2>
%<a|y><NHR 18.6.2\textdagger>
{exchequerE311}
%<n|m>exchequer accounts, Dec. 1798, Cheshire Record Office, E311.
%<a|y>exchequer accounts (1798), Dec., Cheshire Record Office, E311.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@manuscript{exchequerE311,
  descriptor = {exchequer accounts},
  date = {1798-12},
  library = {Cheshire Record Office},
  shelfmark = {E311}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
%<n|m><NHR 18.6.3>
%<a|y><NHR 18.6.3\textdagger>
{blcBOX19d}
%<n|m>Bearsden Ladies' Club minutes, 12 June 1949, Bearsden and Milngavie District Libraries, box 19/d.
%<a|y>Bearsden Ladies' Club minutes (1949), 12 June, Bearsden and Milngavie District Libraries, box 19/d.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@manuscript{blcBOX19d,
  title = {Bearsden Ladies' Club minutes},
  title+an = {=descriptor},
  date = {1949-06-12},
  library = {Bearsden and Milngavie District Libraries},
  shelfmark = {box 19/d}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
%<n|m><NHR 18.6.5>
%<a|y><NHR 18.6.5\textdagger>
{bodMSrawl-d520}
%<n|m>Bodleian Library, Oxford, MS Rawlinson D. 520, fo. 7.
%<a|y>Bodleian Library (n.d.), Oxford, MS Rawlinson D. 520, fo. 7.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@manuscript{bodMSrawl-d520,
  library = {Bodleian Library},
  location = {Oxford},
  collection = {MS Rawlinson D.},
  shelfmark = {520},
  pages = {7},
  bookpagination = {folio}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\begin{bibexbox}
{cantabAGM4429}
(not in book)
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@manuscript{cantabAGM4429,
  library = {University Library},
  location = {Cambridge},
  collection = {Add. Greek MS},
  shelfmark = {4489},
  support = {parchment},
  dating = {8th--9th c.},
  pagetotal = {16},
  columns = {1},
  pages = {11\recto-11\verso},
  layer = {inf},
  bookpagination = {folio}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

%<*y>
\begin{egcite}{(Bodleian Library, n.d.; Chaundler, n.d.; exchequer accounts 1798)}
\parencite{chaundlerMS288,%
  exchequerE311,%
  bodMSrawl-d520}
\end{egcite}
%</y>


\section{Letters}

These examples relate to letters held personally or online. For letters that
form part of archival collections, see the section on manuscripts above.

Note that it is usually acceptable to exclude personal communications from
the reference section, and simply cite them in the text (in which case you may
not need the \pkg{biblatex} machinery).

%<n|m>\spec{Author, \enquote{Title}/Descriptor, Date.}
%<a|y>\spec{Author (Year), \enquote{Title}/Descriptor, Date.}

\begin{bibexbox}
%<n|m><OGS \S15.11.1*>
%<a|y><OGS \S15.11.1*\textdagger>
{anon2001pl}
%<n|m>Personal letter to the author, 2 May 2001.
%<a|y>Personal letter to the author (2001), 2 May.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@letter{anon2001pl,
  title = {Personal letter to the author},
  title+an = {=descriptor},
  date = {2001-05-02}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

In the absence of any explicit rationale governing whether the date is
parenthetical, in \pkg[biblatex]{oxref} the presence of a URL
will trigger the use of parentheses.

%<n|m>\spec{Author, \enquote{Title}/Descriptor [HowPublished], (Date), OnlineAccess.}
%<a|y>\spec{Author (Year), \enquote{Title}/Descriptor [HowPublished], (Date), OnlineAccess.}

\begin{bibexbox}
%<n|m><OGS \S15.15.3*>
%<a|y><OGS \S15.15.3*\textdagger>
{ritter2001rp}%
%<n|m>R. M. Ritter, \enquote{Revised proofs} [email to H. E. Cox], (1 Aug.\@ 2001), \url{ogs@ritter.org.uk}, accessed 3 Aug.\@ 2001.
%<a|y>Ritter, R. M. (2001), \enquote{Revised proofs} [email to H. E. Cox], (1 Aug.\@), \url{ogs@ritter.org.uk}, accessed 3 Aug.\@ 2001.
\tcblower
\begin{Verbatim}
%</n|m|a|y>
@letter{ritter2001rp,
  author = {R. M. Ritter},
  title = {Revised proofs},
  howpublished = {email to H. E. Cox},
  date = {2001-08-01},
  url = {ogs@ritter.org.uk},
  urldate = {2001-08-03}}
%<*n|m|a|y>
\end{Verbatim}
\end{bibexbox}

\defbibnote{preface}{This document uses the \pkg{biblatex} option \key{backref}
to demonstrate how entries can be marked with the page(s) on which they were
cited. The format of the back references comes from \pkg{biblatex} itself
rather than \pkg[biblatex]{oxref}.}

%<n|a|y>\printbibliography[notcategory=hidden]
%<m>\printbibliography[notcategory=hidden,prenote=preface]
%</n|m|a|y>
%</doc|bib>
%<*driver>
\fi
\DocInput{\jobname.dtx}
%</driver>
%<*driver|doc>
\end{document}
%</driver|doc>
%<*bbx>
% \fi
% \chapter{Bibliography styles}
%
% \settocdepth{subsection}
%
% \iffalse %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%<*o>
% \fi %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \section{Base style: oxref.bbx}
%
% \setcounter{FancyVerbLine}{19}
%
% \subsection{Loading dependencies, setting up languages, applying options}
% \label{sec:setup}
%
% Dependencies:
% \begin{itemize}
% \item
% For ease of maintenance, we will patch some definitions with \pkg{xpatch}
% instead of writing out our own in full.
% \item
% We will manipulate strings with \pkg{xstring}.
% \item
% We will use \pkg{graphicx} for stretching \cs{bibnamedash}es
% \end{itemize}
%
%    \begin{macrocode}
\RequirePackage{etoolbox}
\RequirePackage{xpatch}
\RequirePackage{xstring}
\RequirePackage{graphicx}
%    \end{macrocode}
%
% Language support may be widened in future, but for now we support British and
% American English. Adapted language files have the following suffix.
%
%    \begin{macrocode}
\DeclareLanguageMappingSuffix{-oxref}
%    \end{macrocode}
%
% We provide some additional bibliography strings:
%
% \begin{itemize}
%   \item roles expressed as functions;
% \end{itemize}
%
%    \begin{macrocode}
\NewBibliographyString{%
  director, performer, reader, conductor, serieseditor, holder, editorcm,
  directors, performers, readers, conductors, serieseditors, holders, editorcms,
%    \end{macrocode}
%
% \begin{itemize}
%   \item roles expressed as actions;
% \end{itemize}
%
%    \begin{macrocode}
  bydirector, byperformer, byreader, byconductor, byserieseditor, byholder, byeditorcm,
%    \end{macrocode}
%
% \begin{itemize}
%   \item publication details;
% \end{itemize}
%
%    \begin{macrocode}
  facsimile, revised, revisedenlarged, revisedreprint, suppto, equals, original, amendedby,
%    \end{macrocode}
%
% \begin{itemize}
%   \item publication state;
% \end{itemize}
%
%    \begin{macrocode}
  inpressin,
%    \end{macrocode}
%
% \begin{itemize}
%   \item pagination;
% \end{itemize}
%
%    \begin{macrocode}
  book, books, canto, cantos, stanza, stanzas, act, acts, scene, scenes, folio, folios,
  article, articles, clause, clauses, regulation, regulations, rule, rules,
  booktotal, booktotals, cantototal, cantototals, stanzatotal, stanzatotals,
  acttotal, acttotals, scenetotal, scenetotals, foliototal, foliototals,
  articletotal, articletotals, clausetotal, clausetotals, regulationtotal,
  regulationtotals, ruletotal, ruletotals,
%    \end{macrocode}
%
% \begin{itemize}
%   \item types;
% \end{itemize}
%
%    \begin{macrocode}
  facebook, tweet, podcast, clip, webcast, poster,
%    \end{macrocode}
%
% \begin{itemize}
%   \item miscellaneous;
% \end{itemize}
%
%    \begin{macrocode}
  nolocation, modified, recorded, uploaded, filed, issued,
%    \end{macrocode}
%
% \begin{itemize}
%   \item labels;
% \end{itemize}
%
%    \begin{macrocode}
  anon, pseudo, urldown,
%    \end{macrocode}
%
% \begin{itemize}
%   \item country names, patents, and patent requests;
% \end{itemize}
%
%    \begin{macrocode}
  countryjp, patentjp, patreqjp,
%    \end{macrocode}
%
% \begin{itemize}
%   \item borrowed from other styles.
% \end{itemize}
%
%    \begin{macrocode}
  1column, 2column, inflayer, suplayer, paper, papyrus, parchment,
  eucase, eujoinedcases, commissiondecision, application,
  order, bill, draft, opened, signed, adopted, inforce,
}
%    \end{macrocode}
%
% The \cs{blx@ox@langbibstring} utility is used to prefix a bibstring with one
% or more language names, but since this only works in certain languages, by
% default it discards the language names (first argument) and just prints the
% bibstring (second argument). This is overridden in |english-oxref.lbx| and
% friends.
%
%    \begin{macrocode}
\def\blx@ox@langbibstring#1#2{\bibstring{#2}}
%    \end{macrocode}
%
% We base our styles on the standard on the principle of least surprise
% (and to aid with maintenance in the face of new \pkg{biblatex} versions).
% We set some defaults different to the standard ones, but the author can
% still override them.
%
%    \begin{macrocode}
\RequireBibliographyStyle{standard}
\ExecuteBibliographyOptions{urldate=comp,pagetracker,timezeros=false,time=12h,isbn=false}
%    \end{macrocode}
%
% Here are the new default punctuation conventions. The new \cs{recordseriespunct}
% is used for audiovisual resources, while \cs{cacasetitlepunct} and
% \cs{uscasetitlepunct} are for punctuation following the case title in Canadian and
% American cases respectively.
%
%    \begin{macrocode}
\renewcommand*{\labelnamepunct}{\addcomma\space}
\renewcommand*{\newunitpunct}{\addcomma\space}
\renewcommand*{\subtitlepunct}{\addcolon\space}
\renewcommand*{\intitlepunct}{\nopunct\space}
\renewcommand*{\bibnamedash}{\resizebox{2em}{\height}{\textemdash}\addthinspace}
\newcommand*{\recordseriespunct}{\addcomma\space}
\newcommand*{\cacasetitlepunct}{\addcomma\space}
\newcommand*{\uscasetitlepunct}{\addcomma\space}
\renewcommand*{\relateddelim}{\addsemicolon\space}
\DeclareDelimFormat{revsdnamedelim}{\addcomma}
\DeclareDelimFormat{authortypedelim}{\addspace}
\DeclareDelimFormat{editortypedelim}{\addspace}
\DeclareDelimFormat{translatortypedelim}{\addspace}
%    \end{macrocode}
%
% \subsection{Names}
%
% We declare some new name formats so that authors/editors/others who appear
% mid-reference can be handled differently from those that appear at the
% head of the reference.
%
%    \begin{macrocode}
\DeclareNameAlias{bookauthor}{default}
\DeclareNameAlias{bookeditor}{default}
%    \end{macrocode}
%
% Traditionally, Oxford style (for the humanities) prints author names in
% small capitals in the bibliography, but in normal case in citations. This is
% falling out of fashion, so we introduce it as an option.
%
%    \begin{macrocode}
\newtoggle{blx@ox@scnames}
\DeclareBibliographyOption{scnames}[true]{%
  \settoggle{blx@ox@scnames}{#1}
}
%    \end{macrocode}
%
% The style manuals prefer to omit titles but accept they may need to be
% included in some circumstances. There are some titles that are only used
% with full names and some that may be used with initials, so we provide an
% option for manually switching them off.
%
%    \begin{macrocode}
\newtoggle{blx@ox@nametitle}\toggletrue{blx@ox@nametitle}%
\DeclareBiblatexOption{global,type,entry}{usenametitles}[true]{%
  \settoggle{blx@ox@nametitle}{#1}}
%    \end{macrocode}
%
% We provide some additional macros for formatting names with titles.
% Here is the one for natural name order.
%
%    \begin{macrocode}
\newbibmacro*{name:title-given-family}[5]{%
  \usebibmacro{name:delim}{#2#3#1}%
  \usebibmacro{name:hook}{#2#3#1}%
  \ifdefvoid{#5}{}{\iftoggle{blx@ox@nametitle}{\mkbibnametitle{#5}\isdot\bibnamedelimd}{}}%
  \ifdefvoid{#2}{}{\mkbibnamegiven{#2}\isdot\bibnamedelimd}%
  \ifdefvoid{#3}{}{%
    \mkbibnameprefix{#3}\isdot
    \ifprefchar
      {}
      {\ifuseprefix{\bibnamedelimc}{\bibnamedelimd}}}%
  \mkbibnamefamily{#1}\isdot
  \ifdefvoid{#4}{}{\ifnumeral{#4}{}{\addcomma}\bibnamedelimd\mkbibnamesuffix{#4}\isdot}}
%    \end{macrocode}
%
% Here is the one for inverted name order.
%
%    \begin{macrocode}
\newbibmacro*{name:family-title-given}[5]{%
  \ifuseprefix{%
    \usebibmacro{name:delim}{#3#1}%
    \usebibmacro{name:hook}{#3#1}%
    \ifdefvoid{#3}{}{%
      \ifcapital{%
        \mkbibnameprefix{\MakeCapital{#3}}\isdot
      }{%
        \mkbibnameprefix{#3}\isdot}%
      \ifprefchar{}{\bibnamedelimc}}%
    \mkbibnamefamily{#1}\isdot
    \ifdefvoid{#4}{}{\ifnumeral{#4}{}{\addcomma}\bibnamedelimd\mkbibnamesuffix{#4}\isdot}%
    \ifboolexpe{%
      (test {\ifdefvoid{#5}} or not togl {blx@ox@nametitle})
      and
      test {\ifdefvoid{#2}}%
    }{}{%
      \printdelim{revsdnamedelim}}%
    \ifdefvoid{#5}{}{\iftoggle{blx@ox@nametitle}{\bibnamedelimd\mkbibnametitle{#5}\isdot}{}}%
    \ifdefvoid{#2}{}{\bibnamedelimd\mkbibnamegiven{#2}\isdot}%
  }{%
    \usebibmacro{name:delim}{#1}%
    \usebibmacro{name:hook}{#1}%
    \mkbibnamefamily{#1}\isdot
    \ifdefvoid{#4}{}{\ifnumeral{#4}{}{\addcomma}\bibnamedelimd\mkbibnamesuffix{#4}\isdot}%
    \ifboolexpe{%
      (test {\ifdefvoid{#5}} or not togl {blx@ox@nametitle})
      and
      test {\ifdefvoid{#2}}
      and
      test {\ifdefvoid{#3}}%
    }{}{%
      \printdelim{revsdnamedelim}}%
    \ifdefvoid{#5}{}{\iftoggle{blx@ox@nametitle}{\bibnamedelimd\mkbibnametitle{#5}\isdot}{}}%
    \ifdefvoid{#2}{}{\bibnamedelimd\mkbibnamegiven{#2}\isdot}%
    \ifdefvoid{#3}{}{\bibnamedelimd\mkbibnameprefix{#3}\isdot}}}
%    \end{macrocode}
%
% Oxford style (for the humanities) is to write author names surname first in
% the bibliography, but in natural order in citations. We implement this, along
% with the case changing option, in the following name format. We also add a
% second hash for checking if names (e.g.\@ |author| and |authoraddon|) are the
% same.
%
%    \begin{macrocode}
\def\blx@ox@lasthash{}
\DeclareNameFormat{bib-family-given/cite-given-family}{%
  \iffieldannotation{inferred}{\ifnumequal{\value{listcount}}{1}{\bibopenbracket}{}}{}%
  \ifitemannotation{inferred}{\bibopenbracket}{}%
  \ifbibliography{%
    \iftoggle{blx@ox@scnames}{%
      \renewcommand*{\mkbibnamefamily}[1]{\textsc{##1}}%
      \renewcommand*{\mkbibnamegiven}[1]{\textsc{##1}}%
      \renewcommand*{\mkbibnameprefix}[1]{\textsc{##1}}%
      \renewcommand*{\mkbibnamesuffix}[1]{\textsc{##1}}%
      \renewcommand*{\mkbibnametitle}[1]{##1}%
    }{}%
    \ifgiveninits{%
      \usebibmacro{name:family-title-given}%
        {\namepartfamily}%
        {\namepartgiveni}%
        {\namepartprefix}%
        {\namepartsuffix}%
        {\nameparttitle}%
    }{%
      \usebibmacro{name:family-title-given}%
        {\namepartfamily}%
        {\namepartgiven}%
        {\namepartprefix}%
        {\namepartsuffix}%
        {\nameparttitle}%
    }%
    \savefield{hash}{\blx@ox@lasthash}%
    \ifitemannotation{pseudo}{%
      \addspace\printtext[parens]{%
        \iftoggle{blx@ox@scnames}{%
          \textsc{\bibsstring{pseudo}}%
        }{%
          \bibsstring{pseudo}%
        }}%
    }{}%
    \iftoggle{blx@ox@scnames}{%
      \renewcommand*{\mkbibnamefamily}[1]{##1}%
      \renewcommand*{\mkbibnamegiven}[1]{##1}%
      \renewcommand*{\mkbibnameprefix}[1]{##1}%
      \renewcommand*{\mkbibnamesuffix}[1]{##1}%
      \renewcommand*{\mkbibnametitle}[1]{##1}%
    }{}%
    \ifboolexpe{%
      test {\ifnumgreater{\value{listcount}}{1}}
      or (
        test {\ifdefvoid\namepartgiven}
        and
        test {\ifdefvoid\namepartprefix}
      )
    }{}{\usebibmacro{name:revsdelim}}%
  }{%
    \ifgiveninits{%
      \usebibmacro{name:title-given-family}%
        {\ifitemannotation{pseudo}{\biblstring{pseudo}}{}\namepartfamily}%
        {\namepartgiveni}%
        {\namepartprefix}%
        {\namepartsuffix}%
        {\nameparttitle}%
    }{%
      \usebibmacro{name:title-given-family}%
        {\ifitemannotation{pseudo}{\biblstring{pseudo}}{}\namepartfamily}%
        {\namepartgiven}%
        {\namepartprefix}%
        {\namepartsuffix}%
        {\nameparttitle}%
    }%
    \savefield{hash}{\blx@ox@lasthash}%
  }%
  \ifitemannotation{inferred}{\bibclosebracket}{}%
  \usebibmacro{name:andothers}%
  \iffieldannotation{inferred}{%
    \ifboolexpr{
      test {\ifnumequal{\value{listcount}}{\value{maxnames}}}
      or
      test {\ifnumequal{\value{listcount}}{\value{listtotal}}}
      or (
        test {\ifnumequal{\value{listcount}}{\value{minnames}}}
        and
        test {\ifnumgreater{\value{listtotal}}{\value{maxnames}}}
      )
    }{\bibclosebracket}{}%
  }{}%
}
%    \end{macrocode}
%
% We change the regular |given-family| format to include the alternative-name
% hash and use the title-enhanced name format. We also add a toggle for
% triggering special formatting if |authoraddon| or |editoraddon| are annotated
% with |variant|.
%
%    \begin{macrocode}
\newtoggle{blx@ox@variantname}
\DeclareNameFormat{given-family}{%
  \ifgiveninits
    {\usebibmacro{name:title-given-family}
      {\namepartfamily}
      {\namepartgiveni}
      {\namepartprefix}
      {\namepartsuffix}
      {\nameparttitle}}
    {\usebibmacro{name:title-given-family}
      {\namepartfamily}
      {\namepartgiven}
      {\namepartprefix}
      {\namepartsuffix}
      {\nameparttitle}}%
  \savefield{hash}{\blx@ox@lasthash}%
  \ifitemannotation{variant}{%
    \global\settoggle{blx@ox@variantname}{true}%
  }{%
    \global\settoggle{blx@ox@variantname}{false}}%
  \usebibmacro{name:andothers}}
%    \end{macrocode}
%
% We do likewise for the regular |family-given| format.
%
%    \begin{macrocode}
\DeclareNameFormat{family-given}{%
  \ifgiveninits
    {\usebibmacro{name:family-title-given}
      {\namepartfamily}
      {\namepartgiveni}
      {\namepartprefix}
      {\namepartsuffix}
      {\nameparttitle}}
    {\usebibmacro{name:family-title-given}
      {\namepartfamily}
      {\namepartgiven}
      {\namepartprefix}
      {\namepartsuffix}
      {\nameparttitle}}%
  \savefield{hash}{\blx@ox@lasthash}%
  \ifitemannotation{variant}{%
    \global\settoggle{blx@ox@variantname}{true}%
  }{%
    \global\settoggle{blx@ox@variantname}{false}}%
  \ifboolexpe{%
    test {\ifnumgreater{\value{listcount}}{1}}
    or (
      test {\ifdefvoid\namepartgiven}
      and
      test {\ifdefvoid\namepartprefix}
    )
  }{}{\usebibmacro{name:revsdelim}}%
  \usebibmacro{name:andothers}}
%    \end{macrocode}
%
% There is no comma before numeric suffixes, but there is before textual
% ones (e.g. \enquote{junior}).
%
%    \begin{macrocode}
\xpatchbibmacro{name:given-family}%
  {\bibnamedelimd\mkbibnamesuffix{#4}}%
  {\ifnumeral{#4}{}{\addcomma}\bibnamedelimd\mkbibnamesuffix{#4}}%
{}{\wlog{WARNING: biblatex-oxref failed to patch name:given-family}}
\xpatchbibmacro{name:family-given}%
  {\bibnamedelimd\mkbibnamesuffix{#4}}%
  {\ifnumeral{#4}{}{\addcomma}\bibnamedelimd\mkbibnamesuffix{#4}}%
{}{\wlog{WARNING: biblatex-oxref failed to patch name:family-given}}
%    \end{macrocode}
%
% Pseudonyms are printed after the main name, enclosed in parentheses (OGS) or
% brackets (NHR). \pkg{Biblatex} provides the |nameaddon| field for this
% use case, but it is a literal field (it doesn't format the name provided).
%
%    \begin{macrocode}
\DeclareFieldFormat{nameaddon}{\mkbibbrackets{#1}}
\DeclareFieldFormat{namevariant}{\mkbibparens{\bibstring{equals}\space #1}}
%    \end{macrocode}
%
% We provide an alternative method that uses new name fields |authoraddon| and
% |editoraddon|. To do this, we define a bibmacro that reimplements the loopcode
% logic of \cs{printnames}, but operates on two name lists simultaneously; we use
% saveboxes to extract the hashes, and only print the alternative name if it has
% a different hash. The same technique is used by \textsf{oxyear} below to pair
% up names with the short form used in references, so this bibmacro is written
% to handle both cases.
%
% The |namepairs| bibmacro takes two arguments: the data fields holding the main
% name and alternative name respectively.
%
%    \begin{macrocode}
\newcounter{namepairs}
\newsavebox{\blx@ox@namebox}
\newsavebox{\blx@ox@altnamebox}
\newbibmacro*{namepairs}[2]{%
  \setcounter{namepairs}{0}%
  \savebibmacro{name:andothers}%
  \renewbibmacro*{name:andothers}{}%
  \whileboolexpr{%
    test {\ifnumless{\value{namepairs}}{\value{#1}}}
    and (
      test {\ifdefvoid{\c@maxnames}}
      or
      test {\ifnumequal{\c@maxnames}{0}}
      or
      test {\ifnumless{\value{#1}}{\c@maxnames}}
      or
      test {\ifnumequal{\value{#1}}{\c@maxnames}}
      or
      test {\ifdefvoid{\c@minnames}}
      or
      test {\ifnumequal{\c@minnames}{0}}
      or
      test {\ifnumless{\value{namepairs}}{\c@minnames}}
    )
  }{%
    \stepcounter{namepairs}%
    \ifnumgreater{\value{namepairs}}{1}{%
      \ifnumequal{\value{#1}}{2}{%
        \setunit*{\addspace\bibstring{and}\addspace}%
      }{%
        \ifnumequal{\value{namepairs}}{\value{#1}}{%
          \setunit*{\addcomma\space\bibstring{and}\addspace}%
        }{%
          \setunit*{\addcomma\space}%
        }%
      }%
    }{}%
    \savebox{\blx@ox@namebox}{%
      \printnames[#1][\value{namepairs}-\value{namepairs}]{#1}%
    }%
    \let\blx@ox@firsthash=\blx@ox@lasthash
%    \end{macrocode}
%
% This is the part intended for |authoraddon| and |editoraddon|. Note that it
% contains an additional test for the variant name toggle.
%
%    \begin{macrocode}
    \IfEndWith{#2}{addon}{%
      \savebox{\blx@ox@altnamebox}{%
        \printnames[by#1][\value{namepairs}-\value{namepairs}]{#2}%
      }%
      \let\blx@ox@secondhash=\blx@ox@lasthash
      \ifdefstrequal{\blx@ox@firsthash}{\blx@ox@secondhash}{%
        \unhbox\blx@ox@namebox
      }{%
        \unhbox\blx@ox@namebox\addspace
        \iftoggle{blx@ox@variantname}{%
          \ifbibliography{%
            \printtext[namevariant]{\printnames[#1][\value{namepairs}-\value{namepairs}]{#2}}%
          }{}%
        }{%
          \printtext[nameaddon]{\unhbox\blx@ox@altnamebox}%
        }%
      }%
%    \end{macrocode}
%
% This is the part intended for |shortauthor| and |shorteditor|. There are
% differences in the formatting, and the alternative name is actually printed
% before the main name.
%
%    \begin{macrocode}
    }{%
      \savebox{\blx@ox@altnamebox}{%
        \printnames[#1][\value{namepairs}-\value{namepairs}]{#2}%
      }%
      \let\blx@ox@secondhash=\blx@ox@lasthash
      \ifdefstrequal{\blx@ox@firsthash}{\blx@ox@secondhash}{%
        \unhbox\blx@ox@namebox
      }{%
        \unhbox\blx@ox@altnamebox
        \addspace\mkbibparens{\unhbox\blx@ox@namebox}%
      }%
    }%
  }%
%    \end{macrocode}
%
% Now we return to common code.
%
%    \begin{macrocode}
  \ifboolexpr{
    test {\ifnumequal{\value{namepairs}}{\c@minnames}}
    and
    test {\ifnumgreater{\value{#1}}{\c@maxnames}}
  }{%
    \ifnumgreater{\c@minnames}{1}{%
      \finalandcomma
    }{}%
    \printdelim{andothersdelim}\bibstring{andothers}%
  }{}%
  \restorebibmacro{name:andothers}%
}
%    \end{macrocode}
%
% We use this now for authors. We provide additional handling to support
% printing editors or translators promoted to joint authorship status.
%
%    \begin{macrocode}
\newbibmacro*{author+altauthor}{%
  \ifboolexpr{
    test {\ifnameundef{authoraddon}}
    and
    test {\ifnameundef{jointauthor}}
  }{%
    \printnames{author}%
  }{%
    \ifnumequal{\value{authoraddon}}{\value{author}}{%
      \usebibmacro{namepairs}{author}{authoraddon}%
    }{%
      \printnames{author}%
      \ifnameundef{authoraddon}{}{%
        \setunit*{\addspace}%
        \printtext[nameaddon]{\printnames[byauthor]{authoraddon}}}%
    }%
    \ifnameundef{jointauthor}{}{%
      \setunit{\addcomma\space}%
      \iffieldundef{jointauthortype}{%
        \bibstring{byeditor}%
      }{%
        \printfield{jointauthortype}}%
      \setunit{\addspace}%
      \printnames[author]{jointauthor}%
    }%
  }%
}
\DeclareFieldFormat{jointauthortype}{%
  \ifbibstring{by#1}{\bibstring{by#1}}{#1}}
%    \end{macrocode}
%
% This is the (simpler) implementation for editors.
%
%    \begin{macrocode}
\newbibmacro*{editor+alteditor}{%
  \ifnameundef{editoraddon}{%
    \printnames{editor}%
  }{
    \ifnumequal{\value{editoraddon}}{\value{editor}}{%
      \usebibmacro{namepairs}{editor}{editoraddon}%
    }{%
      \printnames{editor}%
      \setunit*{\addspace}%
      \printtext[nameaddon]{\printnames[byeditor]{editoraddon}}%
    }%
  }%
}
%    \end{macrocode}
%
% Traditional Oxford style is to use dashes instead of repeating author
% names, but NHR recommends abandoning the practice as it interferes
% with text mining. We therefore turn this feature off by default, but allow
% authors to switch it on with |dashed=true|.
%
%    \begin{macrocode}
\newbibmacro*{bbx:savehash}{}
\DeclareBibliographyOption{dashed}[true]{%
  \ifstrequal{#1}{true}{%
    \ExecuteBibliographyOptions{pagetracker}%
    \renewbibmacro*{bbx:savehash}{\savefield{fullhash}{\bbx@lasthash}}%
  }{%
    \renewbibmacro*{bbx:savehash}{}%
  }%
}
\InitializeBibliographyStyle{%
  \global\undef\bbx@lasthash}
\newbibmacro*{bbx:dashcheck}[2]{%
  \ifboolexpr{
    test {\iffieldequals{fullhash}{\bbx@lasthash}}
    and
    not test \iffirstonpage
    and
    (
      not bool {bbx@inset}
      or
      test {\iffieldequalstr{entrysetcount}{1}}
    )
  }{#1}{#2}%
}
%    \end{macrocode}
%
% The following is used in the |authortitle| and |authoryear| styles to
% switch off the dash check macro for reference sets.
%
%    \begin{macrocode}
\newbool{bbx@inset}
\DeclareBibliographyDriver{set}{%
  \booltrue{bbx@inset}%
  \entryset{}{}%
  \newunit\newblock
  \usebibmacro{setpageref}%
  \finentry}
%    \end{macrocode}
%
% We provide options for how to handle the author name \enquote{Anonymous}.
%
%    \begin{macrocode}
\newtoggle{blx@ox@autoanon}
\newtoggle{blx@ox@abbranon}
\DeclareBibliographyOption[string]{anon}[short]{%
  \ifcsdef{blx@ox@opt@anon@#1}{%
    \csuse{blx@ox@opt@anon@#1}%
  }{%
    \PackageError{biblatex-oxref}
    {Invalid option 'anon=#1'}
    {Valid values are 'long', 'short', and 'literal'.}}}
\csdef{blx@ox@opt@anon@literal}{\togglefalse{blx@ox@autoanon}}
\csdef{blx@ox@opt@anon@long}{\toggletrue{blx@ox@autoanon}\togglefalse{blx@ox@abbranon}}
\csdef{blx@ox@opt@anon@short}{\toggletrue{blx@ox@autoanon}\toggletrue{blx@ox@abbranon}}
%    \end{macrocode}
%
% We copy the |author| to |rawauthor| for easier testing.
%
%    \begin{macrocode}
\DeclareStyleSourcemap{
  \maps[datatype=bibtex]{%
    \map{%
      \step[fieldsource=author]%
      \step[fieldset=rawauthor, origfieldval]%
    }
  }%
}
%    \end{macrocode}
%
% The |author| macro is enhanced from the standard version by
% \begin{itemize}
%   \item
%   checking if the author name is \enquote{Anonymous};
%   \item
%   including a dash check, to see if the name(s) should be replaced
%   with a dash (as in |authortitle| and |authoryear|);
%   \item
%   inserting the |nameaddon| field if provided;
%   \item
%   inserting the author type if provided (as in |authoryear|).
% \end{itemize}
%
%    \begin{macrocode}
\newcommand*{\oxrefanon}{Anonymous}
\newtoggle{blx@ox@isanon}
\renewbibmacro*{author}{%
  \iffieldequals{rawauthor}{\oxrefanon}{%
    \toggletrue{blx@ox@isanon}%
  }{%
    \togglefalse{blx@ox@isanon}}%
  \ifboolexpr{
    test \ifuseauthor
    and
    ( not test {\ifnameundef{author}} )
    and (
      ( not togl {blx@ox@isanon} )
      or
      ( not togl {blx@ox@autoanon} )
      or
      test {\ifbibliography}
    )
  }
  {\usebibmacro{bbx:dashcheck}
    {\bibnamedash}
    {\usebibmacro{bbx:savehash}%
      \ifboolexpr{
        togl {blx@ox@autoanon}
        and
        togl {blx@ox@isanon}
      }{%
        \iftoggle{blx@ox@abbranon}{\bibcpsstring{anon}}{\bibcplstring{anon}}%
      }{%
        \usebibmacro{author+altauthor}%
      }%
      \iffieldundef{nameaddon}
      {}
      {\setunit{\addspace}%
        \printfield{nameaddon}}%
      \setunit{\printdelim{authortypedelim}}}%
    \iffieldundef{authortype}
    {}
    {\usebibmacro{authorstrg}%
      \setunit{\addspace}}}%
  {\global\undef\bbx@lasthash}}
\DeclareFieldFormat{authortype}{\mkbibparens{#1}}
%    \end{macrocode}
%
% We make the punctuation between a title and \enquote{by [author]} configurable.
%
%    \begin{macrocode}
\newcommand{\titlebyauthordelim}{\addcomma\space}
%    \end{macrocode}
%
% Following |authortitle| and |authoryear|, we redefine the |editor| and
% |editor+others| macros to use a common |bbx:editor| macro. The macro
% we use is the similar to the normal one except we delegate printing editor
% names to |editor+alteditor|, and we don't yet add the year label.
%
%    \begin{macrocode}
\renewbibmacro*{editor}{%
  \usebibmacro{bbx:editor}{editorstrg}}
\renewbibmacro*{editor+others}{%
  \usebibmacro{bbx:editor}{editor+othersstrg}}
\newbibmacro*{bbx:editor}[1]{%
  \ifboolexpr{
    test \ifuseeditor
    and
    not test {\ifnameundef{editor}}
  }
  {\usebibmacro{bbx:dashcheck}
    {\bibnamedash}
    {\usebibmacro{editor+alteditor}%
     \setunit{\printdelim{editortypedelim}}%
     \usebibmacro{bbx:savehash}}%
    \usebibmacro{#1}%
    \clearname{editor}}
  {\global\undef\bbx@lasthash}}
\DeclareFieldFormat{editortype}{\mkbibparens{#1}}
%    \end{macrocode}
%
% We do the same for |translator| as well.
%
%    \begin{macrocode}
\renewbibmacro*{translator}{%
  \usebibmacro{bbx:translator}{translatorstrg}}
\renewbibmacro*{translator+others}{%
  \usebibmacro{bbx:translator}{translator+othersstrg}}
\newbibmacro*{bbx:translator}[1]{%
  \ifboolexpr{
    test \ifusetranslator
    and
    not test {\ifnameundef{translator}}
  }
  {\usebibmacro{bbx:dashcheck}
    {\bibnamedash}
    {\printnames{translator}%
      \setunit{\printdelim{translatortypedelim}}%
      \usebibmacro{bbx:savehash}}%
    \usebibmacro{#1}%
    \clearname{translator}%
    \setunit{\addspace}}%
  {\global\undef\bbx@lasthash}}
\xpatchbibmacro{translatorstrg}%
  {\bibstring}%
  {\bibstring[\mkbibparens]}%
{}{\wlog{WARNING: biblatex-oxref failed to patch translatorstrg}}%
\xpatchbibmacro{translator+othersstrg}%
  {\bibstring}%
  {\bibstring[\mkbibparens]}%
{}{\wlog{WARNING: biblatex-oxref failed to patch translator+othersstrg}}%
%    \end{macrocode}
%
% When referencing one work from a collection by the same author,
% Oxford style traditionally puts \enquote{id.} in the |bookauthor|
% position (instead of omitting it as in standard \pkg{biblatex}).
%
%    \begin{macrocode}
\renewbibmacro*{bybookauthor}{%
  \ifnamesequal{author}{bookauthor}%
  {\bibstring{idem\thefield{gender}}}%
  {\printnames{bookauthor}}}
%    \end{macrocode}
%
% Similarly, with mixed collections, if referencing a work by the editor
% of the collection, the editor name is replaced with \enquote{id.}. We
% insert this logic into a copy of the |editor+others| macro, which will
% \emph{not} get a year inserted into it by \textsf{oxyear}.
%
%    \begin{macrocode}
\newbibmacro*{bookeditor}{%
  \ifboolexpr{
    test \ifuseeditor
    and
    not test {\ifnameundef{editor}}
  }{%
    \ifnamesequal{author}{editor}{%
      \bibstring{idem\thefield{gender}}%
      \setunit{\addspace}%
      \usebibmacro{editor+othersstrg}%
      \clearname{editor}%
    }{%
      \printnames[bookeditor]{editor}%
      \setunit*{\addspace}%
      \usebibmacro{editor+othersstrg}%
      \clearname{editor}%
    }%
  }{}}
%    \end{macrocode}
%
% We provide a macro for printing series editors.
%
%    \begin{macrocode}
\newbibmacro*{byserieseditor}{%
  \ifnameundef{serieseditor}
    {}
    {\usebibmacro{bytypestrg}{serieseditor}{serieseditor}%
     \setunit{\addspace}%
     \printnames[byeditor]{serieseditor}%
     \newunit}}

%    \end{macrocode}
%
% \subsection{Titles}
%
% Title handling is mostly as it is in the standard styles, except
% that the |titleaddon| is printed in square brackets; it is not
% preceeded by punctuation.
%
%    \begin{macrocode}
\renewbibmacro*{title}{%
  \ifboolexpr{
    test {\iffieldundef{title}}
    and
    test {\iffieldundef{subtitle}}
  }
  {}
  {\printtext[title]{%
      \printfield[titlecase]{title}%
      \setunit{\subtitlepunct}%
      \printfield[titlecase]{subtitle}}%
    \setunit{\addspace}}%
  \usebibmacro{origtitle}%
  \setunit*{\addspace}%
  \printfield{titleaddon}%
  \iffieldequalstr{relatedtype}{equals}{%
    \iftoggle{bbx:related}{%
      \usebibmacro{related:init}%
      \usebibmacro{related}%
      \clearfield{related}%
    }{}%
  }{}%
}
\DeclareFieldFormat{titleaddon}{\mkbibbrackets{#1}}
%    \end{macrocode}
%
% The |origtitle| field is used for translated works. If the cited work is a
% native language translation of a foreign work, the original title is given
% in parentheses. If the cited work is foreign translation of a native language
% work, the original title is printed in square brackets, preceded by the name
% of the foreign language (if appropriate) and \enquote{translation of}.
%
%    \begin{macrocode}
\DeclareFieldFormat{origtitle}{\mkbibemph{#1}}
\newbibmacro*{origtitle}{%
  \iffieldundef{origtitle}{}{%
    \iflistundef{language}{%
      \printtext[parens]{\printfield{origtitle}}%
    }{%
      \printtext[brackets]{%
        \blx@ox@langbibstring{\printlist{language}}{translationof}\addspace
        \printfield{origtitle}}}}}
%    \end{macrocode}
%
% \subsection{Dates and times}
%
% Year ranges are truncated (e.g.~2012–3). Therefore, we provide a command that
% compares two years, and outputs a full or truncated version of the second
% year, depending on how similar it is to the first. It is adapted from code by
% Marco Daniel.\footnote{\url{http://tex.stackexchange.com/questions/23483/}}
%
%    \begin{macrocode}
\newcommand{\blx@ox@compyear}[2]{%
  \def\num@one{#1}%
  \def\num@two{#2}%
  \StrLen{\num@one}[\num@one@len]%
  \StrLen{\num@two}[\num@two@len]%
%    \end{macrocode}
%
% The year is only trimmed if it is greater than, but has the same number of
% digits as, the comparison number.
%
%    \begin{macrocode}
  \ifboolexpr{
    test {\ifnumequal{\num@one@len}{\num@two@len}}
    and
    test {\ifnumless{\num@one}{\num@two}}
  }{%
%    \end{macrocode}
%
% For years since 1000, at least two digits must be the same before trimming
% occurs.
%
%    \begin{macrocode}
    \StrCompare{\num@one}{\num@two}[\Result]%
    \ifnum\num@two@len>3%
      \IfStrEq{\Result}{2}{\def\Result{1}}{}%
    \fi
%    \end{macrocode}
%
% In legal references, the truncated year is at least two digits.
%
%    \begin{macrocode}
      \ifboolexpr{
      (
        test {\ifentrytype{jurisdiction}}
        or
        test {\ifentrytype{legislation}}
      )
      and
      test {\IfStrEq{\Result}{4}}
    }{\def\Result{3}}{}%
%    \end{macrocode}
%
% Since \cs{Result} is the number of digits to trim from the left hand side of
% the year, plus one, we provide an extra sacrificial zero before trimming.
%
%    \begin{macrocode}
    \StrGobbleLeft{0\num@two}{\Result}%
  }{\num@two}}
%    \end{macrocode}
%
% We patch the date range formats from |biblatex.sty| to use the
% above function.
%
%    \begin{macrocode}
\patchcmd{\mkdaterangefull}{%
  \csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}%
}{%
  \iffieldundef{#2endmonth}%
    {\blx@ox@compyear{\thefield{#2year}}{\thefield{#2endyear}}}%
    {\csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}%
}{}{\wlog{WARNING: biblatex-oxref failed to patch mkdaterangefull}}
\patchcmd{\mkdaterangefullextra}{%
  \csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}%
}{%
  \iffieldundef{#2endmonth}%
    {\blx@ox@compyear{\thefield{#2year}}{\thefield{#2endyear}}}%
    {\csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}%
}{}{\wlog{WARNING: biblatex-oxref failed to patch mkdaterangefullextra}}
\patchcmd{\mkdaterangetrunc@i}{%
  \csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}%
}{%
  \iffieldundef{#2endmonth}%
    {\blx@ox@compyear{\thefield{#2year}}{\thefield{#2endyear}}}%
    {\csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}%
}{}{\wlog{WARNING: biblatex-oxref failed to patch mkdaterangetrunc@i}}
\patchcmd{\mkdaterangetruncextra@i}{%
  \csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}%
}{%
  \iffieldundef{#2endmonth}%
    {\blx@ox@compyear{\thefield{#2year}}{\thefield{#2endyear}}}%
    {\csuse{mkbibdate#1}{#2endyear}{#2endmonth}{#2endday}}%
}{}{\wlog{WARNING: biblatex-oxref failed to patch mkdaterangetruncextra@i}}
%    \end{macrocode}
%
% We provide a way of prefacing dates (and times) with a type. This is mainly
% intended for online resources.
%
%    \begin{macrocode}
\DeclareFieldFormat{datetype}{%
  \ifbibstring{#1}{\bibstring{#1}}{#1\isdot}%
}
\newtoggle{blx@ox@timefirst}
\DeclareBiblatexOption{global,type,entry}{timefirst}[true]{%
  \settoggle{blx@ox@timefirst}{#1}}
\newbibmacro*{date+time}{%
  \ifboolexpr{
    test {\iffieldundef{year}}
    and
    test {\iffieldundef{yeardivision}}
    and
    test {\iffieldundef{month}}
    and
    test {\iffieldundef{hour}}
  }{}{%
    \printfield{datetype}}%
  \setunit*{\addspace}%
  \iftoggle{blx@ox@timefirst}{%
    \printtime
    \setunit*{\addcomma\space}}{}%
  \printdate
  \iftoggle{blx@ox@timefirst}{}{%
    \setunit*{\addcomma\space}%
    \printtime}%
}
\renewbibmacro*{date}{\usebibmacro{date+time}}
%    \end{macrocode}
%
% We provide an equivalent for origdate. This is mainly intended for
% audiovisual resources (for the date of recording).
%
%    \begin{macrocode}
\DeclareFieldFormat{origdatetype}{%
  \ifbibstring{#1}{\bibstring{#1}}{#1\isdot}%
}
\newbibmacro*{origdate+time}{%
  \ifboolexpr{
    test {\iffieldundef{origyear}}
    and
    test {\iffieldundef{origyeardivision}}
    and
    test {\iffieldundef{origmonth}}
    and
    test {\iffieldundef{orighour}}
  }{}{%
    \printfield{origdatetype}}%
  \setunit*{\addspace}%
  \iftoggle{blx@ox@timefirst}{%
    \printorigtime
    \setunit*{\addcomma\space}}{}%
  \printorigdate
  \iftoggle{blx@ox@timefirst}{}{%
    \setunit*{\addcomma\space}%
    \printorigtime}%
}
%    \end{macrocode}
%
% If a date is inferred, it goes in square brackets.
%
%    \begin{macrocode}
\DeclareFieldFormat{date}{%
  \def\currentfield{date}%
  \iffieldannotation{inferred}{\mkbibbrackets{#1}}{#1}%
  \undef\currentfield}
\DeclareFieldFormat{origdate}{%
  \def\currentfield{origdate}%
  \iffieldannotation{inferred}{\mkbibbrackets{#1}}{#1}%
  \undef\currentfield}
\DeclareFieldFormat{eventdate}{%
  \def\currentfield{eventdate}%
  \iffieldannotation{inferred}{\mkbibbrackets{#1}}{#1}%
  \undef\currentfield}
%    \end{macrocode}
%
% \subsection{Editions, pages, and other number-like fields}
%
% We let |edition| take a localization key as well as a number.
%
%    \begin{macrocode}
\xpatchfieldformat{edition}%
  {#1\isdot}%
  {\ifbibstring{#1}{\bibstring{#1}}{#1\isdot}}%
{}{\wlog{WARNING: biblatex-oxref failed to patch edition}}
%    \end{macrocode}
%
% Page ranges are compressed, but are not usually marked with
% \enquote{pp.}. The exception is if the page numbers are not obviously
% numbers.
%
%    \begin{macrocode}
\DeclareFieldFormat{pages}{%
  \iffieldundef{bookpagination}%
    {\mkcomprange{#1}}%
    {\mkcomprange[{\mkpageprefix[bookpagination]}]{#1}}%
}
%    \end{macrocode}
%
% The same is true in citations.
%
%    \begin{macrocode}
\DeclareFieldFormat{postnote}{%
  \iffieldundef{pagination}%
  {\mkcomprange{#1}}%
  {\mkcomprange[{\mkpageprefix}]{#1}}%
}

%    \end{macrocode}
%
% \subsection{Publishers}
%
% The \emph{Oxford Guide to Style} says it is fine to omit publisher
% names uniformly from bibliographic information. This is odd, but we
% can support it with a simple option.
%
%    \begin{macrocode}
\DeclareBibliographyOption{nopublisher}[true]{%
  \DeclareFieldInputHandler{publisher}{\def\NewValue{}}%
}
%    \end{macrocode}
%
% The style guides are less forgiving about omitting the place of publication.
% We provide a bibliography option that fills in such gaps with the |nolocation|
% localization string for selected entry types. It works using a source map,
% which is a clean solution but cannot easily be switched off again or used on a
% per-type basis.
%
%    \begin{macrocode}
\DeclareBibliographyOption{nolocation}[true]{%
  \DeclareStyleSourcemap{
    \maps[datatype=bibtex]{
      \map{
        \pertype{book}
        \pertype{mvbook}
        \pertype{bookinbook}
        \pertype{inbook}
        \pertype{suppbook}
        \pertype{collection}
        \pertype{mvcollection}
        \pertype{incollection}
        \pertype{suppcollection}
        \pertype{reference}
        \pertype{mvreference}
        \pertype{inreference}
        \pertype{proceedings}
        \pertype{mvproceedings}
        \pertype{inproceedings}
        \step[notfield=location, fieldset=location, fieldvalue={\noexpand\bibstring{nolocation}}]
      }
    }
  }%
}
%    \end{macrocode}
%
% We also provide an entry option that has the same effect; this works using
% the \cs{restorelist} mechanism instead.
%
%    \begin{macrocode}
\newtoggle{blx@ox@noloc}
\def\blx@ox@noloc{{\bibstring{nolocation}}}
\DeclareEntryOption{nolocation}[true]{%
  \settoggle{blx@ox@noloc}{#1}%
  \iflistundef{location}{%
    \iftoggle{blx@ox@noloc}{\restorelist{location}{\blx@ox@noloc}}{}%
  }{}}
%    \end{macrocode}
%
% \subsection{URLs}
%
% The OGS recommends the ISO convention of enclosing URLs in angle
% brackets, but NHR recommends leaving URLs bare so as not to interfere
% with text-mining. The latter is the default.
%
%    \begin{macrocode}
\DeclareBibliographyOption{isourls}[true]{%
  \ifstrequal{#1}{true}
    {\DeclareFieldFormat{url}{$\langle$\url{##1}$\rangle$}}
    {\DeclareFieldFormat{url}{\url{##1}}}%
}
\ExecuteBibliographyOptions{isourls=false}
%    \end{macrocode}
%
% NHR specifies that URLs should be broken across lines after slashes
% and percents, and before other punctuation. They should never break
% after hyphens.
%
%    \begin{macrocode}
\renewcommand*{\biburlsetup}{%
  \Urlmuskip=0mu plus 2mu\relax
  \mathchardef\UrlBigBreakPenalty=100\relax
  \mathchardef\UrlBreakPenalty=200\relax
  \def\UrlBigBreaks{\do\/\do\:}%
  \def\UrlNoBreaks{\do\(\do\[\do\{\do\<}%
  \def\UrlBreaks{%
    \do\>\do\}\do\]\do\)\do\\\do\|%
    \do\'\do\$\do\*\do\^\do\"}%
  \appto\UrlSpecials{%
    \do\!{\mathbin{}\mskip-\Urlmuskip\mathchar`\!\mskip\Urlmuskip}%
    \do\&{\mathbin{}\mskip-\Urlmuskip\mathchar`\&\mskip\Urlmuskip}%
    \do\+{\mathbin{}\mskip-\Urlmuskip\mathchar`\+\mskip\Urlmuskip}%
    \do\,{\mathbin{}\mskip-\Urlmuskip\mathchar`\,\mskip\Urlmuskip}%
    \do\-{\mathbin{}\mskip-\Urlmuskip\mathchar`\-\mskip\Urlmuskip}%
    \do\.{\mathbin{}\mskip-\Urlmuskip\mathchar`\.\mskip\Urlmuskip}%
    \do\;{\mathbin{}\mskip-\Urlmuskip\mathchar`\;\mskip\Urlmuskip}%
    \do\={\mathbin{}\mskip-\Urlmuskip\mathchar`\=\mskip\Urlmuskip}%
    \do\?{\mathbin{}\mskip-\Urlmuskip\mathchar`\?\mskip\Urlmuskip}%
    \do\_{\mathbin{}\mskip-\Urlmuskip\_\mskip\Urlmuskip}%
    \do\#{\mathbin{}\mskip-\Urlmuskip\#\mskip\Urlmuskip}%
  }%
  \ifnumgreater{\value{biburlnumpenalty}}{0}
    {\def\do##1{\appto\UrlSpecials{\do##1{\mathchar`##1 \penalty\value{biburlnumpenalty}}}}%
     \do\1\do\2\do\3\do\4\do\5\do\6\do\7\do\8\do\9\do\0}
    {}%
  \ifnumgreater{\value{biburlucpenalty}}{0}
    {\def\do##1{\appto\UrlSpecials{\do##1{\mathchar`##1 \penalty\value{biburlucpenalty}}}}%
     \do\A\do\B\do\C\do\D\do\E\do\F\do\G\do\H\do\I\do\J
     \do\K\do\L\do\M\do\N\do\O\do\P\do\Q\do\R\do\S\do\T
     \do\U\do\V\do\W\do\X\do\Y\do\Z}
    {}%
  \ifnumgreater{\value{biburllcpenalty}}{0}
    {\def\do##1{\appto\UrlSpecials{\do##1{\mathchar`##1 \penalty\value{biburllcpenalty}}}}%
     \do\a\do\b\do\c\do\d\do\e\do\f\do\g\do\h\do\i\do\j
     \do\k\do\l\do\m\do\n\do\o\do\p\do\q\do\r\do\s\do\t
     \do\u\do\v\do\w\do\x\do\y\do\z}
    {}%
  \let\do=\noexpand}
%    \end{macrocode}
%
% URL dates are set off with a comma rather than parentheses.
%
%    \begin{macrocode}
\DeclareFieldFormat{urldate}{\bibstring{urlseen}\space#1}
\xpatchbibmacro{url+urldate}%
  {\setunit*{\addspace}}%
  {\setunit*{\addcomma\addspace}}%
{}{\wlog{WARNING: biblatex-oxref failed to patch url+urldate}}
%    \end{macrocode}
%
% The DOI is introduced by \enquote{doi} in lowercase.
%
%    \begin{macrocode}
\xpatchfieldformat{doi}%
  {\mkbibacro{DOI}}%
  {\printtext{doi}}%
{}{\wlog{WARNING: biblatex-oxref failed to patch doi}}
%    \end{macrocode}
%
% Unlike URLs, DOIs are preceded by a full stop.
%
%    \begin{macrocode}
\xpatchbibmacro{doi+eprint+url}%
  {\printfield{doi}}%
  {\setunit{\addperiod\space}\printfield{doi}}%
{}{\wlog{WARNING: biblatex-oxref failed to patch doi+eprint+url}}

%    \end{macrocode}
%
% \subsection{Addenda}
%
% The publication state is given in parentheses. Other addenda are added
% plain.
%
%    \begin{macrocode}
\renewbibmacro*{addendum+pubstate}{%
  \ifboolexpr{
    test {\iffieldundef{pubstate}}
    or
    test {\iffieldequalstr{labeldatesource}{pubstate}}
  }{}{%
    \nopunct
    \ifbibstring{\thefield{pubstate}}{%
      \printtext[pubstate]{\bibstring{\thefield{pubstate}}}%
    }{%
      \printfield{pubstate}}}%
  \setunit{\addsemicolon\addspace}\newblock
  \printfield{addendum}}
\DeclareFieldFormat{pubstate}{\mkbibparens{#1}}
%    \end{macrocode}
%
% Publication descriptions are printed plain for unpublished works, and in
% brackets for other entry types.
%
%    \begin{macrocode}
\DeclareFieldFormat{howpublished}{\mkbibbrackets{#1}}
\DeclareFieldFormat[misc,unpublished]{howpublished}{#1}
%    \end{macrocode}
%
% \subsection{Articles and periodicals}
%
% Subtypes for articles and similar are in square brackets.
%
%    \begin{macrocode}
\DeclareFieldFormat[article,periodical,suppperiodical,review]{entrysubtype}{\mkbibbrackets{#1}}
%    \end{macrocode}
%
% We provide a command for testing if a title is abbreviated. We use the
% traditional \LaTeX\ accent commands in case a non-Unicode input encoding is
% being used. Testing for \c{C} and \c{S} causes errors when using OT1 encoding.
%
%    \begin{macrocode}
\newcommand*{\blx@ox@abbrevstring}{%
  A\^{A}BCDEFG\u{G}HI\.{I}\^{I}JKLMNO\"{O}\^{O}PQRSTU\"{U}\^{U}VWXYZ.}%
\AtBeginDocument{
  \ifdefstring{\encodingdefault}{OT1}{}{%
    \renewcommand*{\blx@ox@abbrevstring}{%
      A\^{A}BC\c{C}DEFG\u{G}HI\.{I}\^{I}JKLMNO\"{O}\^{O}PQRS\c{S}TU\"{U}\^{U}VWXYZ.}%
  }%
}
\newcommand*{\ifabbrev}[3]{%
  \StrRight{#1}{1}[\blx@ox@lastchar]%
  \expandafter\IfSubStr*{\blx@ox@abbrevstring}{\blx@ox@lastchar}{#2}{#3}%
}
%    \end{macrocode}
%
% We renew the |journal+issuetitle| macro so that if a work takes up a
% whole issue (signified by using |issuetitle| \emph{instead} of
% |title|), the title and journal title are separated by \enquote{=}
% instead of the usual punctuation. It also inserts an appropriate localization
% string if the publication status demands it.
% We insert a comma after the journal title, regardless of what follows.
% There is also a comma after numeric (but not textual) series.
%
%    \begin{macrocode}
\renewbibmacro*{journal+issuetitle}{%
  \ifboolexpr{
    test {\iffieldundef{title}}
    and
    not test {\iffieldundef{issuetitle}}
  }{%
    \usebibmacro{issue}%
    \setunit{\addspace =\addspace}%
  }{%
    \ifboolexpr{
      ( not test {\iffieldundef{pubstate}} )
      and
      test {\ifbibxstring{\thefield{pubstate}in}}
    }{%
      \printtext{\bibstring{\thefield{pubstate}in}\space}%
      \clearfield{pubstate}%
    }{}}%
  \usebibmacro{journal}%
  \iffieldundef{journalsubtitle}{%
    \ifabbrev{\strfield{journaltitle}}{\setunit{\addspace}}{\newunit}%
  }{%
    \ifabbrev{\strfield{journalsubtitle}}{\setunit{\addspace}}{\newunit}}%
  \iffieldundef{series}{}{%
    \newunit\newblock
    \printfield{series}%
    \ifbibxstring{\thefield{series}}{%
      \setunit{\addspace}%
    }{%
      \newunit}}%
  \usebibmacro{volume+number+eid}%
  \setunit{\addspace}%
  \usebibmacro{issue+date}%
  \newunit}
%    \end{macrocode}
%
% We renew the |title+issuetitle| macro (for whole periodical issues) to apply
% the same punctuation changes after the periodical name and series. At the
% same time, we delegate handling of volume and issue numbers to the appropriate
% macro so we can customize it.
%
%    \begin{macrocode}
\renewbibmacro*{title+issuetitle}{%
  \usebibmacro{periodical}%
  \iffieldundef{subtitle}{%
    \ifabbrev{\strfield{title}}{\setunit{\addspace}}{\newunit}%
  }{%
    \ifabbrev{\strfield{subtitle}}{\setunit{\addspace}}{\newunit}}%
  \iffieldundef{series}{}{%
    \newunit\newblock
    \printfield{series}%
    \ifbibxstring{\thefield{series}}{%
      \setunit{\addspace}%
    }{%
      \newunit}}%
  \usebibmacro{volume+number+eid}%
  \setunit{\addspace}%
  \usebibmacro{issue+date}%
  \newunit}
%    \end{macrocode}
%
% OGS and NHR provide plentiful options for formatting volume and issue
% numbers. We implement four of them here as options. The default is to
% use a slash between volume and issue number. Note that we prevent the
% |volume+number+eid| macro from actually printing the EID; this is printed
% by |issue+date| instead (see below).
%
%    \begin{macrocode}
\DeclareBibliographyOption[string]{issuestyle}[slash]{%
  \ifcsdef{blx@ox@issuestyle@#1}{%
    \csuse{blx@ox@issuestyle@#1}%
  }{%
    \PackageError{biblatex-oxref}
      {Invalid option 'issuestyle=#1'}
      {Valid values are 'slash', 'colon', 'comma', 'parens'}%
  }%
}
\csdef{blx@ox@issuestyle@slash}{%
  \renewbibmacro*{volume+number+eid}{%
    \printfield{volume}%
    \setunit*{\addslash}%
    \printfield{number}%
  }%
}
\csdef{blx@ox@issuestyle@colon}{%
  \renewbibmacro*{volume+number+eid}{%
    \printfield{volume}%
    \setunit*{\addcolon\space}%
    \printfield{number}%
  }%
}
\csdef{blx@ox@issuestyle@comma}{%
  \renewbibmacro*{volume+number+eid}{%
    \printfield{volume}%
    \setunit*{\addcomma\space}%
    \printfield{number}%
  }%
}
\csdef{blx@ox@issuestyle@parens}{%
  \renewbibmacro*{volume+number+eid}{%
    \printfield{volume}%
    \setunit*{\addspace}%
    \printfield[parens]{number}%
  }%
}
\ExecuteBibliographyOptions{issuestyle=slash}
%    \end{macrocode}
%
% OGS consistently prints dates of newspapers and magazines bare, but those
% of academic journals in parentheses. NHR seems to favour printing dates in
% parentheses regardless, but notes that some publishing houses take the OGS
% approach.
%
% We provide an option for switching between the two approaches. If active
% and an issue has no volume or issue numbers (first block), the year division
% and date are printed bare. Otherwise (second block) they are printed
% in parentheses just as in the standard version of the macro.
%
%    \begin{macrocode}
\newtoggle{blx@ox@varissuedate}
\DeclareBiblatexOption{global,type,entry}{varissuedate}[true]{%
  \settoggle{blx@ox@varissuedate}{#1}}
\DeclareBiblatexOption{global,type,entry}{issuedate-plain}[true]{%
  \settoggle{blx@ox@varissuedate}{#1}}
\renewbibmacro*{issue+date}{%
  \ifboolexpr{
    test {\iffieldundef{issue}}
    and
    test {\iffieldundef{year}}
    and
    test {\iffieldundef{yeardivision}}
    and
    test {\iffieldundef{month}}
  }{}{%
    \ifboolexpr{
      togl {blx@ox@varissuedate}
      and
      test {\iffieldundef{volume}}
      and
      test {\iffieldundef{number}}
    }{%
      \newunit
      \printtext{%
        \iffieldundef{issue}{%
          \usebibmacro{date}
        }{%
          \printfield{issue}%
          \setunit*{\addspace}%
          \usebibmacro{date}}}%
    }{%
      \printtext[parens]{%
        \iffieldundef{issue}{%
          \usebibmacro{date}%
        }{%
          \printfield{issue}%
          \setunit*{\addspace}%
          \usebibmacro{date}}}}}%
  \newunit
  \printfield{eid}%
}
%    \end{macrocode}
%
% Our |article| driver is like the standard one except
% \begin{itemize}
%   \item it has no \enquote{in} macro;
%   \item there is a handler for the suppto relation;
%   \item there is no language macro;
%   \item the punctuation before related items is configurable.
% \end{itemize}
%
%    \begin{macrocode}
\DeclareBibliographyDriver{article}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/translator+others}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{title}%
  \setunit{\titlebyauthordelim}\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \usebibmacro{bytranslator+others}%
  \newunit\newblock
  \printfield{version}%
  \newunit\newblock
  \usebibmacro{journal+issuetitle}%
  \newunit
  \usebibmacro{byeditor+others}%
  \iffieldequalstr{relatedtype}{suppto}{%
    \setunit{\addsemicolon\space}%
    \iftoggle{bbx:related}{%
      \usebibmacro{related:init}%
      \usebibmacro{related}%
      \clearfield{related}%
    }{}%
  }{}%
  \newunit
  \usebibmacro{note+pages}%
  \newunit\newblock
  \iftoggle{bbx:isbn}
    {\printfield{issn}}
    {}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}
%    \end{macrocode}
%
% Similar changes are made to the |periodical| driver.
%
%    \begin{macrocode}
\DeclareBibliographyDriver{periodical}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{editor}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{title+issuetitle}%
  \newunit\newblock
  \usebibmacro{byeditor}%
  \newunit\newblock
  \printfield{note}%
  \newunit\newblock
  \iftoggle{bbx:isbn}
    {\printfield{issn}}
    {}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}
%    \end{macrocode}
%
% The |suppperiodical| driver is just like the |article| one, except the note
% comes sooner after the title. This is to allow it to be used as a descriptor.
% Since we're breaking the alias, we need to explicitly replicate the article
% formatting for the rest of the entry.
%
%    \begin{macrocode}
\DeclareFieldFormat[suppperiodical]{title}{%
  \def\currentfield{title}%
  \iffieldannotation{descriptor}{#1}{\mkbibquote{#1\isdot}}%
  \undef\currentfield}
\DeclareFieldFormat[suppperiodical]{volume}{#1}% volume of a journal
\DeclareFieldFormat[suppperiodical]{number}{#1}% number of a journal
\DeclareFieldFormat[suppperiodical]{series}{% series of a journal
  \ifinteger{#1}
  {\mkbibordseries{#1}~\bibstring{jourser}}
  {\ifbibstring{#1}{\bibstring{#1}}{#1}}}
\DeclareBibliographyDriver{suppperiodical}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/translator+others}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{title}%
  \setunit{\titlebyauthordelim}\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \usebibmacro{bytranslator+others}%
  \newunit\newblock
  \printfield{note}\clearfield{note}%
  \newunit\newblock
  \printfield{version}%
  \newunit\newblock
  \usebibmacro{journal+issuetitle}%
  \newunit
  \usebibmacro{byeditor+others}%
  \iffieldequalstr{relatedtype}{suppto}{%
    \setunit{\addsemicolon\space}%
    \iftoggle{bbx:related}{%
      \usebibmacro{related:init}%
      \usebibmacro{related}%
      \clearfield{related}%
    }{}%
  }{}%
  \newunit
  \usebibmacro{note+pages}%
  \newunit\newblock
  \iftoggle{bbx:isbn}
    {\printfield{issn}}
    {}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}
%    \end{macrocode}
%
% \subsection{Books and works in books}
%
% By default, editors do not appear before the title in book or reference
% entries.
%
%    \begin{macrocode}
\ExecuteBibliographyOptions[book,mvbook,reference,mvreference]{useeditor=false,usetranslator=false}
%    \end{macrocode}
%
% The titles of books that have been collected into an anthology are
% treated like regular chapters and set in quotes. Poems and plays,
% however, are set in italics.
%
%    \begin{macrocode}
\DeclareFieldFormat[bookinbook]{title}{%
  \ifboolexpr{
    test {\iffieldequalstr{entrysubtype}{poem}}
    or
    test {\iffieldequalstr{entrysubtype}{play}}
  }{%
    \mkbibemph{#1}%
  }{%
    \mkbibquote{#1\isdot}}}
%    \end{macrocode}
%
% Unlike the standard styles, we have a separate driver for |inreference|,
% so we need to change the title style accordingly.
%
%    \begin{macrocode}
\DeclareFieldFormat[inreference]{title}{\mkbibquote{#1\isdot}}
%    \end{macrocode}
%
% Volume numbers in monograph-style entries are formatted as roman
% numerals (if they are indeed numbers). We take some care here to support
% simple ranges (e.g.\@ 1-3, 4--9). Support for more complex ranges may be
% considered on request.
%
%    \begin{macrocode}
\DeclareFieldFormat[book,mvbook,bookinbook,inbook,suppbook,%
collection,mvcollection,incollection,suppcollection,%
proceedings,mvproceedings,inproceedings,%
reference,mvreference,inreference]{volume}{%
\IfSubStr{#1}{-}{%
  \StrCount{#1}{-}[\blx@ox@dashnum]%
  \StrBefore{#1}{-}[\blx@ox@volnum]%
  \expandafter\ifinteger\blx@ox@volnum{\Rn{\blx@ox@volnum}}{\blx@ox@volnum}\bibrangedash
  \StrBehind[\blx@ox@dashnum]{#1}{-}[\blx@ox@volnum]%
  \expandafter\ifinteger\blx@ox@volnum{\Rn{\blx@ox@volnum}}{\blx@ox@volnum}%
}{%
  \ifinteger{#1}{\Rn{#1}}{#1}}}
%    \end{macrocode}
%
% Where a multi-volume work is more like a series, the volume number and
% main title are put in a bracketted block between the volume title
% and the usual publication block.
%
%    \begin{macrocode}
\newbibmacro*{maintitle+volume}{%
  \ifboolexpr{
    test {\iffieldundef{maintitle}}
    or
    test {\iffieldundef{volume}}
  }{}%
  {\printtext[maintitle+volume]{%
    \bibstring{volume}\addspace
    \printfield{volume}\printfield{part}\addspace
    \bibstring{ofseries}\addspace
    \usebibmacro{maintitle}}}
}
\DeclareFieldFormat{maintitle+volume}{\mkbibbrackets{#1}}
%    \end{macrocode}
%
% The |in| before the booktitle is suppressed for works in yearbooks.
%
%    \begin{macrocode}
\renewbibmacro*{in:}{%
  \iffieldequalstr{entrysubtype}{yearbook}{}{%
    \bibstring{in}%
    \printunit{\intitlepunct}}}
%    \end{macrocode}
%
% Oxford style signifies formal publication by putting the relevant
% details in parentheses.
%
%    \begin{macrocode}
\DeclareFieldFormat{publication}{\mkbibparens{#1}}
%    \end{macrocode}
%
% Standard \pkg{biblatex} puts a space between series name and number.
% OGS separates them with a comma. It also has an example with a series editor.
%
%    \begin{macrocode}
\renewbibmacro*{series+number}{%
    \printfield{series}%
    \setunit*{\addcomma\space}%
    \usebibmacro{byserieseditor}%
    \setunit*{\addcomma\space}%
    \printfield{number}}
%    \end{macrocode}
%
% We provide an option for displaying the series information before, instead of
% within, the publication block.
%
%    \begin{macrocode}
\newtoggle{blx@ox@altbookseries}
\DeclareBibliographyOption[string]{bookseries}[in]{%
  \ifstrequal{#1}{out}{%
    \toggletrue{blx@ox@altbookseries}%
  }{%
    \togglefalse{blx@ox@altbookseries}%
    \ifstrequal{#1}{in}{}{%
      \PackageError{biblatex-oxref}
      {Invalid option 'bookseries=#1'}
      {Valid values are 'in' and 'out'.}}}}
%    \end{macrocode}
%
% When citing both the first and a later edition, the first one comes
% first, and the later one comes after a semicolon. As per standard
% \pkg{biblatex}, the elements of a single edition are separated by commas
% except that the publisher is preceded by a colon. The origdate is only
% printed here if at least one of the edition, the origlocation or the
% origpublisher is also specified.
%
%    \begin{macrocode}
\newcounter{locpubpairs}
\newbibmacro*{edition+publisher+location+date}{%
  \printlist{origlocation}%
  \iflistundef{origpublisher}%
    {\setunit*{\addcomma\space}}%
    {\setunit*{\addcolon\space}}%
  \printlist{origpublisher}%
  \setunit*{\addcomma\space}%
  \ifboolexpr{
    test {\iflistundef{origlocation}}
    and
    test {\iflistundef{origpublisher}}
    and
    test {\iffieldundef{edition}}
  }{}{%
    \printorigdate}%
  \setunit{\addsemicolon\space}%
  \printfield{edition}%
  \setunit*{\addcomma\space}%
%    \end{macrocode}
%
% If there are the same number of locations and publishers, and there
% are more than one pair, we print them pairwaise rather than in two
% separate lists. This uses the same principle as the |namepairs| bibmacro,
% but does not have the list truncation apparatus.
%
%    \begin{macrocode}
  \ifboolexpr{%
    test {\ifnumcomp{\value{publisher}}{>}{1}}
    and
    test {\ifnumequal{\value{location}}{\value{publisher}}}
  }{%
    \setcounter{locpubpairs}{0}%
    \savebibmacro{list:andothers}%
    \renewbibmacro*{list:andothers}{}%
    \whileboolexpr{%
      test {\ifnumcomp{\value{locpubpairs}}{<}{\value{publisher}}}
    }{%
      \stepcounter{locpubpairs}%
      \ifnumcomp{\value{locpubpairs}}{>}{1}{%
        \ifnumequal{\value{publisher}}{2}{%
          \setunit*{\addspace\bibstring{and}\addspace}%
        }{%
          \ifnumequal{\value{locpubpairs}}{\value{publisher}}{%
            \setunit*{\addcomma\space\bibstring{and}\addspace}%
          }{%
            \setunit*{\addcomma\space}%
          }%
        }%
      }{}%
      \printlist[][\value{locpubpairs}-\value{locpubpairs}]{location}%
      \setunit*{\addcolon\space}%
      \printlist[][\value{locpubpairs}-\value{locpubpairs}]{publisher}%
    }%
    \restorebibmacro{list:andothers}%
  }{%
    \printlist{location}%
    \iflistundef{publisher}%
    {\setunit*{\addcomma\space}}%
    {\setunit*{\addcolon\space}}%
    \printlist{publisher}%
  }%
  \setunit*{\addcomma\space}%
  \usebibmacro{date}%
}
%    \end{macrocode}
%
% Oxford style is to provide publication details –
% series name and number, edition, publisher, location, date –
% in a parenthetical block after the title information.
%
%    \begin{macrocode}
\newbibmacro*{series+number+edition+publisher+location+date}{%
  \iftoggle{blx@ox@altbookseries}{%
    \usebibmacro{series+number}%
    \setunit{\addspace}\newblock}{}%
  \ifboolexpr{
    test {\iffieldundef{series}}
    and
    test {\iffieldundef{number}}
    and
    test {\iffieldundef{edition}}
    and
    test {\iflistundef{publisher}}
    and
    test {\iflistundef{location}}
    and
    test {\iffieldundef{year}}
    and
    test {\iffieldundef{yeardivision}}
    and
    test {\iffieldundef{month}}
  }{}{%
    \nopunct
    \printtext[publication]{%
    \iftoggle{blx@ox@altbookseries}{}{%
      \usebibmacro{series+number}%
      \setunit{\addsemicolon\addspace}}%
    \usebibmacro{edition+publisher+location+date}%
    \usebibmacro{copub}}}%
  \iffieldequalstr{relatedtype}{copub}{\clearfield{related}}%
  \setunit{\addspace}\newblock
  \usebibmacro{origpub}%
}
%    \end{macrocode}
%
% The edition information for reference works is recorded earlier in the
% reference, so we provide a variant that excludes it from the
% publication block.
%
%    \begin{macrocode}
\newbibmacro*{series+number+publisher+location+date}{%
  \iftoggle{blx@ox@altbookseries}{%
    \usebibmacro{series+number}%
    \setunit{\addspace}\newblock}{}%
  \ifboolexpr{
    test {\iffieldundef{series}}
    and
    test {\iffieldundef{number}}
    and
    test {\iflistundef{publisher}}
    and
    test {\iflistundef{location}}
    and
    test {\iffieldundef{year}}
    and
    test {\iffieldundef{yeardivision}}
    and
    test {\iffieldundef{month}}
  }{}{%
    \nopunct
    \printtext[publication]{%
    \iftoggle{blx@ox@altbookseries}{}{%
      \usebibmacro{series+number}%
      \setunit{\addsemicolon\addspace}}%
    \usebibmacro{publisher+location+date}%
    \usebibmacro{copub}}}%
  \iffieldequalstr{relatedtype}{copub}{\clearfield{related}}%
  \setunit{\addspace}\newblock
  \usebibmacro{origpub}%
}
%    \end{macrocode}
%
% The |copub| macro prints co-publication details.
%
%    \begin{macrocode}
\newbibmacro*{copub}{%
  \ifboolexpr{
    togl {bbx:related}
    and
    test {\iffieldequalstr{relatedtype}{copub}}
  }{%
    \setunit{\addsemicolon\space}%
    \usebibmacro{related:init}%
    \usebibmacro{related}%
  }{}%
}
%    \end{macrocode}
%
% The |origpub| macro prints the origdate field if it has not yet been cleared.
%
%    \begin{macrocode}
\newbibmacro*{origpub}{%
  \ifboolexpr{
    test {\iflistundef{origlocation}}
    and
    test {\iflistundef{origpublisher}}
    and
    test {\iffieldundef{edition}}
    and
    ( not test {\iffieldundef{origyear}} )
  }{%
    \printtext[parens]{\bibstring{origpubin}\space\printorigdate}%
  }{}%
}
%    \end{macrocode}
%
% The changes to the |book| driver compared to the standard style are as
% follows:
% \begin{itemize}
%   \item
%   |maintitle| is processed with |volume| just before |series|, instead
%   of with |title|;
%   \item
%   |edition| is processed where the standard style processes |note|,
%   and vice versa;
%   \item
%   |volumes| is omitted;
%   \item
%   |series| to |date| information is delegated to a separate macro;
%   \item
%   support is added for |howpublished| field;
% \end{itemize}
%
%    \begin{macrocode}
\DeclareBibliographyDriver{book}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/editor+others/translator+others}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{title}%
  \setunit{\titlebyauthordelim}\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \usebibmacro{byeditor+others}%
  \newunit\newblock
  \printfield{note}%
  \newunit\newblock
  \usebibmacro{maintitle+volume}%
  \newunit
  \usebibmacro{series+number+edition+publisher+location+date}%
  \setunit{\addspace}%
  \printfield{howpublished}%
  \newunit\newblock
  \usebibmacro{chapter+pages}%
  \newunit
  \printfield{pagetotal}%
  \newunit\newblock
  \iftoggle{bbx:isbn}
    {\printfield{isbn}}
    {}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}
%    \end{macrocode}
%
% Unlike the standard styles, we have a separate driver for |mvbook|
% which behaves slightly differently. It is in fact closer to the
% standard |book| driver. The changes are as follows:
% \begin{itemize}
%   \item
%   |volume|/|part| is processed just after |maintitle+title|;
%   \item
%   |edition| is processed where the standard style processes |note|;
%   \item
%   |note| is processed after |volumes|;
%   \item
%   |series| to |date| information is delegated to a separate macro;
% \end{itemize}
%
%    \begin{macrocode}
\DeclareBibliographyDriver{mvbook}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/editor+others/translator+others}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{maintitle+title}%
  \newunit
  \ifboolexpr{
    test {\iffieldequalstr{relatedtype}{multivolume}}
    or
    ( not test {\iffieldundef{maintitle}} )
  }{}{%
    \printfield{volume}%
    \printfield{part}}%
  \setunit{\titlebyauthordelim}\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \usebibmacro{byeditor+others}%
  \newunit\newblock
  \printfield{volumes}%
  \newunit\newblock
  \printfield{note}%
  \newunit\newblock
  \ifboolexpr{
    test {\iffieldequalstr{relatedtype}{multivolume}}
    and
    test {\iffieldundef{maintitle}}
  }{%
    \printfield{volume}%
    \printfield{part}%
  }{}%
  \newunit\newblock
  \usebibmacro{series+number+edition+publisher+location+date}%
  \newunit\newblock
  \usebibmacro{chapter+pages}%
  \newunit
  \printfield{pagetotal}%
  \newunit\newblock
  \iftoggle{bbx:isbn}
    {\printfield{isbn}}
    {}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}
%    \end{macrocode}
%
% Our |inbook| driver modifies the standard one in just the same way as
% our |mvbook| driver modifies the standard |book|.
%
%    \begin{macrocode}
\DeclareBibliographyDriver{inbook}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/translator+others}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{title}%
  \setunit{\titlebyauthordelim}\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \usebibmacro{in:}%
  \usebibmacro{bybookauthor}%
  \newunit\newblock
  \usebibmacro{maintitle+booktitle}%
  \newunit
  \iffieldundef{maintitle}
    {\printfield{volume}%
     \printfield{part}}
    {}%
  \newunit\newblock
  \usebibmacro{byeditor+others}%
  \newunit\newblock
  \printfield{volumes}%
  \newunit\newblock
  \printfield{note}%
  \newunit\newblock
  \usebibmacro{series+number+edition+publisher+location+date}%
  \newunit\newblock
  \usebibmacro{chapter+pages}%
  \newunit\newblock
  \iftoggle{bbx:isbn}
    {\printfield{isbn}}
    {}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}
%    \end{macrocode}
%
% Our |suppbook| driver is just like |inbook| except that the note is moved
% nearer the title so it can be used as a descriptor.
%
%    \begin{macrocode}
\DeclareFieldFormat[suppbook]{title}{%
  \def\currentfield{title}%
  \iffieldannotation{descriptor}{#1}{\mkbibemph{#1}}%
  \undef\currentfield}
\DeclareBibliographyDriver{suppbook}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/translator+others}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{title}%
  \setunit{\titlebyauthordelim}\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \printfield{note}%
  \setunit{\addspace}\newblock
  \usebibmacro{in:}%
  \usebibmacro{bybookauthor}%
  \newunit\newblock
  \usebibmacro{maintitle+booktitle}%
  \newunit
  \iffieldundef{maintitle}
    {\printfield{volume}%
     \printfield{part}}
    {}%
  \newunit\newblock
  \usebibmacro{byeditor+others}%
  \newunit\newblock
  \printfield{volumes}%
  \newunit\newblock
  \usebibmacro{series+number+edition+publisher+location+date}%
  \newunit\newblock
  \usebibmacro{chapter+pages}%
  \newunit\newblock
  \iftoggle{bbx:isbn}
    {\printfield{isbn}}
    {}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}
%    \end{macrocode}
%
% We also provide a |bookinbook| driver that handles \code{origdate}
% differently.
%
%    \begin{macrocode}
\DeclareBibliographyDriver{bookinbook}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/translator+others}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{title}%
  \setunit{\titlebyauthordelim}\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \usebibmacro{in:}%
  \usebibmacro{bybookauthor}%
  \newunit\newblock
  \usebibmacro{maintitle+booktitle}%
  \newunit
  \iffieldundef{maintitle}
    {\printfield{volume}%
     \printfield{part}}
    {}%
  \newunit\newblock
  \usebibmacro{byeditor+others}%
  \newunit\newblock
  \printfield{volumes}%
  \newunit\newblock
  \printfield{note}%
  \newunit\newblock
  \usebibmacro{series+number+edition+publisher+location+date}%
  \newunit\newblock
  \usebibmacro{chapter+pages}%
  \newunit\newblock
  \iftoggle{bbx:isbn}
    {\printfield{isbn}}
    {}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}
%    \end{macrocode}
%
% Our |collection| driver modifies the standard one in just the same way
% as our |book| driver.
%
%    \begin{macrocode}
\DeclareBibliographyDriver{collection}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{editor+others}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{title}%
  \newunit\newblock
  \usebibmacro{byeditor+others}%
  \newunit\newblock
  \printfield{note}%
  \newunit\newblock
  \usebibmacro{maintitle+volume}%
  \newunit
  \usebibmacro{series+number+edition+publisher+location+date}%
  \newunit\newblock
  \usebibmacro{chapter+pages}%
  \newunit
  \printfield{pagetotal}%
  \newunit\newblock
  \iftoggle{bbx:isbn}
    {\printfield{isbn}}
    {}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}
%    \end{macrocode}
%
% Our |mvcollection| driver modifies the standard |collection| driver
% in just the same way as our |mvbook| driver modifies the standard
% |book|.
%
%    \begin{macrocode}
\DeclareBibliographyDriver{mvcollection}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{editor+others}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{maintitle+title}%
  \newunit
  \ifboolexpr{
    test {\iffieldequalstr{relatedtype}{multivolume}}
    or
    ( not test {\iffieldundef{maintitle}} )
  }{}{%
    \printfield{volume}%
    \printfield{part}}%
  \newunit\newblock
  \usebibmacro{byeditor+others}%
  \newunit\newblock
  \printfield{volumes}%
  \newunit\newblock
  \printfield{note}%
  \newunit\newblock
  \ifboolexpr{
    test {\iffieldequalstr{relatedtype}{multivolume}}
    and
    test {\iffieldundef{maintitle}}
  }{%
    \printfield{volume}%
    \printfield{part}%
  }{}%
  \newunit\newblock
  \usebibmacro{series+number+edition+publisher+location+date}%
  \newunit\newblock
  \usebibmacro{chapter+pages}%
  \newunit
  \printfield{pagetotal}%
  \newunit\newblock
  \iftoggle{bbx:isbn}
    {\printfield{isbn}}
    {}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}
%    \end{macrocode}
%
% Our |incollection| driver modifies the standard one in the same way as
% our |mvbook| driver modifies the standard |book|. In addition, the
% |bookeditor| macro precedes |maintitle| instead of |byeditor+others|
% following it.
%
%    \begin{macrocode}
\DeclareBibliographyDriver{incollection}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/translator+others}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{title}%
  \setunit{\titlebyauthordelim}\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \usebibmacro{in:}%
  \usebibmacro{bookeditor}%
  \newunit\newblock
  \usebibmacro{maintitle+booktitle}%
  \newunit
  \iffieldundef{maintitle}
    {\printfield{volume}%
     \printfield{part}}
    {}%
  \newunit\newblock
  \printfield{volumes}%
  \newunit\newblock
  \printfield{note}%
  \newunit\newblock%
  \usebibmacro{series+number+edition+publisher+location+date}%
  \newunit\newblock
  \usebibmacro{chapter+pages}%
  \newunit\newblock
  \iftoggle{bbx:isbn}
    {\printfield{isbn}}
    {}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}
%    \end{macrocode}
%
% Our |suppcollection| driver is just like |incollection| except that the note
% is moved nearer the title so it can be used as a descriptor.
%
%    \begin{macrocode}
\DeclareFieldFormat[suppcollection]{title}{%
  \def\currentfield{title}%
  \iffieldannotation{descriptor}{#1}{\mkbibemph{#1}}%
  \undef\currentfield}
\DeclareBibliographyDriver{suppcollection}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/translator+others}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{title}%
  \setunit{\titlebyauthordelim}\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \printfield{note}%
  \setunit{\addspace}\newblock
  \usebibmacro{in:}%
  \usebibmacro{bookeditor}%
  \newunit\newblock
  \usebibmacro{maintitle+booktitle}%
  \newunit
  \iffieldundef{maintitle}
    {\printfield{volume}%
     \printfield{part}}
    {}%
  \newunit\newblock
  \printfield{volumes}%
  \newunit\newblock%
  \usebibmacro{series+number+edition+publisher+location+date}%
  \newunit\newblock
  \usebibmacro{chapter+pages}%
  \newunit\newblock
  \iftoggle{bbx:isbn}
    {\printfield{isbn}}
    {}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}
%    \end{macrocode}
%
% Unlike the standard styles, we provide a separate driver for
% |reference|. It is just like |book| except that |edition| is given
% directly after the title.
%
%    \begin{macrocode}
\DeclareBibliographyDriver{reference}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/editor+others/translator+others}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{title}%
  \newunit\newblock
  \printfield{edition}%
  \setunit{\titlebyauthordelim}\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \usebibmacro{byeditor+others}%
  \newunit\newblock
  \printfield{note}%
  \newunit\newblock
  \usebibmacro{maintitle+volume}%
  \newunit
  \usebibmacro{series+number+publisher+location+date}%
  \newunit\newblock
  \usebibmacro{chapter+pages}%
  \newunit
  \printfield{pagetotal}%
  \newunit\newblock
  \iftoggle{bbx:isbn}
    {\printfield{isbn}}
    {}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}
%    \end{macrocode}
%
% Similarly, |mvreference| is just like |mvbook| except that |edition|
% is given directly after the title.
%
%    \begin{macrocode}
\DeclareBibliographyDriver{mvreference}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/editor+others/translator+others}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{maintitle+title}%
  \newunit
  \ifboolexpr{
    test {\iffieldequalstr{relatedtype}{multivolume}}
    or
    ( not test {\iffieldundef{maintitle}} )
  }{}{%
    \printfield{volume}%
    \printfield{part}}%
  \newunit\newblock
  \printfield{edition}%
  \setunit{\titlebyauthordelim}\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \usebibmacro{byeditor+others}%
  \newunit\newblock
  \printfield{volumes}%
  \newunit\newblock
  \printfield{note}%
  \newunit\newblock
  \ifboolexpr{
    test {\iffieldequalstr{relatedtype}{multivolume}}
    and
    test {\iffieldundef{maintitle}}
  }{%
    \printfield{volume}%
    \printfield{part}%
  }{}%
  \newunit\newblock
  \usebibmacro{series+number+publisher+location+date}%
  \newunit\newblock
  \usebibmacro{chapter+pages}%
  \newunit
  \printfield{pagetotal}%
  \newunit\newblock
  \iftoggle{bbx:isbn}
    {\printfield{isbn}}
    {}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}
%    \end{macrocode}
%
% Our |inreference| driver is just like |inbook| except |bookeditor|
% replaces |bybookauthor| and |edition| is given just before
% |byeditor+others|.
%
%    \begin{macrocode}
\DeclareBibliographyDriver{inreference}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/translator+others}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{title}%
  \setunit{\titlebyauthordelim}\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \iffieldundef{editor}{}{%
    \usebibmacro{in:}%
    \usebibmacro{bookeditor}%
    \newunit\newblock}%
  \usebibmacro{maintitle+booktitle}%
  \newunit
  \iffieldundef{maintitle}
    {\printfield{volume}%
     \printfield{part}}
    {}%
  \newunit\newblock
  \printfield{edition}%
  \newunit
  \usebibmacro{byeditor+others}%
  \newunit\newblock
  \printfield{volumes}%
  \newunit\newblock
  \printfield{note}%
  \newunit\newblock%
  \usebibmacro{series+number+publisher+location+date}%
  \newunit\newblock
  \usebibmacro{chapter+pages}%
  \newunit
  \printfield{pagetotal}%
  \newunit\newblock
  \iftoggle{bbx:isbn}
    {\printfield{isbn}}
    {}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}
%    \end{macrocode}
%
% \subsection{Works presented at meetings}
%
% By default, editors do not appear before the title in proceedings
% entries.
%
%    \begin{macrocode}
\ExecuteBibliographyOptions[proceedings,mvproceedings]{useeditor=false,usetranslator=false}
%    \end{macrocode}
%
% In our version of the |event+venue+date| macro, the venue and date
% are set off with commas respectively instead of
% parentheses.
%
%    \begin{macrocode}
\renewbibmacro*{event+venue+date}{%
  \printfield{eventtitle}%
  \newunit
  \printfield{eventtitleaddon}%
  \newunit
  \printfield{venue}%
  \newunit%
  \printeventdate%
  \newunit}
%    \end{macrocode}
%
% The changes to the |proceedings| driver compared to the standard style
% are as follows:
% \begin{itemize}
%   \item
%   We support the concept of an |author| before the title,
%   which is usually the |organization|;
%   \item
%   |editor| comes after the title, not before;
%   \item
%   |volume|/|part| is processed just after |maintitle+title|;
%   \item
%   |note| is moved to before |series|;
%   \item
%   |series| to |date| information is delegated to a separate macro;
% \end{itemize}
%
% As in the (inherited) standard style, |mvproceedings| is an alias for this
% driver, since it is unlikely that the proceedings of a single meeting will
% be split into long series of independently published volumes!
%
%    \begin{macrocode}
\DeclareBibliographyDriver{proceedings}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author}%
  \newunit
  \usebibmacro{maintitle+title}%
  \newunit
  \iffieldundef{maintitle}
    {\printfield{volume}%
     \printfield{part}}
    {}%
  \newunit\newblock
  \usebibmacro{event+venue+date}%
  \newunit\newblock
  \usebibmacro{byeditor+others}%
  \newunit\newblock
  \printfield{volumes}%
  \newunit\newblock
  \printfield{note}%
  \newunit\newblock
  \printlist{organization}%
  \newunit
  \usebibmacro{series+number+edition+publisher+location+date}%
  \newunit\newblock
  \usebibmacro{chapter+pages}%
  \newunit
  \printfield{pagetotal}%
  \newunit\newblock
  \iftoggle{bbx:isbn}
    {\printfield{isbn}}
    {}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}
%    \end{macrocode}
%
% Our |inproceedings| driver modifies the standard one in the same way
% as our |proceedings| driver modifies the standard one.
%
%    \begin{macrocode}
\DeclareBibliographyDriver{inproceedings}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/translator+others}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{title}%
  \setunit{\titlebyauthordelim}\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \usebibmacro{in:}%
  \usebibmacro{maintitle+booktitle}%
  \newunit
  \iffieldundef{maintitle}
    {\printfield{volume}%
     \printfield{part}}
    {}%
  \newunit\newblock
  \usebibmacro{event+venue+date}%
  \newunit\newblock
  \usebibmacro{byeditor+others}%
  \newunit\newblock
  \printfield{volumes}%
  \newunit\newblock
  \printfield{note}%
  \newunit\newblock
  \printlist{organization}%
  \newunit
  \usebibmacro{series+number+publisher+location+date}%
  \newunit\newblock
  \usebibmacro{chapter+pages}%
  \newunit\newblock
  \iftoggle{bbx:isbn}
    {\printfield{isbn}}
    {}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}
%    \end{macrocode}
%
% \subsection{Grey literature}
%
% We provide a macro for handling |type+number|. We provide some extra
% logic to insert \enquote{No.\@} before the number if there is no type.
%
%    \begin{macrocode}
\newbibmacro*{series+type+number}{%
  \ifboolexpr{
    test {\iffieldundef{series}}
    and
    test {\iffieldundef{type}}
  }{}{%
    \printfield{series}%
    \newunit
    \ifboolexpr{%
        test {\iffieldundef{type}}
        and
        not test {\iffieldundef{number}}
    }{%
      \bibcpstring{number}
    }{%
      \printfield{type}%
    }%
    \setunit*{\addspace}%
    \printfield{number}}}
%    \end{macrocode}
%
% Our version of the |institution+location+date| macro is just like the
% standard one except it is wrapped in parentheses, and the preceding
% punctuation is therefore suppressed. This is used by the |report| driver.
%
%    \begin{macrocode}
\renewbibmacro*{institution+location+date}{%
  \ifboolexpr{
    ( test {\iffieldundef{number}}
      or
      not test {\iffieldundef{type}}
      or
      not test {\iffieldundef{series}}
    )
    and
    test {\iflistundef{institution}}
    and
    test {\iflistundef{location}}
    and
    test {\iffieldundef{year}}
    and
    test {\iffieldundef{yeardivision}}
    and
    test {\iffieldundef{month}}
  }{}{%
    \nopunct
    \printtext[publication]{%
      \ifboolexpr{
        test {\iffieldundef{series}}
        and
        test {\iffieldundef{type}}
      }{%
        \printfield{number}%
        \setunit*{\addcomma\space}%
      }{}%
      \printlist{location}%
      \iflistundef{institution}%
      {\setunit*{\addcomma\space}}%
      {\setunit*{\addcolon\space}}%
      \printlist{institution}%
      \setunit*{\addcomma\space}%
      \usebibmacro{date}}}}
%    \end{macrocode}
%
% We provide a slightly more complicated version with the type included
% at the beginning. It is used by the |thesis| driver. We provide two
% versions: one with the type outside and one with it inside the
% parentheses.
%
%    \begin{macrocode}
\newtoggle{blx@ox@altthesis}
\newtoggle{blx@ox@plainthesis}
\DeclareFieldAlias{thesis:publication}{publication}
\DeclareFieldFormat{plain}{#1}
\DeclareBibliographyOption{altthesis}[true]{%
  \settoggle{blx@ox@altthesis}{#1}
}
\DeclareBibliographyOption[string]{thesis}[out]{%
  \ifstrequal{#1}{plain}{%
    \toggletrue{blx@ox@altthesis}%
    \toggletrue{blx@ox@plainthesis}%
    \DeclareFieldAlias{thesis:publication}{plain}%
  }{%
    \togglefalse{blx@ox@plainthesis}%
    \DeclareFieldAlias{thesis:publication}{publication}%
    \ifstrequal{#1}{in}{%
      \toggletrue{blx@ox@altthesis}%
    }{%
      \togglefalse{blx@ox@altthesis}%
      \ifstrequal{#1}{out}{}{%
        \PackageError{biblatex-oxref}
        {Invalid option 'bookseries=#1'}
        {Valid values are 'in', 'out', and 'plain'.}}}}}
\newbibmacro*{type+institution+location+date}{%
  \iftoggle{blx@ox@altthesis}{%
    \ifboolexpr{
      test {\iffieldundef{type}}
      and
      test {\iflistundef{institution}}
      and
      test {\iflistundef{location}}
      and
      test {\iffieldundef{year}}
      and
      test {\iffieldundef{yeardivision}}
      and
      test {\iffieldundef{month}}
    }{}{%
      \iftoggle{blx@ox@plainthesis}{}{\nopunct}%
      \printtext[thesis:publication]{%
        \printfield{type}%
        \setunit*{\addcomma\space}%
        \printlist{location}%
        \iflistundef{institution}{%
          \setunit*{\addcomma\space}%
        }{%
          \setunit*{\addcolon\space}}%
        \printlist{institution}%
        \setunit*{\addcomma\space}%
        \usebibmacro{date}}}
  }{%
    \printfield{type}%
    \newunit
    \usebibmacro{institution+location+date}}}
%    \end{macrocode}
%
% We provide an even more convoluted version that also includes |series|,
% |title| and |number|, and uses the more common |publisher| in place of
% |institution|. We also include some logic that means |organization|
% is used instead of |publisher| if no |publisher| is provided;
% otherwise it is printed before |location|. This is used by the
% |manual| driver.
%
%    \begin{macrocode}
\newbibmacro*{type+series+number+edition+organization+publisher+location+date}{%
  \ifboolexpr{
    test {\iffieldundef{type}}
    and
    test {\iffieldundef{series}}
    and
    test {\iffieldundef{number}}
    and
    test {\iffieldundef{edition}}
    and
    test {\iflistundef{organization}}
    and
    test {\iflistundef{publisher}}
    and
    test {\iflistundef{location}}
    and
    test {\iffieldundef{year}}
    and
    test {\iffieldundef{yeardivision}}
    and
    test {\iffieldundef{month}}
  }{}{%
    \nopunct
    \printtext[publication]{%
      \usebibmacro{series+type+number}%
      \setunit{\addsemicolon\space}%
      \printfield{edition}%
      \setunit*{\addcomma\space}%
      \iflistundef{publisher}{}{%
        \printlist{organization}%
        \setunit*{\addcomma\space}}%
      \printlist{location}%
      \iflistundef{publisher}{%
        \iflistundef{organization}{%
          \setunit*{\addcomma\space}%
        }{%
          \setunit*{\addcolon\space}%
          \printlist{organization}}%
      }{%
        \setunit*{\addcolon\space}%
        \printlist{publisher}}%
      \setunit*{\addcomma\space}%
      \usebibmacro{date}}}}
%    \end{macrocode}
%
% The changes to the |report| driver compared to the standard style
% are as follows:
% \begin{itemize}
%   \item
%   support is added for |volume|, |maintitle| and |series|;
%   \item
%   |type| and |number| are moved to just before the publication
%   information block;
%   \item
%   the punctuation is slightly different for the |legal| entry subtype.
% \end{itemize}
%
%    \begin{macrocode}
\newcommand*{\legreport}{legal}
\DeclareBibliographyDriver{report}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{maintitle+title}%
  \newunit
  \iffieldundef{maintitle}
    {\printfield{volume}%
     \printfield{part}}
    {}%
  \setunit{\titlebyauthordelim}\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \printfield{version}%
  \newunit\newblock
  \printfield{note}%
  \newunit\newblock
  \usebibmacro{series+type+number}%
  \setunit{\addspace}%
  \usebibmacro{institution+location+date}%
  \iffieldequals{entrysubtype}{\legreport}{%
    \setunit{\addspace}\nopunct
    \let\origadddot\adddot
    \def\adddot{}%
    \usebibmacro{chapter+pages}%
    \let\adddot\origadddot
  }{%
    \newunit\newblock
    \usebibmacro{chapter+pages}%
  }%
  \newunit
  \printfield{pagetotal}%
  \newunit\newblock
  \iftoggle{bbx:isbn}
    {\printfield{isrn}}
    {}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}
%    \end{macrocode}
%
% We patch the thesis driver to use our slightly more complex version.
%
%    \begin{macrocode}
\xpatchbibdriver{thesis}{%
  \printfield{type}%
  \newunit
  \usebibmacro{institution+location+date}%
}{%
  \usebibmacro{type+institution+location+date}%
}{}{\wlog{WARNING: biblatex-oxref failed to patch thesis}}
%    \end{macrocode}
%
% We give booklet entries descriptor support.
%
%    \begin{macrocode}
\DeclareFieldFormat[booklet]{title}{%
  \def\currentfield{title}%
  \iffieldannotation{descriptor}{#1}{%
    \mkbibquote{#1\isdot}}%
  \undef\currentfield}
%    \end{macrocode}
%
% With patents, the titles are italic and the patent type is not abbreviated.
%
%    \begin{macrocode}
\DeclareFieldFormat[patent]{title}{\mkbibemph{#1}}
\DeclareFieldFormat[patent]{type}{\ifbibstring{#1}{\biblstring{#1}}{#1}}
%    \end{macrocode}
%
% The |holder|, |origdate| and |date| fields have explicit signposting; the
% latter two use |origdatetype| and |datetype|, with some sensible defaults.
%
%    \begin{macrocode}
\DeclareNameAlias{byholder}{default}
\renewbibmacro*{byholder}{%
  \ifnameundef{holder}{}{%
    \bibstring{byholder}%
    \setunit{\addspace}%
    \printnames[byholder]{holder}}}
\newbibmacro*{location+dates}{%
  \ifboolexpr{
    test {\iffieldundef{location}}
    and
    test {\iffieldundef{origyear}}
    and
    test {\iffieldundef{origmonth}}
    and
    test {\iffieldundef{year}}
    and
    test {\iffieldundef{month}}
  }{}{%
    \nopunct
    \printtext[publication]{%
      \printlist[][-\value{listtotal}]{location}%
      \setunit*{\addcomma\space}%
      \ifboolexpr{
        test {\iffieldundef{origyear}}
        and
        test {\iffieldundef{origmonth}}
      }{}{%
        \iffieldundef{origdatetype}{%
          \bibstring{filed}
        }{
          \printfield{origdatetype}}%
        \setunit*{\addspace}}%
      \usebibmacro{origdate+time}%
      \setunit*{\addcomma\space}%
      \ifboolexpr{
        test {\iffieldundef{year}}
        and
        test {\iffieldundef{month}}
      }{}{%
        \iffieldundef{datetype}{%
          \bibstring{issued}%
        }{
          \printfield{datetype}}%
        \setunit*{\addspace}}%
      \usebibmacro{date}}}}
%    \end{macrocode}
%
% The |patent| driver differs from the regular one by having |note| moved
% further forward, and having a publication block consisting of |location|,
% |origdate| and |date|.
%
%    \begin{macrocode}
\DeclareBibliographyDriver{patent}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{title}%
  \newunit
  \printlist{language}%
  \setunit{\titlebyauthordelim}\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \printfield{note}%
  \newunit\newblock
  \printfield{type}%
  \setunit*{\addspace}%
  \printfield{number}%
  \newunit\newblock
  \usebibmacro{byholder}%
  \newunit\newblock
  \usebibmacro{location+dates}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}
%    \end{macrocode}
%
% Direct use of the |manual| entry type is not encouraged, but it serves as a
% basis for other entry types, notably standards, and software.
% The main change to the |manual| driver compared to the standard style is
% that |type|, |series|, |number|, |edition| and |organization| are moved into
% the publication information block with |publisher|, |location| and |date|.
% Note that standards will put the |number| field at the head of the reference
% if there is no author.
%
%    \begin{macrocode}
\DeclareBibliographyDriver{manual}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \ifboolexpr{
    test {\ifentrytype{standard}}
    and
    ( test {\ifnameundef{author}}
      or
      not test \ifuseauthor )
    and
    not test {\iffieldundef{number}}
  }{%
    \printfield{number}\clearfield{number}%
    \newunit\newblock
  }{}%
  \usebibmacro{author/editor}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \ifentrytype{software}
    {\usebibmacro{title+version}}
    {\usebibmacro{title}}%
  \setunit{\titlebyauthordelim}\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \usebibmacro{byeditor}%
  \newunit
  \ifentrytype{software}
    {}
    {\newunit\printfield{version}}%
  \newunit
  \printfield{note}%
  \newunit\newblock
  \usebibmacro{type+series+number+edition+organization+publisher+location+date}%
  \newunit\newblock
  \usebibmacro{chapter+pages}%
  \newunit
  \printfield{pagetotal}%
  \newunit\newblock
  \iftoggle{bbx:isbn}
    {\printfield{isbn}}
    {}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}
\DeclareBibliographyAlias{standard}{manual}
\ExecuteBibliographyOptions[standard]{useeditor=false}
%    \end{macrocode}
%
% \subsection{Audiovisual materials}
%
% The publication block for audiovisual resources is quite different
% from the normal, as the |type|, |series| and |number| come
% between the |publisher| and |date|. The punctuation or otherwise between
% elements depends on the combination present. The date and time of recording
% is given before the block if a |number| is provided (indicating a published
% recording) but within it otherwise.
%
%    \begin{macrocode}
\newbibmacro*{publisher+type+series+number+date}{%
  \iffieldundef{number}{}{%
    \setunit{\addcomma\space}%
    \usebibmacro{origdate+time}%
  }%
  \ifboolexpr{%
    test {\iflistundef{origpublisher}}
    and
    test {\iflistundef{location}}
    and
    test {\iflistundef{publisher}}
    and
    test {\iffieldundef{type}}
    and
    test {\iffieldundef{series}}
    and
    test {\iffieldundef{number}}
    and
    test {\iffieldundef{year}}
    and
    test {\iffieldundef{yeardivision}}
    and
    test {\iffieldundef{month}}
    and
    test {\iffieldundef{origyear}}
    and
    test {\iffieldundef{origyeardivision}}
    and
    test {\iffieldundef{origmonth}}
    and
    test {\iffieldundef{hour}}
  }{}{%
    \nopunct
    \printtext[publication]{%
      \printlist{origpublisher}%
      \setunit*{\addsemicolon\space}%
      \printlist{location}%
      \iflistundef{publisher}%
        {\setunit*{\addcomma\space}}%
        {\setunit*{\addcolon\space}}%
      \printlist{publisher}%
      \iffieldundef{series}%
        {\setunit*{\addspace}}%
        {\setunit*{\recordseriespunct}}%
      \printfield{series}%
      \setunit*{\addcomma\space}%
      \printfield{type}%
      \iflistundef{publisher}%
        {\setunit*{\addcomma\space}}%
        {\setunit*{\addspace}}%
      \printfield{number}%
      \iffieldundef{number}{%
        \setunit{\addcomma\space}%
        \usebibmacro{origdate+time}%
      }{}%
      \setunit{\addcomma\space}%
      \usebibmacro{date+time}}}}
%    \end{macrocode}
%
% We provide the \texttt{endeditor} option to determine if credits should be
% placed before or after the publication block.
%
%    \begin{macrocode}
\newtoggle{blx@ox@endeditor}
\DeclareEntryOption{endeditor}[true]{%
  \settoggle{blx@ox@endeditor}{#1}}
\newbibmacro*{pre-byeditor+others}{%
  \iftoggle{blx@ox@endeditor}{}{%
    \usebibmacro{byeditor+others}%
  }}
\newbibmacro*{post-byeditor+others}{%
  \iftoggle{blx@ox@endeditor}{%
    \usebibmacro{byeditor+others}%
  }{}}
%    \end{macrocode}
%
% We provide a specialist |audio| driver. It borrows elements from the |book|
% and |online| drivers, and incorporates the above variations.
%
%    \begin{macrocode}
\DeclareBibliographyDriver{audio}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{title}%
  \newunit
  \usebibmacro{maintitle}%
  \iffieldequalstr{relatedtype}{includes}{%
    \iftoggle{bbx:related}{%
      \newunit\newblock
      \usebibmacro{related:init}%
      \usebibmacro{related}%
      \clearfield{related}%
    }{}%
  }{}%
  \setunit{\addspace}
  \usebibmacro{onlinetype}%
  \setunit{\titlebyauthordelim}\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \usebibmacro{pre-byeditor+others}%
  \newunit\newblock
  \printfield{volumes}%
  \newunit\newblock
  \printfield{note}%
  \newunit\newblock%
  \printlist{organization}%
  \newunit\newblock%
  \usebibmacro{publisher+type+series+number+date}%
  \setunit{\addspace}%
  \printfield{howpublished}%
  \newunit\newblock
  \usebibmacro{post-byeditor+others}%
  \newunit\newblock
  \iftoggle{bbx:isbn}
    {\printfield{isbn}}
    {}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}
%    \end{macrocode}
%
% The same driver will do very well for |music|, |video| and |movie|.
%
%    \begin{macrocode}
\DeclareBibliographyAlias{music}{audio}
\DeclareBibliographyAlias{movie}{audio}
\DeclareBibliographyAlias{video}{audio}
%    \end{macrocode}
%
% In parallel with book-like entries, we provide an |inaudio| driver for citing
% tracks from an album.
%
%    \begin{macrocode}
\DeclareBibliographyDriver{inaudio}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{title}%
  \setunit{\titlebyauthordelim}\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \usebibmacro{in:}%
  \usebibmacro{bybookauthor}%
  \newunit\newblock
  \usebibmacro{maintitle+booktitle}%
  \iffieldequalstr{relatedtype}{includes}{%
    \iftoggle{bbx:related}{%
      \newunit\newblock
      \usebibmacro{related:init}%
      \usebibmacro{related}%
      \clearfield{related}%
    }{}%
  }{}%
  \setunit{\addspace}
  \usebibmacro{onlinetype}%
  \newunit\newblock
  \usebibmacro{pre-byeditor+others}%
  \newunit\newblock
  \printfield{volumes}%
  \newunit\newblock
  \printfield{note}%
  \newunit\newblock%
  \printlist{organization}%
  \newunit\newblock%
  \usebibmacro{publisher+type+series+number+date}%
  \setunit{\addspace}%
  \printfield{howpublished}%
  \newunit\newblock
  \usebibmacro{post-byeditor+others}%
  \newunit\newblock
  \iftoggle{bbx:isbn}
    {\printfield{isbn}}
    {}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}
%    \end{macrocode}
%
% The same driver will do very well for |inmusic|, |invideo| and |inmovie|.
% The latter two are for completeness but probably not useful.
%
%    \begin{macrocode}
\DeclareBibliographyAlias{inmusic}{inaudio}
\DeclareBibliographyAlias{inmovie}{inaudio}
\DeclareBibliographyAlias{invideo}{inaudio}
%    \end{macrocode}
%
% We set up appropriate inheritance rules.
%
%    \begin{macrocode}
\DeclareDataInheritance{audio,music,movie,video}{inaudio,inmusic,inmovie,invideo}{%
  \inherit{title}{booktitle}
  \inherit{subtitle}{booksubtitle}
  \inherit{titleaddon}{booktitleaddon}
  \noinherit{shorttitle}
  \noinherit{sorttitle}
  \noinherit{indextitle}
  \noinherit{indexsorttitle}
}
%    \end{macrocode}
%
% Titles for videos do not have a consistent format, so we define some
% |entrysubtype|-based variation. We also allow the use of descriptors;
% note that the title is transformed into a descriptor by means of
% an annotation, rather than using a dedicated field. This greatly
% simplifies the code used elsewhere.
%
%    \begin{macrocode}
\DeclareFieldFormat[audio,music]{title}{%
  \def\currentfield{title}%
  \iffieldannotation{descriptor}{#1}{%
    \iffieldequalstr{entrysubtype}{podcast}{%
      \mkbibquote{#1\isdot}%
    }{%
      \mkbibemph{#1}}}%
  \undef\currentfield}
\DeclareFieldFormat[movie,video]{title}{%
  \def\currentfield{title}%
  \iffieldannotation{descriptor}{#1}{%
    \ifboolexpr{
      test {\iffieldequalstr{entrysubtype}{episode}}
      or
      test {\iffieldequalstr{entrysubtype}{clip}}
      or
      test {\iffieldequalstr{entrysubtype}{webcast}}
    }{%
      \mkbibquote{#1\isdot}%
    }{%
      \mkbibemph{#1}}}%
  \undef\currentfield}
\DeclareFieldFormat[inaudio,inmusic,inmovie,invideo]{title}{%
  \def\currentfield{title}%
  \iffieldannotation{descriptor}{#1}{%
    \mkbibquote{#1\isdot}%
  }%
  \undef\currentfield}
\DeclareFieldFormat[inaudio,inmusic]{booktitle}{%
  \def\currentfield{booktitle}%
  \iffieldannotation{descriptor}{#1}{%
    \iffieldequalstr{entrysubtype}{podcast}{%
      \mkbibquote{#1\isdot}%
    }{%
      \mkbibemph{#1}}}%
  \undef\currentfield}
\DeclareFieldFormat[inmovie,invideo]{booktitle}{%
  \def\currentfield{booktitle}%
  \iffieldannotation{descriptor}{#1}{%
    \ifboolexpr{
      test {\iffieldequalstr{entrysubtype}{episode}}
      or
      test {\iffieldequalstr{entrysubtype}{clip}}
      or
      test {\iffieldequalstr{entrysubtype}{webcast}}
    }{%
      \mkbibquote{#1\isdot}%
    }{%
      \mkbibemph{#1}}}%
  \undef\currentfield}

%    \end{macrocode}
%
% The |performance| driver is similar to the |audio| driver, but instead of a
% publication block, it displays a set of event-related fields. With a bit of
% generosity, it can also work for artworks and images.
%
%    \begin{macrocode}
\DeclareBibliographyDriver{performance}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{title}%
  \newunit
  \usebibmacro{maintitle}%
  \iffieldequalstr{relatedtype}{includes}{%
    \iftoggle{bbx:related}{%
      \newunit\newblock
      \usebibmacro{related:init}%
      \usebibmacro{related}%
      \clearfield{related}%
    }{}%
  }{}%
  \setunit{\addspace}
  \usebibmacro{onlinetype}%
  \setunit{\titlebyauthordelim}\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \usebibmacro{pre-byeditor+others}%
  \setunit{\addspace}%
  \printfield{howpublished}%
  \newunit\newblock
  \printfield{type}%
  \newunit\newblock
  \printfield{note}%
  \ifboolexpr{
    test {\iffieldundef{origyear}}
    and
    test {\iffieldundef{origmonth}}
  }{}{%
    \setunit{\addspace}\newblock
    \printtext[publication]{\usebibmacro{origdate+time}}}
  \newunit\newblock
  \usebibmacro{event+venue+location+date}%
  \newunit\newblock
  \usebibmacro{post-byeditor+others}%
  \newunit\newblock
  \printlist{organization}%
  \newunit\newblock
  \iftoggle{bbx:isbn}
    {\printfield{isbn}}
    {}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}
\DeclareBibliographyAlias{image}{performance}
\DeclareBibliographyAlias{artwork}{performance}
%    \end{macrocode}
%
% Here is the macro used for printing the event location and date for
% performances and exhibitions.
%
%    \begin{macrocode}
\newbibmacro*{event+venue+location+date}{%
  \printfield{eventtitle}%
  \newunit
  \printfield{eventtitleaddon}%
  \newunit
  \printlist{institution}%
  \newunit
  \printfield{venue}%
  \newunit
  \printlist{location}%
  \newunit%
  \ifboolexpr{
    test {\iffieldundef{year}}
    and
    test {\iffieldundef{month}}
  }{\printeventdate}{\usebibmacro{date+time}}}

%    \end{macrocode}
%
% \subsection{Digital media}
%
% \subsubsection{Website articles and social media}
%
% The titles of web pages and similar intrinsically online resources
% are written in roman text within quotes.
%
%    \begin{macrocode}
\DeclareFieldFormat[online,image]{title}{%
  \def\currentfield{title}%
  \iffieldannotation{descriptor}{#1}{\mkbibquote{#1\isdot}}%
  \undef\currentfield}

%    \end{macrocode}
%
% We provide an |onlinetype| macro for clarifying the type of online
% material. It is triggered by appropriate values of |entrysubtype|.
%
%    \begin{macrocode}
\newbibmacro*{onlinetype}{%
  \ifboolexpr{
    test {\iffieldundef{url}}
    or
    test {\iffieldundef{entrysubtype}}
  }{}{%
    \ifbibxstring{\thefield{entrysubtype}}{%
      \printtext[brackets]{\bibstring{\thefield{entrysubtype}}}%
    }{}}}
%    \end{macrocode}
%
% The changes to the |online| driver compared to the standard style
% are as follows:
% \begin{itemize}
%   \item
%   We support the use of |maintitle| for, say, the title of the wesbite
%   in which the web page is located. This comes after |title|.
%   \item
%   We insert the aforementioned |onlinetype| macro after |maintitle|.
%   \item
%   The date is wrapped in parentheses if present.
%   \item
%   We support displaying a publisher after the date; this is a legacy feature
%   based on examples that are now deprecated.
% \end{itemize}
%
%    \begin{macrocode}
\DeclareBibliographyDriver{online}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/editor+others/translator+others}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{title}%
  \newunit
  \usebibmacro{maintitle}
  \setunit{\addspace}%
  \usebibmacro{onlinetype}%
  \setunit{\titlebyauthordelim}\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \usebibmacro{byeditor+others}%
  \newunit\newblock
  \printfield{version}%
  \newunit
  \printfield{note}%
  \newunit\newblock
  \printlist{organization}%
  \iffieldundef{year}{}{%
    \setunit{\addspace}\newblock
    \printtext[parens]{\usebibmacro{date+time}}%
  }%
  \newunit\newblock
  \printlist{publisher}%
  \newunit\newblock
  \iftoggle{bbx:eprint}
    {\usebibmacro{eprint}}
    {}%
  \newunit\newblock
  \usebibmacro{url+urldate}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}
%    \end{macrocode}
%
% \subsubsection{Software}
%
% The version for software goes between the \texttt{title} and \texttt{titleaddon}.
%
%    \begin{macrocode}
\newbibmacro*{title+version}{%
  \ifboolexpr{
    test {\iffieldundef{title}}
    and
    test {\iffieldundef{subtitle}}
  }
  {}
  {\printtext[title]{%
      \printfield[titlecase]{title}%
      \setunit{\subtitlepunct}%
      \printfield[titlecase]{subtitle}}%
    \setunit{\addspace}}%
  \printfield{version}%
  \setunit{\addspace}%
  \printfield{titleaddon}%
}
\DeclareFieldFormat[software]{version}{\mkbibparens{\bibstring{version}~#1}}
%    \end{macrocode}
%
% The url date string is different for software: \enquote{downloaded} rather
% than \enquote{accessed}.
%
%    \begin{macrocode}
\DeclareFieldFormat[software]{urldate}{\bibstring{urldown}\space#1}
%    \end{macrocode}
%
% The software driver is a variant of the manual driver.
%
%    \begin{macrocode}
\DeclareBibliographyAlias{software}{manual}
%    \end{macrocode}
%
% \subsubsection{Datasets}
%
% The main change to the |dataset| driver compared to the standard style is
% that |type|, |series|, |number|, |edition| and |organization| are moved into
% the publication information block with |publisher|, |location| and |date|.
%
%    \begin{macrocode}
\DeclareBibliographyDriver{dataset}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/editor+others/translator+others}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{title}%
  \newunit
  \printlist{language}%
  \setunit{\titlebyauthordelim}\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \usebibmacro{byeditor+others}%
  \newunit\newblock
  \printfield{type}%
  \newunit
  \printfield{version}%
  \newunit\newblock
  \printfield{note}%
  \newunit\newblock
  \usebibmacro{type+series+number+edition+organization+publisher+location+date}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}
%    \end{macrocode}
%
% \subsection{Legal references}
%
% Legal references are a law unto themselves, and thus require extensive
% fiddly coding. This entire section is adapted from \pkg{oscola} by
% Paul Stanley.
%
% \subsubsection{Entry options}
%
%    \begin{macrocode}
\newtoggle{bbx:scotstyle}
\DeclareEntryOption{scottish-style}[true]{%
  \settoggle{bbx:scotstyle}{#1}}
\newboolean{bbx@year-essential}\setboolean{bbx@year-essential}{false}
\DeclareEntryOption{year-essential}[true]{%
    \setboolean{bbx@year-essential}{#1}}
\newboolean{bbx@paryear-essential}\setboolean{bbx@paryear-essential}{false}
\DeclareEntryOption{paryear-essential}[true]{%
    \setboolean{bbx@paryear-essential}{#1}}
\newtoggle{blx@ox@nopostnotedelim}
\newtoggle{bbx:altcourt}
\DeclareBiblatexOption{global,type,entry}{court-plain}[true]{%
  \settoggle{bbx:altcourt}{#1}}
\newtoggle{bbx@ecliuse}
\newtoggle{bbx@eclionly}
\DeclareBibliographyOption[string]{ecli}[yes]{%
  \ifstrequal{#1}{no}{%
    \global\togglefalse{bbx@ecliuse}%
    \global\togglefalse{bbx@eclionly}%
  }{%
    \global\toggletrue{bbx@ecliuse}%
    \ifstrequal{#1}{only}{%
      \global\toggletrue{bbx@eclionly}%
    }{}}}
%    \end{macrocode}
%
% \subsubsection{Field formats}
%
%    \begin{macrocode}
\DeclareFieldFormat{casenotetitle}{\mkbibquote{\mkbibemph{#1}}}
\DeclareFieldFormat[jurisdiction,legislation,legal]{journaltitle}{#1}
\DeclareFieldFormat[jurisdiction]{volume}{#1}
\DeclareFieldFormat[jurisdiction]{titleaddon}{\mkbibparens{#1}}
\DeclareFieldFormat{romanvol}{\RN{#1}}
\DeclareListFormat[jurisdiction]{listb}{}
\protected\def\mkusbibordinal#1{%
  \begingroup
  \@tempcnta0#1\relax\number\@tempcnta
  \@whilenum\@tempcnta>100\do{\advance\@tempcnta-100\relax}%
  \ifnum\@tempcnta>20
    \@whilenum\@tempcnta>9\do{\advance\@tempcnta-10\relax}%
  \fi
  \ifcase\@tempcnta th\or st\or d\or d\else th\fi
  \endgroup}%
\DeclareFieldFormat{usseries}{\ifinteger{#1}{\mkusbibordinal{#1}}{#1}}
\DeclareFieldFormat{verba}{#1}

\DeclareListFormat{echrinst}{%
  \ifboolexpr{%
    test {\ifnumequal{\value{listtotal}}{1}}
    or
    test {\ifnumequal{\value{listcount}}{\value{listtotal}}}
  }{%
    \ifboolexpr{
      test {\ifdefstring{\Commission}{#1}}
      or
      test {\ifdefstring{\commission}{#1}}%
    }{%
      \bibstring{commissiondecision}%
    }{#1}%
  }{%
    \setcounter{blx@tmpcnt}{\value{listcount}}%
    \addtocounter{blx@tmpcnt}{1}%
    \ifnumequal{\value{blx@tmpcnt}}{\value{listtotal}}{%
      #1\space\bibstring{and}\addspace
    }{%
      #1\addcomma\space}}}%

\newcommand*{\commission}{commission}
\newcommand*{\Commission}{Commission}
\DeclareListFormat{ecthr}{%
  \ifboolexpr{
    test {\ifdefstring{\Commission}{#1}}
    or
    test {\ifdefstring{\commission}{#1}}
  }{\bibstring[\mkbibparens]{commissiondecision}\toggletrue{blx@ox@nopostnotedelim}}{}}

\newcommand*{\pcijrep}{PCIJ Rep}
\DeclareFieldFormat{international}{%
  \iffieldequals{journaltitle}{\pcijrep}{%
    \bibcplstring{jourser}\space #1%
  }{#1}}

\DeclareListFormat{checkcontains}{%
  \bbx@check{#1}}
\newtoggle{bbx@institutiontoggle}
\newcommand\iflistcontains[2]{%
  \global\togglefalse{bbx@institutiontoggle}%
  \def\bbx@check##1{%
    \ifdefstring{#2}{##1}{\global\toggletrue{bbx@institutiontoggle}}{}}%
  \printlist[checkcontains]{#1}%
  \iftoggle{bbx@institutiontoggle}}

\DeclareFieldFormat{draftleg}{%
  \StrBefore{#1}{ Bill}}

\DeclareListFormat{billprinting}{%
  \ifstrequal{#1}{HC}{%
    \mkbibbrackets{\strfield{number}}%
    \toggletrue{blx@ox@nopostnotedelim}%
  }{%
    \strfield{number}%
    \togglefalse{blx@ox@nopostnotedelim}}}

\newcommand*{\treatypartysep}{\allowbreak ---\allowbreak}
\DeclareListFormat{treaty}{%
  \ifmoreitems{}{%
    \ifnumequal{\value{listcount}}{1}{%
      \bibopenparen
    }{}%
    \ifnumgreater{\value{liststop}}{\value{listcount}}{%
      #1\treatypartysep
    }{%
      #1\bibcloseparen}}}

\def\siganddate#1{%
  \def\bbx@tempa{#1}%
  \expandafter\bbx@signeddatei#1/relax}
\def\bbx@signeddatei#1=#2/relax{%
  \def\bbx@tempa{#2-}%
  \bibstring{#1}\space\expandafter\makebbx@datei\bbx@tempa}
\def\makebbx@datei#1-#2-#3-{%
  \makebbx@dateii{#1}{#2}{#3}}
\def\makebbx@dateii#1#2#3{%
  \blx@imc@stripzeros{#3}~\mkbibmonth{#2}%
  \space
  #1}
\DeclareListFormat{treatydates}{%
  \ifnumequal{\value{listcount}}{1}{%
    \siganddate{#1}%
  }{%
    \addcomma\space\siganddate{#1}}}

%    \end{macrocode}
%
% \subsubsection{Pagination formats}
%
% We define an alternative to \cs{mkpageprefix} that takes a pagination key
% directly.
%
%    \begin{macrocode}
\newrobustcmd*{\mkrawpageprefix}[1][none]{%
  \begingroup
  \def\blx@tempa{\blx@mkpageprefix@i}%
  \ifstrequal{#1}{none}{}{%
    \ifbibstring{#1}{%
      \def\blx@tempa{\blx@mkpageprefix{#1}}%
    }{%
      \blx@warning@entry{Unknown pagination type '#1'}}}%
  \@ifnextchar[%]
    {\blx@tempa}
    {\blx@tempa[\@firstofone]}}

\newcommand*\paragraphmarkings{[]}
\DeclareFieldFormat[jurisdiction,legislation,legal]{postnote}{%
  \iffieldundef{pagination}{%
    \ifboolexpr{
      test {\ifkeyword{eu}}
      or
      test {\ifkeyword{echr}}
    }{%
      \mkcomprange[{\mkrawpageprefix[paragraph]}]{#1}%
    }{%
      \mkcomprange{#1}}%
  }{%
    \iffieldequals{pagination}{\paragraphmarkings}{%
      \mkcomprange[\mkbibbrackets]{#1}%
    }{%
      \mkcomprange[{\mkpageprefix[pagination]}]{#1}}}}
%    \end{macrocode}
%
% \subsubsection{Shorthands}
%
% With legal references, the introduction of shorthands is less verbose.
%
%    \begin{macrocode}
\renewbibmacro*{shorthandintro}{%
  \iffieldundef{shorthandintro}
    {\iffieldundef{shorthand}
       {}
       {\setunit{\addspace}%
        \printtext[parens]{%
          \ifboolexpr{
            test {\ifentrytype{jurisdiction}}
            or
            test {\ifentrytype{legal}}
            or
            test {\ifentrytype{legislation}}
          }{}{%
            \bibstring{citedas}\space}%
          \printfield{shorthand}}}}
    {\setunit{\addspace}%
     \printtext[parens]{\printfield{shorthandintro}}}}

%    \end{macrocode}
%
% \subsubsection{Common macros}
%
%    \begin{macrocode}
\newbibmacro*{issue/volume}{%
  \iffieldundef{volume}%
    {\iffieldundef{issue}%
     {}%
     {\printfield{issue}}}%
    {\printfield[default]{volume}}}
\newcommand*{\subtypenewsp}{newspaper}
\newbibmacro*{year+vol+report}[1][default]{%
  \iffieldequals{entrysubtype}{\subtypenewsp}{%
    \setunit{\addcomma\space}%
  }{%
    \usebibmacro{journaldate}%
    \setunit{\addspace}%
    \printfield[parens]{origyear}%
    \setunit{\addspace}%
    \printfield{volume}%
    \setunit{\addspace}}%
  \printfield{journaltitle}%
  \setunit*{\addspace}%
  \iffieldundef{series}{}{%
    \setunit{\addspace}%
    \printfield[#1]{series}%
    \setunit{\addspace}}%
  \iffieldequals{entrysubtype}{\subtypenewsp}{%
    \setunit{\addcomma\space}%
    \printdate%
  }{}}
\newbibmacro*{journaldate}[1][]{%
  \ifboolexpr{
    test {\iffieldundef{#1volume}}
    or
    bool {bbx@#1year-essential}
  }{%
    \ifboolexpr{
      test {\ifkeyword{sc}}
      or
      test {\iftoggle{bbx:scotstyle}}
    }{%
      \setunit{\addcomma\space}%
      \printfield{#1year}%
    }{%
      \printfield[brackets]{#1year}}%
  }{%
    \printfield[parens]{#1year}}}
\newcommand*{\casenote}{casenote}
\newcommand{\casenotetext}{\bibstring{casenote}}
\newbibmacro{journaltitle}{%
  \iffieldequals{entrysubtype}{\casenote}{%
    \iffieldundef{crossref}{%
      \usebibmacro{title}%
    }{%
      \iffieldundef{note}{%
        \restorefield{note}{\casenotetext}%
      }{}%
      \ifboolexpr{
        test {\iffootnote}
        and test {\iftoggle{bbx@samefootnote}}
        and test {\iffieldequals{crossref}{\blx@lastkey@foot}}%
      }{}{\printfield[casenotetitle]{title}}}%
  }{%
    \usebibmacro{title}}}
\newbibmacro*{unreported}[1][default]{%
  \iffieldundef{verba}{%
    \ifboolexpr{
      test {\iflistundef{institution}}
      and
      test {\iffieldundef{date}}
      and
      test {\iffieldundef{year}}
    }{}{%
      \ifboolexpr{
        test {\iffieldundef{date}}
        and
        test {\iffieldundef{year}}
      }{%
        \mkbibparens{\printlist[jurisdiction]{institution}}%
      }{%
        \toggletrue{blx@ox@nopostnotedelim}%
        \iflistundef{institution}{%
          \mkbibparens{\usebibmacro{date}}%
        }{%
          \printtext[parens]{%
            \printlist[#1]{institution}%
            \setunit{\addcomma\space}
            \usebibmacro{date}}}}}%
  }{%
    \iftoggle{bbx@ecliuse}{}{%
      \printfield{verba}}}}
\newbibmacro{court-note}{%
  \iffieldundef{note}%
    {}%
    {\printfield{note}%
     \toggletrue{blx@ox@nopostnotedelim}}}
\newbibmacro*{jurisdictionpages}{%
  \let\origadddot\adddot
  \def\adddot{}%
  \iffieldequals{entrysubtype}{\subtypenewsp}{}{%
    \setunit{\addspace}%
    \printfield{pages}}%
  \let\adddot\origadddot
}
\newbibmacro{pcitenote}{%
  \iffieldundef{parreporter}{}{%
    \setunit{\addcomma\space}%
    \iffieldundef{postnote}{}{%
      \printfield{postnote}%
      \clearfield{postnote}%
      \setunit{\addsemicolon\space}}}}
\newbibmacro*{courtid}{%
  \iffieldundef{number}{%
    \ifboolexpr{
      test {\iflistundef{institution}}
      and
      test {\iffieldundef{location}}%
    }{%
      \togglefalse{blx@ox@nopostnotedelim}%
    }{%
      \ifboolexpr{%
        test {\iffieldundef{journaltitle}}
        or
        not togl {bbx:altcourt}
      }{%
        \printtext[parens]{%
          \printfield{location}%
          \setunit{\addspace}%
          \printlist{institution}%
          \usebibmacro{unrep:date}}%
        \toggletrue{blx@ox@nopostnotedelim}
      }{%
        \setunit{\addcomma\space}%
        \printfield{location}%
        \setunit*{\addspace}%
        \printlist{institution}}}%
  }{%
    \togglefalse{blx@ox@nopostnotedelim}}}
\newbibmacro*{unrep:date}{%
  \ifboolexpr{
    test {\iffieldundef{journaltitle}}%
    and
    test {\iffieldundef{number}}%
    and
    test {\iffieldundef{neutralcite}}%
  }{%
    \setunit{\addcomma\space}%
    \usebibmacro{date}%
  }{}}

%    \end{macrocode}
%
% \subsubsection{Legal cases}
%
% There are different formats depending on the jurisdiction.
%
%    \begin{macrocode}
\DeclareBibliographyDriver{jurisdiction}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{juriscitation}%
  \usebibmacro{doi+eprint+url}%
  \setunit{\addspace}%\newblock
  \usebibmacro{addendum+pubstate}%
  \setunit{\addspace}%\newblock
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}
\newtoggle{bbx@juriscitedone}
\newbibmacro{juriscitation}{%
  \togglefalse{bbx@juriscitedone}%
  \renewcommand{\do}[1]{%
    \ifkeyword{##1}{%
      \toggletrue{bbx@juriscitedone}\usebibmacro{##1juriscitation}%
      \listbreak
    }{}}%
  \docsvlist{eu,echr,int,ca,us}%
  \iftoggle{bbx@juriscitedone}{}{\usebibmacro{enjuriscitation}}%
}
%    \end{macrocode}
%
% Here is the format for EU cases.
%
%    \begin{macrocode}
\newtoggle{bbx@commissiondecision}
\newbibmacro*{eujuriscitation}{%
  \ifboolexpr{
    test {\iflistcontains{institution}{\commission}}
    or
    test {\iflistcontains{institution}{\Commission}}
  }{%
    \toggletrue{bbx@commissiondecision}%
  }{%
    \togglefalse{bbx@commissiondecision}}%
  \iftoggle{bbx@commissiondecision}{}{%
    \usebibmacro{eucasenumber}}%
  \usebibmacro{title}%
  \setunit{\addspace}%
  \iftoggle{bbx@commissiondecision}{%
    \usebibmacro{eucommissiondecision}}{}%
  \setunit{\addspace}%
  \usebibmacro{eu:reportinfo}%
  \iftoggle{bbx@commissiondecision}{%
    \setunit{\addcomma\space}%
  }{%
    \setunit{\addspace}}%
  \usebibmacro{altreportdetails}%
  \usebibmacro{court-note}%
}
\newcommand*\oxrefand{ and }
\newbibmacro{eucasetype}{%
  \iffieldundef{type}{%
    \ifboolexpr{
      test {\IfSubStr{\thefield{number}}{,}}
      or
      test {\IfSubStr{\thefield{number}}{--}}
      or
      test {\IfSubStr{\thefield{number}}{\oxrefand}}
    }{%
      \bibstring{eujoinedcases}%
    }{%
      \bibstring{eucase}}%
  }{%
    \printfield{type}}%
}
\newbibmacro{eucasenumber}{%
  \usebibmacro{eucasetype}%
  \setunit{\addnbspace}%
  \printfield{number}%
  \setunit{\addspace}}
\newbibmacro{eucommissiondecision}{%
  \iffieldundef{userb}{%
    \iffieldundef{number}{}{%
      \printtext[parens]{%
        \usebibmacro{eucasetype}%
        \setunit{\addnbspace}%
        \printfield{number}}}%
  }{%
    \printtext[parens]{%
      \printfield{userb}}%
    \setunit{\addspace}%
    \iffieldundef{number}{}{%
      \iffieldundef{type}{%
        \setunit{\addspace\bibstring{commissiondecision}\addspace}%
      }{%
        \setunit{\addspace\printfield{type}\addspace}}%
      \printfield{number}}%
  }%
}
\newbibmacro*{eu:reportinfo}{%
  \iftoggle{bbx@eclionly}{%
    \iffieldundef{verba}{%
      \usebibmacro{eu:osreport}
    }{%
      \printfield{verba}}%
  }{%
    \usebibmacro{eu:osreport}}}
\newbibmacro*{eu:osreport}{%
  \iftoggle{bbx@ecliuse}{%
    \iffieldundef{verba}{}{%
      \printfield{verba}%
      \setunit{\addcomma\space}}%
    }{}%
  \iffieldundef{journaltitle}{%
    \usebibmacro{unreported}%
  }{%
    \usebibmacro{eu:year+vol+report}}}
\newcommand*\officialjournaltitle{OJ}
\newcommand*\ecrreporttitle{ECR}
\newbibmacro*{eu:year+vol+report}{%
  \iffieldequals{journaltitle}{\ecrreporttitle}{%
    \printfield[brackets]{year}%
    \setunit{\addspace}%
    \printfield{journaltitle}%
    \setunit{\addspace}%
    \printfield{volume}%
    \setunit*{\printtext{--\allowbreak}}%
    \printfield{pages}%
  }{%
    \iffieldequals{journaltitle}{\officialjournaltitle}{%
      \printfield[brackets]{year}%
      \setunit{\addspace}%
      \printfield{journaltitle}%
      \setunit{\addspace}%
      \printfield[default]{series}%
      \usebibmacro{issue/volume}%
      \setunit{\printtext{\slash}}%
      \printfield{pages}%
    }{%
      \usebibmacro{year+vol+report}}}}

%    \end{macrocode}
%
% Here is the format for European Human Rights cases.
%
%    \begin{macrocode}
\newbibmacro*{echrjuriscitation}{%
  \usebibmacro{title}%
  \setunit{\addspace}\newblock
  \iffieldundef{number}{}{%
    \printtext[parens]{%
      \def\adddot{}%
      \bibstring{application}\space
      \bibstring{number}\space
      \printfield{number}}%
    \setunit{\addspace}\newblock}%
  \iffieldundef{journaltitle}{%
    \usebibmacro{unreported}[echrinst]%
  }{%
    \usebibmacro{echr:year+vol+report}
    \setunit{\addspace}\newblock
    \usebibmacro{echr:courtid}}%
  \setunit{\addspace}%
  \usebibmacro{court-note}%
  \newblock
  \setunit{\addspace}}
\newcommand*{\seriesa}{Series A}
\newcommand*{\echrreports}{ECHR}
\newbibmacro*{echr:year+vol+report}{%
  \iffieldequals{journaltitle}{\seriesa}{%
    \usebibmacro{seriesareport}%
  }{%
    \iffieldequals{journaltitle}{\echrreports}{%
      \usebibmacro{echrreports}%
    }{%
      \usebibmacro{year+vol+report}
      \setunit{\addspace}%
  \printfield{pages}}}}
\newbibmacro*{seriesareport}{%
  \printfield[parens]{year}%
  \setunit{\addspace}%
  \printfield{journaltitle}%
  \setunit{\addspace}%
  \printtext{\def\adddot{}\bibstring{number}\addspace}%
  \printfield{pages}}
\newbibmacro*{echrreports}{%
  \printfield{journaltitle}%
  \setunit{\addspace}%
  \printfield{year}%
  \iffieldundef{volume}{}{%
    \printtext{--}\printfield[romanvol]{volume}}
  \setunit{\addspace}%
  \printfield{pages}}
\newcommand*{\decisionsandreports}{DR}
\newcommand*{\collectionofdecisions}{CD}
\newbibmacro*{echr:courtid}{%
  \ifboolexpr{
    test {\iffieldequals{journaltitle}{\decisionsandreports}}
    or
    test {\iffieldequals{journaltitle}{\collectionofdecisions}}%
  }{}{%
    \printlist[ecthr]{institution}}}

%    \end{macrocode}
%
% Here is the format for international cases.
%
%    \begin{macrocode}
\newbibmacro*{intjuriscitation}{%
  \iflistundef{institution}{%
    \setunit{}\printtext{}%
  }{%
    \printlist{institution}%
    \setunit{\addcomma\space}}%
  \usebibmacro{int:title}%
  \setunit{\addspace}\newblock
  \iffieldundef{journaltitle}{%
    \printfield{number}%
    \setunit{\addspace}\newblock
    \printtext[parens]{\printdate}%
  }{%
    \usebibmacro{year+vol+report}[international]%
  }%
  \setunit{\addspace}%
  \usebibmacro{int:jurisdictionpages}%
  \setunit{\addspace}\newblock
  \usebibmacro{court-note}%
}
\newbibmacro*{int:title}{%
  \ifboolexpr{
    test {\iffieldundef{title}}
    and
    test {\iffieldundef{subtitle}}
  }{}{%
    \printtext[title]{%
      \printfield[titlecase]{title}%
      \setunit{\addspace}%
      \printfield[parens]{subtitle}}}%
  \setunit{\addspace}%
  \printfield{titleaddon}%
}
\newbibmacro*{int:jurisdictionpages}{%
  \let\origaddot\adddot
  \def\adddot{}%
  \iffieldequals{journaltitle}{\pcijrep}{%
    \printtext{\bibcpstring{number}\addspace}%
    \iffieldundef{pages}{%
      \printfield{number}%
    }{%
      \printfield{pages}}%
  }{%
    \printfield{pages}}%
  \let\addot\origadddot
}

%    \end{macrocode}
%
% Here is the format for Canadian cases.
%
%    \begin{macrocode}
\newbibmacro{cajuriscitation}{%
  \usebibmacro{title}%
  \setunit{\cacasetitlepunct}\newblock
  \printfield{number}%
  \setunit{\addcomma\space}%
  \iffieldundef{journaltitle}{}{%
    \usebibmacro{can:year+vol+report}}%
  \usebibmacro{jurisdictionpages}%
  \usebibmacro{pcitenote}%
  \usebibmacro{altreportdetails}%
  \unspace\printlist[jurisdiction][1-\value{listtotal}]{listb}%
  \newunit\newblock
  \usebibmacro{courtid}%
  \newunit%
  \usebibmacro{court-note}%
  \newblock%
  \newunit}
\newbibmacro*{can:year+vol+report}{%
  \iffieldundef{number}{%
    \setunit{\addspace}%
  }{%
    \ifboolexpr{
      test {\iffieldundef{volume}}
      or
      bool {bbx@year-essential}%
    }{}{%
      \clearfield{year}}}%
  \iffieldequals{entrysubtype}{\subtypenewsp}{}{%
    \iffieldundef{year}{}{%
      \usebibmacro{journaldate}%
      \setunit{\addspace}}}
  \printfield{volume}%
  \setunit{\addspace}%
  \printfield{journaltitle}%
  \setunit*{\addspace}%
  \iffieldundef{series}{}{%
    \setunit{\addspace}%
    \printtext[parens]{\printfield[usseries]{series}}%
    \setunit{\addspace}}%
  \iffieldequals{entrysubtype}{\subtypenewsp}{%
    \setunit{\addcomma\space}%
    \usebibmacro{newspaperdate}%
  }{}}
%    \end{macrocode}
%
% Here is the format for American cases.
%
%    \begin{macrocode}
\newbibmacro{usjuriscitation}{%
  \usebibmacro{title}%
  \setunit{\uscasetitlepunct}\newblock%
  \iffieldundef{journaltitle}{%
    \printfield{number}%
    \setunit{\addcomma\space}%
    \printfield[default]{eprint}%
    \clearfield{eprint}%
  }{
    \usebibmacro{us:vol+report}}%
  \setunit{\addspace}%
  \usebibmacro{jurisdictionpages}%
  \usebibmacro{us:postnote}%
  \usebibmacro{altreportdetails}%
  \setunit{\addspace}\newblock
  \unspace\printlist[jurisdiction][1-\value{listtotal}]{listb}%
  \setunit{\addspace}%
  \usebibmacro{us:courtid+date}%
  \setunit{\addspace}%
  \usebibmacro{court-note}%
  \newblock
  \setunit{\addspace}}
\newbibmacro{us:vol+report}{%
  \printfield{volume}%
  \setunit{\addspace}%
  \printfield{journaltitle}%
  \iffieldundef{series}{}{%
    \setunit{\addspace}%
    \printfield[usseries]{series}}}
\newbibmacro{us:postnote}{%
  \iffieldundef{postnote}{}{%
    \setunit{\addcomma\space}%
    \printfield{postnote}%
    \clearfield{postnote}%
  }}
\newbibmacro{us:courtid+date}{%
  \ifboolexpr{
    test {\iflistundef{institution}}
    and
    test {\iflistundef{location}}
    and
    test {\iffieldundef{year}}
  }{}{%
    \printtext[parens]{%
      \printlist{location}%
      \setunit*{\addspace}%
      \printlist{institution}%
      \setunit{\addspace}%
      \printfield{year}%
      \nopunct}}}

%    \end{macrocode}
%
% Here is the format for English cases.
%
%    \begin{macrocode}
\newbibmacro{enjuriscitation}{%
  \usebibmacro{title}%
  \setunit{\addspace}\newblock
  \printfield{neutralcite}%
  \setunit*{\addcomma\space}%
  \printfield{number}%
  \setunit*{\addcomma\space}%
  \iffieldundef{journaltitle}{}{%
    \usebibmacro{year+vol+report}}%
  \usebibmacro{jurisdictionpages}%
  \usebibmacro{pcitenote}%
  \usebibmacro{altreportdetails}%
  \unspace\printlist[jurisdiction][1-\value{listtotal}]{listb}% additionalreports
  \setunit{\addspace}\newblock
  \usebibmacro{courtid}%
  \setunit{\addspace}%
  \usebibmacro{court-note}}
\newbibmacro{altreportdetails}{%
  \restorefield{prenote}{\postnotesecond}%
  \iffieldundef{parreporter}{}{%
    \usebibmacro{journaldate}[par]%
    \setunit{\addspace}\newblock
    \usebibmacro{altreportvolume}%
    \setunit{\addspace}\newblock
    \usebibmacro{altjournaltitle}%
    \setunit{\addspace}\newblock
    \usebibmacro{altseries}%
    \setunit{\addspace}\newblock
    \usebibmacro{altjurisdictionpages}%
    \iffieldundef{prenote}{}{%
      \setunit{\addcomma\space}%
      \printfield[postnote]{prenote}}}}
\newbibmacro*{altreportvolume}{%
  \iffieldundef{parvolume}{}{%
    \printfield{parvolume}}}
\newbibmacro*{altjournaltitle}{%
  \iffieldundef{parreporter}{}{
    \printfield{parreporter}}}
\newbibmacro*{altseries}{%
  \iffieldundef{parseries}{}{%
    \printfield{parseries}}}
\newbibmacro*{altjurisdictionpages}{%
  \iffieldundef{parpages}{}{%
    \printfield{parpages}}}%

%    \end{macrocode}
%
% \subsubsection{Legislation}
%
% Legislation tends to have a more consistent format, though European
% entries need special handling.
%
%    \begin{macrocode}
\newcommand*{\subtypecourtrules}{procedure-rule}
\DeclareBibliographyDriver{legislation}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \iffieldequals{entrysubtype}{\subtypecourtrules}{%
    \usebibmacro{courtrules}%
  }{%
    \ifkeyword{draft}{%
      \usebibmacro{legislation:bill}%
    }{%
      \ifkeyword{eu}{%
        \usebibmacro{eulegislation}%
      }{%
        \printfield[default]{title}%
        \setunit{\addspace}%
        \printfield[default]{year}%
        \setunit*{\addspace}%
        \usebibmacro{legnumber}%
        \setunit{\addspace}\newblock
        \usebibmacro{legsupp}}}}%
  \setunit{\addcomma\space}%
  \printfield{note}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}
\newbibmacro*{courtrules}{%
  \restorefield{prenote}{\postnotesecond}%
  \iffieldequalstr{shorttitle}{PD}{%
    \printfield{postnote}%
    \clearfield{postnote}%
    \setunit{\addspace}%
  }{}%
  \iffieldundef{shorttitle}{%
    \printfield[default]{title}%
  }{%
    \printfield[default]{shorttitle}}%
  \setunit{\addspace}\newblock
  \iffieldundef{postnote}{%
    \toggletrue{blx@ox@nopostnotedelim}%
  }{%
    \iffieldequalstr{shorttitle}{CPR}{%
      \printfield{postnote}%
      \setunit{\addspace}%
    }{%
      \printtext{%
        \bibstring{order}\space
        \printfield{postnote}%
        \setunit{\addcomma\space}}}}%
  \restorefield{postnote}{\postnotesecond}%
  \usebibmacro{postnote}%
  \clearfield{postnote}%
  \setunit{\addspace}\newblock}
\newcommand*{\subtypeprimarylegislation}{primary}
\newbibmacro*{legislation:bill}{%
  \printfield[draftleg]{title}%
  \setunit{\addspace}%
  \printlist{institution}%
  \setunit*{\addspace}%
  \iffieldequals{entrysubtype}{\subtypeprimarylegislation}{%
    \bibcpstring{bill}%
    \setunit{\addspace}%
    \printtext[parens]{\usebibmacro{sessionyear}}%
    \setunit{\addspace}%
    \iffieldundef{number}{}{%
      \printlist[billprinting]{institution}}%
  }{%
    \printtext[parens]{%
      \bibstring{draft}\space
      \printdate}}
  \setunit{\addspace}}
\newbibmacro*{sessionyear}{%
  \iffieldundef{year}{}{%
    \printfield{year}%
    \iffieldundef{endyear}{}{%
      \bibdaterangesep
      \blx@ox@compyear{\thefield{year}}{\thefield{endyear}}}}}
\newbibmacro{eulegislation}{%
  \printfield[default]{title}%
  \setunit{\addspace}\newblock%
  \usebibmacro{eulegref}}
\newcommand*{\ojspecedtitle}{OJ Spec Ed}
\newbibmacro*{eulegref}{%
  \iffieldequals{journaltitle}{\officialjournaltitle}{%
    \printfield[brackets]{year}%
    \setunit{\addspace}%
    \printfield{journaltitle}%
    \setunit{\addspace}%
    \iffieldundef{series}{%
      \printtext{L}%
    }{%
      \printfield[default]{series}}%
    \usebibmacro{issue/volume}%
    \setunit*{\addslash}%
    \printfield{pages}%
    \togglefalse{blx@ox@nopostnotedelim}%
  }{%
    \usebibmacro{year+vol+report}%
    \setunit*{\addspace}%
    \printfield{pages}}}
\newbibmacro*{legnumber}{%
  \iffieldequals{entrysubtype}{\subtypeprimarylegislation}{%
    \ifboolexpr{(
        test {\iffieldundef{number}}
        or
        not test {\iffieldundef{title}} )
      and not (
        test {\ifkeyword{cy}}
        or
        test {\ifkeyword{sc}}
        or
        test {\ifkeyword{ni}} )
    }{}{%
      \printtext[parens]{\printfield{number}}%
      \toggletrue{blx@ox@nopostnotedelim}}%
  }{%
    \iffieldundef{number}{}{%
      \setunit{\addcomma\addspace}%
      \printfield{number}%
      \togglefalse{blx@ox@nopostnotedelim}}}}
%    \end{macrocode}
%
% This adds additional material for Welsh statutory instruments.
%
%    \begin{macrocode}
\newbibmacro*{legsupp}{%
  \ifkeyword{cy}
    {\iffieldundef{userb}
      {}
      {\printtext{\mkbibparens{\printfield{userb}}}\toggletrue{blx@ox@nopostnotedelim}}}
    {}}

%    \end{macrocode}
%
% \subsubsection{Treaties, explanatory notes and Hansard}
%
%    \begin{macrocode}
\newcommand*{\explanatorynote}{explanatory note}
\newcommand*{\parliamentarytype}{parliamentary}
\newcommand*{\treatysubtype}{piltreaty}
\DeclareBibliographyDriver{legal}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \iffieldequals{entrysubtype}{\explanatorynote}{%
    \printfield[default]{title}%
    \setunit{\addspace}\newblock
  }{%
    \iffieldequals{entrysubtype}{\parliamentarytype}{%
      \usebibmacro{legal:parliamentary}%
    }{%
      \usebibmacro{treatycitation}}}%
  \setunit{\addcomma\space}\newblock
  \printfield[default]{note}
  \setunit{\addspace}\newblock
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \setunit{\bibpagerefpunct}%
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}
\newbibmacro{legal:parliamentary}{%
  \printfield[default]{title}%
  \newunit\newblock
  \printfield{type}%
  \setunit{\addspace}%
  \iffieldundef{series}{}{%
    \printtext[parens]{%
      \biblstring{jourser}\space
      \printfield{series}}}%
  \setunit{\addspace}%
  \printfield{volume}%
  \setunit{\addcomma\space}%
  \usebibmacro{hansard-ref}%
  \setunit{\addspace}%
  \iffieldundef{year}{}{%
    \printtext[parens]{\usebibmacro{date}}}%
  \togglefalse{blx@ox@nopostnotedelim}}
\newbibmacro*{hansard-ref}{%
  \iffieldundef{postnote}{%
    \iffieldundef{pages}{}{%
      \printfield{pages}}%
  }{}}%
\newbibmacro{treatycitation}{%
  \printfield[default]{title}%
  \setunit{\addspace}\newblock%
  \printlist[treaty]{institution}
  \setunit{\addspace}\newblock
  \usebibmacro{treatyinfo}%
  \setunit{\addspace}\newblock
  \usebibmacro{treaty:year+vol+report}}
\newbibmacro{treatyinfo}{%
  \iflistundef{lista}{% execution
    \iffieldundef{year}{}{%
      \iffieldundef{volume}{}{%
        \printtext[parens]{\printdate}}}%
  }{%
    \printtext[parens]{\printlist[treatydates]{lista}}}}
\newbibmacro{treaty:year+vol+report}{%
  \iffieldequals{journaltitle}{\officialjournaltitle}{%
    \usebibmacro{eulegref}%
  }{%
    \usebibmacro{treaty:date}%
    \setunit{\addspace}%
    \printfield[default]{volume}%
    \setunit{\addspace}%
    \printfield{journaltitle}%
    \setunit*{\addspace}%
    \iffieldundef{series}{%
      \printfield{type}%
      \setunit*{\addspace}%
    }{%
      \printfield{series}%
      \iffieldundef{type}{%
        \setunit{\addspace}%
        \bibcpstring{number}
        \setunit{\addspace}%
      }{%
        \setunit{\addcomma\space}%
      }}
    \printfield{number}
    \setunit*{\addspace}%
    \printfield{pages}}}%
\newbibmacro*{treaty:date}{%
  \ifboolexpr{
    test {\iffieldundef{volume}}
    or
    bool {bbx@year-essential}
  }{%
    \ifboolexpr{
      test {\ifkeyword{sc}}
      or
      test {\iftoggle{bbx:scotstyle}}
    }{%
      \printfield{year}%
    }{%
      \printfield[brackets]{year}%
    }}{}}

%    \end{macrocode}
%
% We don't really deal with commentaries as distinct from books.
%
%    \begin{macrocode}
\DeclareBibliographyAlias{commentary}{book}
%    \end{macrocode}
%
% \subsection{Manuscripts}
%
% In the spirit of compatibility, this code is adapted from
% \textsf{biblatex-manuscripts-philology} by Maïeul Rouquette.
%
% Here are the additional punctuation commands.
%
%    \begin{macrocode}
\newcommand{\locationlibrarypunct}{\addcomma\addspace}
\newcommand{\collectionshelfmarkpunct}{\addspace}
\newcommand{\datingpagespunct}{\addcomma\addspace}
\newcommand{\librarycollectionpunct}{\addcomma\addspace}
\newcommand{\pagetotalpagespunct}{\addcomma\addspace}
\newcommand{\columnslayerpunct}{\addsemicolon\addspace}%
%    \end{macrocode}
%
% Here are the configurable macros for the two sides of a folio.
%
%    \begin{macrocode}
\def\recto{r}
\def\verso{v}
\NumCheckSetup{\def\recto{}\def\verso{}}
%    \end{macrocode}
%
% Here are some special field formats for the |manuscript| driver.
% Note that the title is transformed into a descriptor by means of
% an annotation, rather than using a dedicated field. This greatly
% simplifies the code used elsewhere.
%
%    \begin{macrocode}
\DeclareFieldFormat[manuscript,unpublished]{title}{%
  \def\currentfield{title}%
  \iffieldannotation{descriptor}{#1}{\mkbibquote{#1\isdot}}%
  \undef\currentfield}
\DeclareFieldFormat{columns+layer}{\mkbibparens{#1}}
\DeclareFieldFormat{columns}{\mkbibparens{#1}}
\DeclareFieldFormat{layer}{\mkbibparens{#1}}
\DeclareFieldFormat{dating}{#1\isdot}%
\DeclareFieldFormat{support}{\ifbibstring{#1}{\bibstring{#1}}{#1}}
%    \end{macrocode}
%
% Here are the unique bibmacros used by the |manuscripts| driver.
% We hide the date if there is no author or title to prevent it
% appearing as the first element in the reference. Similarly, we
% hide the (vague) |dating| field if the (exact) |date| is displayed.
%
%    \begin{macrocode}
\newbibmacro{manuscript:date}{%
  \ifboolexpr{
    test {\ifnameundef{author}}
    and
    test {\iffieldundef{title}}
    and
    test {\iffieldundef{label}}
  }{}{\usebibmacro{date}}}
\newbibmacro{dating}{%
  \ifboolexpr{(
      test {\ifnameundef{author}}
      and
      test {\iffieldundef{title}}
      and
      test {\iffieldundef{label}}
    ) or
    test {\iffieldundef{year}}
  }{%
    \printfield{dating}%
  }{}}
%    \end{macrocode}
%
% We follow the structure of the \textsf{biblatex-manuscripts-philology}
% approach to allow special formatting to be applied to the collection
% and shelfmark, but we do not actually apply any.
%
%    \begin{macrocode}
\newbibmacro{location+library+collection+shelfmark}{%
  \printfield{library}%
  \setunit{\locationlibrarypunct}%
  \printlist{location}%
  \setunit{\librarycollectionpunct}%
  \usebibmacro{collection+shelfmark}}
\newbibmacro{collection+shelfmark}{%
  \ifboolexpr{
    test {\iffieldundef{collection}}
    and
    test {\iffieldundef{shelfmark}}
  }{}{%
    \printtext[collection+shelfmark]{%
      \printfield{collection}%
      \setunit*{\collectionshelfmarkpunct}%
      \printfield{shelfmark}}}}
%    \end{macrocode}
%
% Again, following \textsf{biblatex-manuscripts-philology}, we allow
% different formatting to be applied to columns and layers according
% to whether they occur adjacently or not, as they might be separated
% by a page specification.
%
%    \begin{macrocode}
\newbibmacro{manuscript:pages}{%
  \printfield{pagetotal}%
  \setunit{\addspace}%
  \iffieldundef{pages}{%
    \usebibmacro{manuscript:columns+layer}%
  }{%
    \usebibmacro{manuscript:columns}%
    \setunit{\pagetotalpagespunct}%
    \printfield{pages}%
    \setunit{\addspace}%
    \usebibmacro{manuscript:layer}}}
\newbibmacro{manuscript:columns}{%
  \iffieldundef{columns}{}{%
    \printtext[columns]{\bibstring{\strfield{columns}column}}}%
}%
\newbibmacro{manuscript:layer}{%
  \iffieldundef{layer}{}{%
    \printtext[layer]{\bibstring{\strfield{layer}layer}}}%
}%
\newbibmacro{manuscript:columns+layer}{%
  \ifboolexpr{
    test {\iffieldundef{columns}}
    or
    test{\iffieldundef{layer}}
  }{%
    \usebibmacro{manuscript:columns}%
    \usebibmacro{manuscript:layer}%
  }{%
    \printtext[columns+layer]{%
      \bibstring{\strfield{columns}column}%
      \setunit*{\columnslayerpunct}%
      \bibstring{\strfield{layer}layer}}}}%
%    \end{macrocode}
%
% Putting it all together, here is the |manuscript| driver.
%
%    \begin{macrocode}
\DeclareBibliographyDriver{manuscript}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{title}%
  \setunit{\titlebyauthordelim}\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \printfield{howpublished}%
  \newunit\newblock
  \printfield{note}%
  \newunit\newblock
  \usebibmacro{manuscript:date}%
  \newunit\newblock
  \usebibmacro{location+library+collection+shelfmark}%
  \newunit
  \printfield{support}%
  \newunit
  \usebibmacro{dating}%
  \setunit{\datingpagespunct}
  \usebibmacro{manuscript:pages}
  \newunit\newblock%
  \iftoggle{bbx:url}{%
    \usebibmacro{url+urldate}%
  }{}%
  \iftoggle{bbx:related}{%
    \usebibmacro{related:init}%
    \usebibmacro{related}%
  }{}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}
%    \end{macrocode}
%
% We provide an alternative bibmacro for doing much the same but with
% the regular \textsf{biblatex} fields.
%
%    \begin{macrocode}
\newbibmacro*{library+location+series+number}{%
  \printfield{library}%
  \setunit{\locationlibrarypunct}%
  \printlist{location}%
  \setunit{\librarycollectionpunct}%
  \ifboolexpr{
    test {\iffieldundef{series}}
    and
    test {\iffieldundef{number}}
  }{}{%
    \printtext[collection+shelfmark]{%
      \printfield{series}%
      \setunit*{\collectionshelfmarkpunct}%
      \printfield{number}}}}
%    \end{macrocode}
%
% Lastly, we adapt the |unpublished| driver to allow it to do a similar
% thing but with the regular \textsf{biblatex} fields. The presence of
% the |library| field is what triggers `manuscript mode'.
%
%    \begin{macrocode}
\newtoggle{blx@ox@ms}
\DeclareBibliographyDriver{unpublished}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \iffieldundef{library}{\togglefalse{blx@ox@ms}}{\toggletrue{blx@ox@ms}}%
  \usebibmacro{author}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{title}%
  \setunit{\titlebyauthordelim}\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \printfield{note}%
  \newunit\newblock
  \printfield{howpublished}%
  \newunit\newblock
  \iftoggle{blx@ox@ms}{%
    \usebibmacro{manuscript:date}%
    \newunit\newblock
    \usebibmacro{library+location+series+number}%
    \newunit
    \printfield{support}%
    \newunit
    \usebibmacro{dating}%
    \setunit{\datingpagespunct}
    \usebibmacro{manuscript:pages}
  }{%
    \usebibmacro{location+date}%
  }%
  \newunit\newblock
  \iftoggle{bbx:url}
    {\usebibmacro{url+urldate}}
    {}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}
%    \end{macrocode}
%
% \subsection{Letters}
%
% The driver for letters is similar to the one for other unpublished materials.
%
%    \begin{macrocode}
\DeclareBibliographyDriver{letter}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \iffieldundef{library}{\togglefalse{blx@ox@ms}}{\toggletrue{blx@ox@ms}}%
  \usebibmacro{author}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{title}%
  \setunit{\titlebyauthordelim}\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \printfield{note}%
  \iffieldundef{howpublished}{}{\nopunct\printfield{howpublished}}%
  \newunit\newblock
  \iftoggle{blx@ox@ms}{%
    \usebibmacro{manuscript:date}%
    \newunit\newblock
    \usebibmacro{library+location+series+number}%
    \newunit
    \printfield{support}%
    \newunit
    \usebibmacro{dating}%
    \setunit{\datingpagespunct}
    \usebibmacro{manuscript:pages}
  }{%
    \usebibmacro{location+date}%
  }%
  \newunit\newblock
  \iftoggle{bbx:url}
    {\usebibmacro{url+urldate}}
    {}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}
\DeclareFieldFormat[letter]{title}{%
  \def\currentfield{title}%
  \iffieldannotation{descriptor}{#1}{\mkbibquote{#1\isdot}}%
  \undef\currentfield}
\DeclareFieldFormat[letter]{date}{%
  \iffieldundef{url}{#1}{\mkbibparens{#1}}}
%    \end{macrocode}
%
% \subsection{Related entries}
%
% We make the punctuation before related items configurable in remaining drivers
% inherited from the standard style, and move the |pageref| macro to the end.
%
%    \begin{macrocode}
\xpatchbibdriver{booklet}{%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \newunit\newblock
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
}{%
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
}{}{\wlog{WARNING: biblatex-oxref failed to patch booklet}}
%    \end{macrocode}
%    \begin{macrocode}
\xpatchbibdriver{misc}{%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \newunit\newblock
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
}{%
  \iftoggle{bbx:related}
    {\usebibmacro{related:init}%
     \usebibmacro{related}}
    {}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
}{}{\wlog{WARNING: biblatex-oxref failed to patch misc}}
%    \end{macrocode}
%
% We provide an option for setting the relatedtype punctuation.
%
%    \begin{macrocode}
\DeclareDelimFormat{begrelateddelimamendedby}{\addcomma\space}
\DeclareDelimFormat{begrelateddelimequals}{\addspace}
\DeclareDelimFormat{begrelateddelimin}{\addcomma\space}
\DeclareDelimFormat{begrelateddelimincludes}{\addcomma\space}
\DeclareDelimFormat{begrelateddelimreprintfrom}{\addperiod\space}
\DeclareDelimFormat{begrelateddelimreviewof}{\newunitpunct}
\DeclareDelimFormat{begrelateddelimtranslationof}{\addspace}
\DeclareDelimFormat{begrelateddelimmultivolume}{\newunitpunct}
\DeclareDelimFormat{relateddelimmultivolume}{\newunitpunct}
\newtoggle{blx@ox@success}
\DeclareBiblatexOption{global,type}[string]{relationpunct}[semicolon]{%
  \bgroup\blx@blxinit
  \ifcsdef{add#1}{\global\toggletrue{blx@ox@success}}{%
    \global\togglefalse{blx@ox@success}%
    \PackageError{biblatex-oxref}{%
      Invalid option 'relationpunct=#1'%
    }{%
      Valid values are 'dot', 'comma', 'semicolon', 'colon',\MessageBreak
      'period', 'exclam', 'question', and 'space'.}}%
  \egroup
  \iftoggle{blx@ox@success}{\ifstrequal{#1}{space}{%
    \DeclareDelimFormat{begrelateddelim}{\addspace}%
  }{%
    \DeclareDelimFormat{begrelateddelim}{\csuse{add#1}\space}}%
  }{}}
\DeclareEntryOption[string]{relationpunct}[semicolon]{%
  \bgroup\blx@blxinit
  \ifcsdef{add#1}{\global\toggletrue{blx@ox@success}}{%
    \global\togglefalse{blx@ox@success}%
    \PackageError{biblatex-oxref}{%
      Invalid option 'relationpunct=#1'%
    }{%
      Valid values are 'dot', 'comma', 'semicolon', 'colon',\MessageBreak
      'period', 'exclam', 'question', and 'space'.}}%
  \egroup
  \iftoggle{blx@ox@success}{\ifstrequal{#1}{space}{%
    \DeclareDelimFormat{begrelateddelim}{\addspace}%
    \DeclareDelimFormat{begrelateddelimamendedby}{\addspace}
    \DeclareDelimFormat{begrelateddelimequals}{\addspace}%
    \DeclareDelimFormat{begrelateddelimin}{\addspace}%
    \DeclareDelimFormat{begrelateddelimincludes}{\addspace}%
    \DeclareDelimFormat{begrelateddelimreprintfrom}{\addspace}%
    \DeclareDelimFormat{begrelateddelimreviewof}{\addspace}%
    \DeclareDelimFormat{begrelateddelimtranslationof}{\addspace}%
    \DeclareDelimFormat{begrelateddelimmultivolume}{\addspace}%
  }{%
    \DeclareDelimFormat{begrelateddelim}{\csuse{add#1}\space}%
    \DeclareDelimFormat{begrelateddelimamendedby}{\csuse{add#1}\space}
    \DeclareDelimFormat{begrelateddelimequals}{\csuse{add#1}\space}%
    \DeclareDelimFormat{begrelateddelimin}{\csuse{add#1}\space}%
    \DeclareDelimFormat{begrelateddelimincludes}{\csuse{add#1}\space}%
    \DeclareDelimFormat{begrelateddelimreprintfrom}{\csuse{add#1}\space}%
    \DeclareDelimFormat{begrelateddelimreviewof}{\csuse{add#1}\space}%
    \DeclareDelimFormat{begrelateddelimtranslationof}{\csuse{add#1}\space}%
    \DeclareDelimFormat{begrelateddelimmultivolume}{\csuse{add#1}\space}}%
  }{}}
\ExecuteBibliographyOptions{relationpunct}
\newcounter{blx@ox@relitem}
\xapptobibmacro{begrelated}{%
  \setcounter{blx@ox@relitem}{0}%
}{}{\wlog{WARNING: biblatex-oxref failed to append to begrelated}}
%    \end{macrocode}
%
% We provide an option to prevent a related item beginning with "in".
%
%    \begin{macrocode}
\newtoggle{blx@ox@norelin}
\DeclareBiblatexOption{global,type,entry}{norelatedin}[true]{%
  \settoggle{blx@ox@norelin}{#1}}
\xapptobibmacro{begrelatedloop}{%
  \iftoggle{blx@ox@norelin}{%
    \renewbibmacro*{in:}{%
      \ifboolexpr{
        test {\iffieldequalstr{entrysubtype}{yearbook}}
        or (
          test {\ifnameundef{author}}
          and
          test {\ifnameundef{translator}}
          and
          test {\iffieldundef{title}}
      )}{}{%
        \bibstring{in}%
        \printunit{\intitlepunct}%
      }}}{}%
}{}{\wlog{WARNING: biblatex-oxref failed to append to begrelatedloop}}

%    \end{macrocode}
%
% \subsubsection{Translations}
%
% Where the related item is the translation, the related string is (by default,
% in English at least) prefaced with the language.
%
%    \begin{macrocode}
\newbibmacro*{rellanguage}{%
  \def\do##1{%
    \entrydata{##1}{%
      \printlist{language}}}%
  \docsvfield{related}%
}
\DeclareFieldFormat{relatedstring:translationof}{%
  \iffieldundef{relatedstring}{%
    \blx@ox@langbibstring{\usebibmacro{rellanguage}}{original}%
    \printunit{\addcomma\space}
  }{%
    \thefield{relatedstring}\printunit{\relatedpunct}}}

\DeclareFieldFormat{related:translationof}{%
  \mkbibbrackets{#1}}
%    \end{macrocode}
%
% \subsubsection{Co-publications}
%
% This relation simply prints what would go in the publication block.
%
%    \begin{macrocode}
\newbibmacro*{related:copub}[1]{%
  \entrydata*{#1}{%
    \usebibmacro{publisher+location+date}%
    \setunit{\relateddelim}}}
%    \end{macrocode}
%
% \subsubsection{Reprints}
%
% The standard styles define a special driver for the |reprintfrom| relation.
% For \pkg[biblatex]{oxref}, the standard generic driver is sufficient, so this code
% reverts the specialization.
%
%    \begin{macrocode}
\renewbibmacro*{related:reprintfrom}[1]{%
  \entrydata*{#1}{%
    \nopunct
    \usedriver{%
      \ifnameundef{savedauthor}{%
        \ifnameundef{savededitor}{}{%
          \ifnamesequal{editor}{savededitor}{%
            \clearname{editor}%
          }{}}%
      }{%
        \ifnamesequal{author}{savedauthor}{%
          \clearname{author}%
        }{}}%
      \iffieldundef{savedtitle}{}{%
        \iffieldsequal{savedtitle}{title}{%
          \clearfield{title}%
        }{}}%
      \renewbibmacro*{related:init}{}%
      \DeclareNameAlias{sortname}{default}%
      \ifbibmacroundef{date+extradate}{}{%
        \renewbibmacro*{date+extradate}{}%
        \renewbibmacro*{date}{\printdate}}%
      \renewbibmacro*{pageref}{}%
    }{%
      \thefield{entrytype}}}}
%    \end{macrocode}
%
% \subsubsection{Articles that span issues}
%
% If an article spans several issues of a journal, we print the second
% reference after the first, omitting any information in common.
%
%    \begin{macrocode}
\newbibmacro*{related:serialarticle}[1]{%
  \entrydata*{#1}{%
    \iffieldundef{savedjournaltitle}{}{%
      \iffieldsequal{journaltitle}{savedjournaltitle}{%
        \clearfield{journaltitle}%
      }{}}%
    \iffieldundef{savedjournalsubtitle}{}{%
      \iffieldsequal{journalsubtitle}{savedjournalsubtitle}{%
        \clearfield{journalsubtitle}%
      }{}}%
    \iffieldundef{savedseries}{}{%
      \iffieldsequal{series}{savedseries}{%
        \clearfield{series}%
      }{}}%
    \iffieldundef{savedyear}{\clearfield{year}}{
      \iffieldsequal{year}{savedyear}{%
        \clearfield{year}%
      }{}}%
    \usebibmacro{journal+issuetitle}%
    \newunit
    \usebibmacro{note+pages}%
    \newunit\newblock
    \usebibmacro{doi+eprint+url}%
    \newunit\newblock
    \usebibmacro{addendum+pubstate}}}
%    \end{macrocode}
%
% \subsubsection{Reviews}
%
% We ensure that the field formatting for |review| entries matches that
% for |article| entries.
%
%    \begin{macrocode}
\DeclareFieldFormat[review]{title}{\mkbibquote{#1\isdot}}
\DeclareFieldFormat[review]{volume}{#1}% volume of a journal
\DeclareFieldFormat[review]{number}{#1}% number of a journal
\DeclareFieldFormat[review]{series}{% series of a journal
  \ifinteger{#1}
  {\mkbibordseries{#1}~\bibstring{jourser}}
  {\ifbibstring{#1}{\bibstring{#1}}{#1}}}
%    \end{macrocode}
%
% We take advantage of the Biber-specific mechanism of relating items
% in order to handle reviews. Compared to the default code, this is
% simpler in that we don't check for repeated authors\slash editors (it
% would be a rather biased review!), we directly set the author format,
% and we don't nullify the \code{date+extradate} macro.
%
%    \begin{macrocode}
\newbibmacro*{related:reviewof}[1]{%
  \entrydata*{#1}{%
    \usedriver{%
      \renewbibmacro*{related:init}{}%
      \DeclareNameAlias{author}{given-family}%
      \renewbibmacro*{pageref}{}%
    }{\thefield{entrytype}}%
  }%
}
%    \end{macrocode}
%
% Since a review is a special kind of journal article, the |review|
% driver is based on the |article| one, the difference being that the
% |related| macro comes just before |journal+issuetitle|. Oxford style
% links the two with \enquote{in}.
%
%    \begin{macrocode}
\DeclareBibliographyDriver{review}{%
  \usebibmacro{bibindex}%
  \usebibmacro{begentry}%
  \usebibmacro{author/translator+others}%
  \setunit{\printdelim{nametitledelim}}\newblock
  \usebibmacro{title}%
  \setunit{\titlebyauthordelim}\newblock
  \usebibmacro{byauthor}%
  \newunit\newblock
  \usebibmacro{bytranslator+others}%
  \newunit\newblock
  \printfield{version}%
  \newunit\newblock
  \iftoggle{bbx:related}{%
    \usebibmacro{related:init}%
    \usebibmacro{related}%
  }{}%
  \newunit\newblock
  \usebibmacro{in:}%
  \setunit{\addspace}%
  \usebibmacro{journal+issuetitle}%
  \newunit
  \usebibmacro{byeditor+others}%
  \iffieldundef{note}%
    {\newunit}%
    {\setunit{\addsemicolon\addspace}}%
  \usebibmacro{note+pages}%
  \newunit\newblock
  \iftoggle{bbx:isbn}
    {\printfield{issn}}
    {}%
  \newunit\newblock
  \usebibmacro{doi+eprint+url}%
  \newunit\newblock
  \usebibmacro{addendum+pubstate}%
  \setunit{\bibpagerefpunct}\newblock
  \usebibmacro{pageref}%
  \usebibmacro{finentry}}

%    \end{macrocode}
%
% \subsubsection{Multiple volumes}
%
% Standard \textsf{biblatex} provides the \code{multivolume} relation for
% different volumes of the same work that have slightly different publication
% details, but it doesn't quite work for Oxford style. This works better.
%
%    \begin{macrocode}
\DeclareFieldFormat{related:multivolume}{#1}
\renewbibmacro*{related:multivolume}[1]{%
  \entrydata*{#1}{%
    \printtext{%
      \printfield{volume}%
      \printfield{part}%
      \iffieldsequal{savedtitle}{title}{}{%
        \setunit{\addcolon\space}%
        \usebibmacro{title}}%
    }%
    \setunit*{\addspace}%
    \iffieldsequal{savedseries}{series}{\clearfield{series}}{}%
    \iffieldsequal{savednumber}{number}{\clearfield{number}}{}%
    \iffieldsequal{savededition}{edition}{\clearfield{edition}}{}%
    \ifboolexpr{
      test {\iflistsequal{savedpublisher}{publisher}}
      and
      test {\iflistsequal{savedlocation}{location}}
    }{\clearlist{publisher}\clearlist{location}}{}%
      \iffieldsequal{saveddate}{date}{\clearfield{date}}{}%
      \usebibmacro{series+number+edition+publisher+location+date}%
    }}

%    \end{macrocode}
%
% \subsubsection{Related editions}
%
% This macro is based on the \enquote{bytranslator} one, but more general.
% Note that |\mkrelatedstringtext| was introduced in \pkg{biblatex} v3.16,
% so we backport it if an earlier version is used.
%
%    \begin{macrocode}
\providecommand*{\mkrelatedstringtext}[1]{{{\mainlang #1}}}
\newbibmacro*{related:editedas}[1]{%
  \entrydata{#1}{%
    \renewbibmacro*{name:hook}[1]{%
      \ifnumequal{\value{listcount}}{1}
        {\mkrelatedstringtext{\lbx@initnamehook{#1}}}
        {}}%
    \printfield{edition}%
    \setunit{\addspace}%
    \usebibmacro{byeditor+others}%
    \setunit*{\addcomma\space\bibstring[\mkrelatedstringtext]{astitle}\space}%
    \usebibmacro{maintitle+title}%
    \setunit{\addspace}%
    \printfield{note}%
    \newunit\newblock
    \printfield{volumes}%
    \newunit
    \usebibmacro{series+number+publisher+location+date}}}
\renewbibmacro*{related:bytranslator}[1]{%
  \entrydata{#1}{%
    \renewbibmacro*{name:hook}[1]{%
      \ifnumequal{\value{listcount}}{1}
        {\mkrelatedstringtext{\lbx@initnamehook{#1}}}
        {}}%
    \printnames[bytranslator]{translator}%
    \setunit*{\addspace\bibstring[\mkrelatedstringtext]{astitle}\space}%
    \usebibmacro{maintitle+title}%
    \setunit{\addspace}%
    \printfield{note}%
    \newunit\newblock
    \printfield{volumes}%
    \newunit
    \usebibmacro{series+number+publisher+location+date}}}

%    \end{macrocode}
%
% \subsubsection{Joint releases}
%
% We provide support for CDs (for example) which contain more than one work.
%
%    \begin{macrocode}
\newbibmacro*{related:includes}[1]{%
  \stepcounter{blx@ox@relitem}%
  \ifnumequal{\value{blx@ox@relitem}}{\value{bbx:relatedtotal}}%
    {\bibstring{and}\addspace}{}%
  \entrydata{#1}{%
    \ifbibmacroundef{date+extradate}{}{%
      \renewbibmacro*{date+extradate}{}}%
    \usebibmacro{author}%
    \setunit{\printdelim{nametitledelim}}\newblock
    \usebibmacro{title}}}
%    \end{macrocode}
%
% \subsubsection{Subitems}
%
% We provide support for items in items in items. The outer two layers should
% be taken care of with an |incollection| entry or equivalent. The innermost
% item should be a |misc| entry. While we're at it, we provide descriptor
% support for |misc| entries.
%
%    \begin{macrocode}
\DeclareFieldFormat[misc]{title}{%
  \def\currentfield{title}%
  \iffieldannotation{descriptor}{#1}{%
    \iffieldequalstr{relatedtype}{in}{%
      \mkbibquote{#1\isdot}%
    }{%
      \mkbibemph{#1}%
    }}%
  \undef\currentfield}
\newbibmacro*{related:in}[1]{%
  \entrydata*{#1}{%
    \usedriver
      {\ifnameundef{savedauthor}
         {\ifnameundef{savededitor}
            {}
            {\ifnamesequal{editor}{savededitor}
               {\clearname{editor}}
               {}}}
         {\ifnamesequal{author}{savedauthor}
            {\clearname{author}}
            {}}%
       \renewbibmacro*{related:init}{}%
       \DeclareNameAlias{sortname}{default}%
       \ifbibmacroundef{date+extradate}
         {}
         {\renewbibmacro*{date+extradate}{}%
          \renewbibmacro*{date}{\printdate}}%
       \renewbibmacro*{pageref}{}}
      {\thefield{entrytype}}%
    \ifboolexpr{
      test {\iffieldundef{pages}}
      or
      test {\iffieldundef{savedpages}}
    }{%
      \newunit\newblock
    }{%
      \setunit{\addspace}%
      \bibstring{thiscite}%
      \printunit{\addspace}%
    }%
  }%
  \usebibmacro{chapter+pages}%
}

%    \end{macrocode}
%
% \subsection{Source maps}
%
% We use the source mapping capabilities of Biber to fix the following issues.
%
%    \begin{macrocode}
\DeclareStyleSourcemap{%
  \maps[datatype=bibtex]{%
%    \end{macrocode}
%
% \subsubsection{Sort order}
%
% |proceedings| and |mvproceedings| entries allow an organization to be printed
% in the author position.
%
%    \begin{macrocode}
    \map{
      \pertype{proceedings}
      \pertype{mvproceedings}
      \step[notfield=author,
        fieldsource=organization,
        fieldtarget=author]
    }
%    \end{macrocode}
%
% \subsubsection{Descriptors}
%
% This map provides a helpful \code{descriptor} field that can simplify the
% provision of descriptors, being notes that can act as titles.
%
%    \begin{macrocode}
    \map[overwrite=false]{
      \step[fieldsource=descriptor, final]
      \step[notfield=title,
        fieldset=title+an,
        fieldvalue={=descriptor}]
      \step[notfield=title,
        fieldsource=descriptor,
        fieldtarget=title]
      \step[fieldsource=descriptor,
        fieldtarget=note]
    }
%    \end{macrocode}
%
% \subsubsection{Pseudonyms and inferred authorship}
%
% These help ensure compatibility with \textsf{biblatex-realauthor}.
%
%    \begin{macrocode}
    \map[overwrite=false]{
      \step[fieldsource=realauthor, final]
      \step[notfield=author,
        fieldset=author+an,
        fieldvalue={=inferred}]
      \step[notfield=author,
        fieldsource=realauthor,
        fieldtarget=author]
      \step[fieldsource=realauthor,
        fieldtarget=authoraddon]
    }
    \map[overwrite=false]{
      \step[fieldsource=realeditor, final]
      \step[notfield=editor,
        fieldset=editor+an,
        fieldvalue={=inferred}]
      \step[notfield=editor,
        fieldsource=realeditor,
        fieldtarget=editor]
      \step[fieldsource=realeditor,
        fieldtarget=editoraddon]
    }
%    \end{macrocode}
%
% \subsubsection{Editors as joint authors}
%
% This map provides a more portable interface for declaring a translator
% or revisor to be a joint author.
%
%    \begin{macrocode}
    \map[overwrite=false]{
      \step[fieldsource=editor+an,
        match=\regexp{=jointauthor},
        final]
      \step[fieldsource=editor,
        fieldtarget=jointauthor]
      \step[fieldsource=editortype,
        fieldtarget=jointauthortype]
    }
    \map[overwrite=false]{
      \step[fieldsource=translator+an,
        match=\regexp{=jointauthor},
        final]
      \step[fieldsource=translator,
        fieldtarget=jointauthor]
      \step[fieldset=jointauthortype,
        fieldvalue={=translator}]
    }
%    \end{macrocode}
%
% \subsubsection{Standards}
%
% The purpose of this map is to move the number to the head of the reference
% in the absence of an author, and try to fix the sorting accordingly.
%
%    \begin{macrocode}
    \map[overwrite=false]{
      \pertype{standard}
      \step[notfield=author,
            fieldsource=number,
            final]
      \step[fieldset=sortkey,
            origfieldval]
    }
%    \end{macrocode}
%
% \subsubsection{Audiovisual materials}
%
% For audiovisual materials, |origdatetype| defaults to \enquote{recorded}.
%
%    \begin{macrocode}
    \map[overwrite=false]{
      \pertype{audio}
      \pertype{music}
      \pertype{movie}
      \pertype{video}
      \pertype{inaudio}
      \pertype{inmusic}
      \pertype{inmovie}
      \pertype{invideo}
      \step[fieldset=origdatetype,fieldvalue={recorded}]
    }
%    \end{macrocode}
%
% \subsubsection{Legal references}
%
% These help ensure compatibility with \pkg{oscola}.
%
%    \begin{macrocode}
    \map[overwrite=false]{
      \pertype{jurisdiction}
      \step[fieldsource=reporter,
            fieldtarget=journaltitle]
      \step[fieldsource=court,
            fieldtarget=institution]
      \step[fieldsource=additionalreports,
            fieldtarget=listb]
      \step[fieldsource=ecli,
            fieldtarget=verba]
     }%
    \map[overwrite=false]{
      \pertype{legal}
      \step[fieldsource=reporter,
            fieldtarget=journaltitle]
    }
    \map[overwrite=true]{
        \pertype{legal}
        \step[fieldsource=parties,
              fieldtarget=institution]
        \step[fieldsource=execution,
              fieldtarget=lista]
    }
%    \end{macrocode}
%
% This is how \pkg{oscola} removes dots from entries.
%
%    \begin{macrocode}
    \map[overwrite=true]{
     \pertype{jurisdiction}
     \pertype{legislation}
     \pertype{legal}
     \step[fieldsource=title,
           match=\regexp{(\d)\.(\d)},
           replace=\regexp{$1.$2}]
     \step[fieldsource=title,
           match=\regexp{(\D)\.(\d)},
           replace=\regexp{$1 $2}]
     \step[fieldsource=title,
            match=\regexp{(?:\A|[^{])\K\.([^\d}])},
            replace=\regexp{$1}]
     \step [fieldsource=title,
            match=\regexp{([^\d{])\.(?![}])},
            replace=\regexp{$1}]
     \step[fieldsource=shorttitle,
           match=\regexp{(\d)\.(\d)},
           replace=\regexp{$1.$2}]
     \step[fieldsource=shorttitle,
           match=\regexp{(\D)\.(\d)},
           replace=\regexp{$1 $2}]
     \step[fieldsource=shorttitle,
            match=\regexp{(?:\A|[^{])\K\.([^\d}])},
            replace=\regexp{$1}]
     \step [fieldsource=shorttitle,
            match=\regexp{([^\d{])\.(?![}])},
            replace=\regexp{$1}]
     \step[fieldsource=parreporter,
           match=\regexp{(\d)\.(\d)},
           replace=\regexp{$1.$2}]
     \step[fieldsource=parreporter,
           match=\regexp{(\D)\.(\d)},
           replace=\regexp{$1 $2}]
     \step[fieldsource=parreporter,
            match=\regexp{(?:\A|[^{])\K\.([^\d}])},
            replace=\regexp{$1}]
     \step [fieldsource=parreporter,
            match=\regexp{([^\d{])\.(?![}])},
            replace=\regexp{$1}]
     \step[fieldsource=journaltitle,
           match=\regexp{(\d)\.(\d)},
           replace=\regexp{$1.$2}]
     \step[fieldsource=journaltitle,
           match=\regexp{(\D)\.(\d)},
           replace=\regexp{$1 $2}]
     \step[fieldsource=journaltitle,
            match=\regexp{(?:\A|[^{])\K\.([^\d}])},
            replace=\regexp{$1}]
     \step [fieldsource=journaltitle,
            match=\regexp{([^\d{])\.(?![}])},
            replace=\regexp{$1}]
     \step[fieldsource=institution,
           match=\regexp{(\d)\.(\d)},
           replace=\regexp{$1.$2}]
     \step[fieldsource=institution,
           match=\regexp{(\D)\.(\d)},
           replace=\regexp{$1 $2}]
     \step[fieldsource=institution,
            match=\regexp{(?:\A|[^{])\K\.([^\d}])},
            replace=\regexp{$1}]
     \step[fieldsource=institution,
            match=\regexp{([^\d{])\.(?![}])},
            replace=\regexp{$1}]
     \step[fieldsource=publisher,
           match=\regexp{(\d)\.(\d)},
           replace=\regexp{$1.$2}]
     \step[fieldsource=publisher,
           match=\regexp{(\D)\.(\d)},
           replace=\regexp{$1 $2}]
     \step[fieldsource=publisher,
            match=\regexp{(?:\A|[^{])\K\.([^\d}])},
            replace=\regexp{$1}]
     \step [fieldsource=publisher,
            match=\regexp{([^\d{])\.(?![}])},
            replace=\regexp{$1}]
     \step[fieldsource=location,
           match=\regexp{(\d)\.(\d)},
           replace=\regexp{$1.$2}]
     \step[fieldsource=location,
           match=\regexp{(\D)\.(\d)},
           replace=\regexp{$1 $2}]
     \step[fieldsource=location,
            match=\regexp{(?:\A|[^{])\K\.([^\d}])},
            replace=\regexp{$1}]
     \step [fieldsource=location,
            match=\regexp{([^\d{])\.(?![}])},
            replace=\regexp{$1}]
     \step[fieldsource=series,
           match=\regexp{(\d)\.(\d)},
           replace=\regexp{$1.$2}]
     \step[fieldsource=series,
           match=\regexp{(\D)\.(\d)},
           replace=\regexp{$1 $2}]
     \step[fieldsource=series,
            match=\regexp{(?:\A|[^{])\K\.([^\d}])},
            replace=\regexp{$1}]
     \step [fieldsource=series,
            match=\regexp{([^\d{])\.(?![}])},
            replace=\regexp{$1}]
     \step[fieldsource=indextitle,
           match=\regexp{(\d)\.(\d)},
           replace=\regexp{$1.$2}]
     \step[fieldsource=indextitle,
           match=\regexp{(\D)\.(\d)},
           replace=\regexp{$1 $2}]
     \step[fieldsource=indextitle,
            match=\regexp{(?:\A|[^{])\K\.([^\d}])},
            replace=\regexp{$1}]
     \step [fieldsource=indextitle,
            match=\regexp{([^\d{])\.(?![}])},
            replace=\regexp{$1}]
    }
%    \end{macrocode}
%
% If |casenumber| is given, it is converted to |number| or, if the |number| is
% already set, |userb|.
%
%    \begin{macrocode}
    \map[overwrite=false]{
      \step[fieldsource=casenumber, final]
      \step[notfield=number, fieldsource=casenumber, fieldtarget=number]
      \step[fieldsource=casenumber, fieldtarget=userb]
    }
  }%
}

%    \end{macrocode}
%
% \subsection{Sorting schemes}
%
% We adjust the sort order to take into account some other fields that might
% end up at the front (library, collection, series). The `|nty|` scheme is used
% by \textsf{oxnotes}.
%
%    \begin{macrocode}
\DeclareSortingTemplate{nty}{
  \sort{
    \field{presort}
  }
  \sort[final]{
    \field{sortkey}
  }
  \sort{
    \field{sortname}
    \field{author}
    \field{editor}
    \field{translator}
    \field{sorttitle}
    \field{title}
    \field{library}
  }
  \sort{
    \field{sorttitle}
    \field{title}
  }
  \sort{
    \field{sortyear}
    \field{year}
  }
  \sort{
    \field{volume}
    \literal{0}
  }
  \sort{
    \field{location}
  }
  \sort{
    \field{collection}
    \field{series}
  }
}
%    \end{macrocode}
%
% The `|nyt|` scheme is used by \textsf{oxyear}.
%
%    \begin{macrocode}
\DeclareSortingTemplate{nyt}{
  \sort{
    \field{presort}
  }
  \sort[final]{
    \field{sortkey}
  }
  \sort{
    \field{sortname}
    \field{author}
    \field{editor}
    \field{translator}
    \field{sorttitle}
    \field{title}
    \field{library}
  }
  \sort{
    \field{sortyear}
    \field{labelyear}
    \field{year}
  }
  \sort{
    \field{sorttitle}
    \field{title}
  }
  \sort{
    \field{volume}
    \literal{0}
  }
  \sort{
    \field{location}
  }
  \sort{
    \field{collection}
    \field{series}
  }
}
%    \end{macrocode}
%
% The `|anyt|` scheme is used by \textsf{oxalph}.
%
%    \begin{macrocode}
\DeclareSortingTemplate{anyt}{
  \sort{
    \field{presort}
  }
  \sort{
    \field{labelalpha}
  }
  \sort[final]{
    \field{sortkey}
  }
  \sort{
    \field{sortname}
    \field{author}
    \field{editor}
    \field{translator}
    \field{sorttitle}
    \field{title}
    \field{library}
  }
  \sort{
    \field{sortyear}
    \field{labelyear}
    \field{year}
  }
  \sort{
    \field{sorttitle}
    \field{title}
  }
  \sort{
    \field{volume}
    \literal{0}
  }
  \sort{
    \field{location}
  }
  \sort{
    \field{collection}
    \field{series}
  }
}
%    \end{macrocode}
%
% The following entry types never put editors first.
%
%    \begin{macrocode}
\ExecuteBibliographyOptions
  [proceedings,report,artwork,audio,image,music,movie,performance,video,%
  manuscript,unpublished,review]{useeditor=false}
%    \end{macrocode}
%
% \iffalse %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%</o>
%<*n>
%<*default>
% \fi %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% \section{Notes style: oxnotes.bbx}
%
% \setcounter{FancyVerbLine}{19}
%
% \subsection{Preliminaries}
%
% First we load the common \pkg[biblatex]{oxref} features.
%
%    \begin{macrocode}
\RequireBibliographyStyle{oxref}
%    \end{macrocode}
%
% \subsection{Names}
%
% We apply our special name format to names likely to appear at the start of
% an entry.
%
%    \begin{macrocode}
\DeclareNameAlias{author}{bib-family-given/cite-given-family}
\DeclareNameAlias[related:reviewof]{author}{given-family}
\DeclareNameAlias{editor}{bib-family-given/cite-given-family}
\DeclareNameAlias[related:reviewof]{editor}{given-family}
%    \end{macrocode}
%
% We ensure the printing of the |anon| localization string matches.
%
%    \begin{macrocode}
\xpatchbibmacro{author}{%
  \iftoggle{blx@ox@abbranon}{\bibcpsstring{anon}}{\bibcplstring{anon}}%
}{%
  \iftoggle{blx@ox@abbranon}{%
    \iftoggle{blx@ox@scnames}{\bibcpsstring[\textsc]{anon}}{\bibcpsstring{anon}}%
  }{%
    \iftoggle{blx@ox@scnames}{\bibcplstring[\textsc]{anon}}{\bibcplstring{anon}}%
  }%
}{}{\wlog{WARNING: biblatex-oxref (oxnotes) failed to patch author}}
%    \end{macrocode}
%
% \subsection{Multivolume dates}
%
% For the very particular use case of breaking down multivolume works into
% their constituent volumes, we remove the overall date, assuming that the
% individual volume dates will be used instead.
%
%    \begin{macrocode}
\xpretobibmacro{series+number+edition+publisher+location+date}{%
  \iffieldequalstr{relatedtype}{multivolume}{%
    \clearfield{year}\clearfield{month}\clearfield{day}%
  }{}}{}{}
%    \end{macrocode}
%
% \subsection{Source maps}
%
%    \begin{macrocode}
\DeclareStyleSourcemap{%
  \maps[datatype=bibtex]{%
%    \end{macrocode}
%
% \subsubsection{Sort order}
%
% For entry types that print the |maintitle| and |volume| before the |title|,
% we need to make sure this is reflected in the sort order.
%
%    \begin{macrocode}
    \map{
      \pertype{mvbook}
      \pertype{mvcollection}
      \pertype{mvreference}
      \pertype{proceedings}
      \pertype{mvproceedings}
      \pertype{report}
      \step[fieldsource=maintitle]%
      \step[fieldset=sorttitle, origfieldval]%
      \step[fieldsource=volume]%
      \step[fieldset=sorttitle, append, origfieldval]%
      \step[fieldsource=title]%
      \step[fieldset=sorttitle, append, origfieldval]%
    }%
  }%
}
%    \end{macrocode}
%
% \iffalse %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%</default>
%<*ibid|note|inote|trad1|trad2|trad3>
\RequireBibliographyStyle{oxnotes}
%</ibid|note|inote|trad1|trad2|trad3>
%</n>
%<*m>
% \fi %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% \section{Numeric style: oxnum.bbx}
%
% \setcounter{FancyVerbLine}{19}
%
% \subsection{Preliminaries}
%
% First we load the common \pkg[biblatex]{oxref} features.
%
%    \begin{macrocode}
\RequireBibliographyStyle{oxref}
%    \end{macrocode}
%
% \subsection{Names}
%
% We apply our special name format to names likely to appear at the start of
% an entry.
%
%    \begin{macrocode}
\DeclareNameAlias{author}{bib-family-given/cite-given-family}
\DeclareNameAlias[related:reviewof]{author}{given-family}
\DeclareNameAlias{editor}{bib-family-given/cite-given-family}
\DeclareNameAlias[related:reviewof]{editor}{given-family}
%    \end{macrocode}
%
% We ensure the printing of the |anon| localization string matches.
%
%    \begin{macrocode}
\xpatchbibmacro{author}{%
  \iftoggle{blx@ox@abbranon}{\bibcpsstring{anon}}{\bibcplstring{anon}}%
}{%
  \iftoggle{blx@ox@abbranon}{%
    \iftoggle{blx@ox@scnames}{\bibcpsstring[\textsc]{anon}}{\bibcpsstring{anon}}%
  }{%
    \iftoggle{blx@ox@scnames}{\bibcplstring[\textsc]{anon}}{\bibcplstring{anon}}%
  }%
}{}{\wlog{WARNING: biblatex-oxref (oxnum) failed to patch author}}
%    \end{macrocode}
%
% \subsection{Multivolume dates}
%
% For the very particular use case of breaking down multivolume works into
% their constituent volumes, we remove the overall date, assuming that the
% individual volume dates will be used instead.
%
%    \begin{macrocode}
\xpretobibmacro{series+number+edition+publisher+location+date}{%
  \iffieldequalstr{relatedtype}{multivolume}{%
    \clearfield{year}\clearfield{month}\clearfield{day}%
  }{}}{}{}
%    \end{macrocode}
%
% \subsection{Label numbers}
%
% This next code is extracted from the standard |numeric| style.
%
%    \begin{macrocode}
\ExecuteBibliographyOptions{labelnumber}

\providebool{bbx:subentry}

\DeclareBibliographyOption{subentry}[true]{%
  \setbool{bbx:subentry}{#1}}

\DeclareFieldFormat{bibentrysetcount}{\mkbibparens{\mknumalph{#1}}}
\DeclareFieldFormat{labelnumberwidth}{\mkbibbrackets{#1}}
\DeclareFieldFormat{shorthandwidth}{\mkbibbrackets{#1}}

\defbibenvironment{bibliography}
  {\list
     {\printtext[labelnumberwidth]{%
      \printfield{labelprefix}%
      \printfield{labelnumber}}}
     {\setlength{\labelwidth}{\labelnumberwidth}%
      \setlength{\leftmargin}{\labelwidth}%
      \setlength{\labelsep}{\biblabelsep}%
      \addtolength{\leftmargin}{\labelsep}%
      \setlength{\itemsep}{\bibitemsep}%
      \setlength{\parsep}{\bibparsep}}%
      \renewcommand*{\makelabel}[1]{\hss##1}}
  {\endlist}
  {\item}

\defbibenvironment{shorthand}
  {\list
     {\printfield[shorthandwidth]{shorthand}}
     {\setlength{\labelwidth}{\shorthandwidth}%
      \setlength{\leftmargin}{\labelwidth}%
      \setlength{\labelsep}{\biblabelsep}%
      \addtolength{\leftmargin}{\labelsep}%
      \setlength{\itemsep}{\bibitemsep}%
      \setlength{\parsep}{\bibparsep}%
      \renewcommand*{\makelabel}[1]{\hss##1}}}
  {\endlist}
  {\item}

\DeclareBibliographyDriver{set}{%
  \entryset
    {\ifbool{bbx:subentry}
       {\printfield[bibentrysetcount]{entrysetcount}%
        \printunit*{\addnbspace}}
       {}}
    {}%
  \newunit\newblock
  \usebibmacro{setpageref}%
  \finentry}
%    \end{macrocode}
%
% \iffalse %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%</m>
%<*y>
% \fi %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% \section{Author–year style: oxyear.bbx}
%
% \setcounter{FancyVerbLine}{19}
%
% \subsection{Preliminaries}
%
% First we load the common \pkg[biblatex]{oxref} features.
%
%    \begin{macrocode}
\RequireBibliographyStyle{oxref}
%    \end{macrocode}
%
% Here we set some defaults different to the standard ones. The author
% can still override them.
%
%    \begin{macrocode}
\ExecuteBibliographyOptions{giveninits,labeldateparts,sorting=nyt,pagetracker,maxcitenames=2}
%    \end{macrocode}
%
% \subsection{Date merging option}
%
% We provide the |mergedate| option from the |authoryear| style. In case it
% isn't clear from the standard documentation, the purpose of this option is
% twofold: it determines whether the date printed at the head of the reference
% is the same as or different from |labeldate| as used in the citations, and
% to what extent the date information at the head of the reference is repeated
% later on. The OGS and NHR consistently use a variant that is between the
% basic and compact options, in that the year is always moved to the head of
% the reference (matching |labeldate|) but the month and day are never moved;
% this is implemented as the |year| value.
%
%    \begin{macrocode}
\DeclareBiblatexOption{global,type,entry}{mergedate}[true]{%
  \ifcsdef{bbx@opt@mergedate@#1}
    {\csuse{bbx@opt@mergedate@#1}}
    {\PackageError{biblatex-oxref}
       {Invalid option 'mergedate=#1'}
       {Valid values are 'maximum', 'compact', 'basic', 'minimum',\MessageBreak
        'year', 'true' (=year), and 'false'.}}}
%    \end{macrocode}
%
% The various values affect the definition of the following macro, used at
% the head of the reference, for which we coin the |datelabel| field format.
%
%    \begin{macrocode}
\providebibmacro*{date+extradate}{}
\DeclareFieldFormat{datelabel}{\mkbibparens{#1}}
\DeclareFieldFormat{labeldate}{%
  \iflabeldateisdate{%
    \def\currentfield{date}%
  }{%
    \iflabeldateisanydate{%
      \def\currentfield{\thefield{labeldatesource}date}%
    }{%
      \def\currentfield{\thefield{labeldatesource}}}}%
  \iffieldannotation{inferred}{\mkbibbrackets{#1}}{#1}%
  \undef\currentfield}
%    \end{macrocode}
%
% On a related note, the |labeldate| uses the |origdate| if provided in
% preference to |date|, and falls back to |pubstate| if provided.
%
%    \begin{macrocode}
\DeclareLabeldate{%
  \field{origdate}
  \field{date}
  \field{year}
  \field{eventdate}
  \field{pubstate}
  \literal{nodate}
}
%    \end{macrocode}
%
% The |extradate| string should be printed bare.
%
%    \begin{macrocode}
\DeclareFieldFormat{extradate}{%
  \iffieldundef{\thefield{labeldatesource}}{%
    \iffieldnums{\thefield{labeldatesource}year}{}{~}%
  }{%
    \iffieldnums{\thefield{labeldatesource}}{}{~}%
  }%
  \mkbibemph{\mknumalph{#1}}}%

%    \end{macrocode}
%
% We provide tests similar to \cs{labeldateisdate} to tell if the |labeldate|
% is (\emph{a}) any type of date, and (\emph{b}) neither a date nor |pubstate|.
%
%    \begin{macrocode}
\def\iflabeldateisanydate{%
  \ifboolexpr{%
    togl {blx@labeldateparts}
    and not test {\iffieldundef{labeldatesource}}
    and (
      test {\iffieldequalstr{labeldatesource}{year}}
      or not test {\iffieldundef{\thefield{labeldatesource}year}}
    )}}
\def\iflabeldateispubstate{%
  \ifboolexpr{%
    not test {\iffieldundef{labeldatesource}}
    and test {\iffieldequalstr{labeldatesource}{pubstate}}}}
%    \end{macrocode}
%
% We also provide a wrapper around \cs{printlabeldateextra} that does nothing
% if the label date is the `nodate' literal \emph{and} |sortyear| is defined.
% Sadly |sortyear| is consumed before we get to this point, so we need a proxy
% toggle.
%
%    \begin{macrocode}
\newtoggle{blx@ox@nonodate}
\DeclareBiblatexOption{global,type,entry}{nonodate}[true]{%
  \settoggle{blx@ox@nonodate}{#1}}
\newbibmacro*{labeldate}{%
  \ifboolexpr{
    test {\iffieldequalstr{labeldatesource}{nodate}}
    and
    togl {blx@ox@nonodate}
  }{}{\printtext[datelabel]{\printlabeldateextra}}}

%    \end{macrocode}
%
% Here we provide the various possible definitions. The |authoryear|
% implementation does it by clearing, changing or restoring the normal
% definitions of the |date| and |issue+date| macros. This is not so great for
% us as our versions of those macros are quite complex (too much to keep
% repeating). There are additional complications that arise from us using
% |origdate| in preference to |date| for the label year, and from our option
% that requires us to print some dates without years. Conceptually it is more
% straightforward to clear the data fields instead.
%
% \begin{itemize}
%   \item |true| is the same as |year| (see below).
% \end{itemize}
%
%    \begin{macrocode}
\def\bbx@opt@mergedate@true{\bbx@opt@mergedate@year}
%    \end{macrocode}
%
% \begin{itemize}
%   \item |maximum| merges the |issue| and the whole |date| with the date label.
%   Therefore, we clear year, month, and day from the date used for the label,
%   as well as the |issue| field.
% \end{itemize}
%
%    \begin{macrocode}
\def\bbx@opt@mergedate@maximum{%
  \renewbibmacro*{date+extradate}{%
    \iffieldundef{labelyear}{}{%
      \iflabeldateisdate{%
        \printtext[datelabel]{%
          \printfield{issue}\clearfield{issue}%
          \setunit*{\addspace}%
          \printdateextra}%
        \clearfield{year}\clearfield{yeardivision}\clearfield{month}\clearfield{day}%
      }{%
        \iflabeldateisanydate{%
          \printtext[datelabel]{%
            \csuse{print\thefield{labeldatesource}dateextra}}%
          \clearfield{\thefield{labeldatesource}year}%
          \clearfield{\thefield{labeldatesource}yeardivision}%
          \clearfield{\thefield{labeldatesource}month}%
          \clearfield{\thefield{labeldatesource}day}%
        }{%
          \usebibmacro{labeldate}%
          \iflabeldateispubstate{}{\clearfield{\thefield{labeldatesource}}}}}}}}
%    \end{macrocode}
%
% \begin{itemize}
%   \item |compact| merges the whole |date| (but not |issue|) with date label.
%   Therefore, we clear year, month, and day from the date used for the label,
%   but leave the |issue| field alone.
% \end{itemize}
%
%    \begin{macrocode}
\def\bbx@opt@mergedate@compact{%
  \renewbibmacro*{date+extradate}{%
    \iffieldundef{labelyear}{}{%
      \iflabeldateisdate{%
        \printtext[datelabel]{\printdateextra}%
        \clearfield{year}\clearfield{yeardivision}\clearfield{month}\clearfield{day}%
      }{%
        \iflabeldateisanydate{%
          \printtext[datelabel]{%
            \csuse{print\thefield{labeldatesource}dateextra}}%
          \clearfield{\thefield{labeldatesource}year}%
          \clearfield{\thefield{labeldatesource}yeardivision}%
          \clearfield{\thefield{labeldatesource}month}%
          \clearfield{\thefield{labeldatesource}day}%
        }{%
          \usebibmacro{labeldate}%
          \iflabeldateispubstate{}{\clearfield{\thefield{labeldatesource}}}}}}}}
%    \end{macrocode}
%
% \begin{itemize}
%   \item |year| always merges the year, and only the year, with the label date.
%   Other date and time componenents are displayed later in the reference.
%   Therefore we clear the year from the date used for the label, but leave
%   the month and day alone.
% \end{itemize}
%
%    \begin{macrocode}
\def\bbx@opt@mergedate@year{%
  \renewbibmacro*{date+extradate}{%
    \iffieldundef{labelyear}{}{%
      \usebibmacro{labeldate}%
      \iflabeldateisdate{%
        \clearfield{year}
      }{%
        \iflabeldateisanydate{%
          \clearfield{\thefield{labeldatesource}year}%
        }{%
          \iflabeldateispubstate{}{\clearfield{\thefield{labeldatesource}}}%
        }}}}}
%    \end{macrocode}
%
% \begin{itemize}
%   \item |basic| will merge a year-only date with the date label, but will
%   otherwise display the label year at the head of the reference and the full
%   date later. Therefore we clear the year if and only if there is no month
%   component \emph{and} (if this is the regular |date|) no |issue|.
% \end{itemize}
%
%    \begin{macrocode}
\def\bbx@opt@mergedate@basic{%
  \renewbibmacro*{date+extradate}{%
    \iffieldundef{labelyear}{}{%
      \usebibmacro{labeldate}%
      \iflabeldateisdate{%
        \ifboolexpr{
          test {\ifdateshavedifferentprecision{label}{}}
          or
          not test {\iffieldundef{issue}}
        }{}{%
          \clearfield{year}}%
      }{%
        \iflabeldateisanydate{%
          \ifdateshavedifferentprecision{label}{\thefield{labeldatesource}}{}{%
            \clearfield{\thefield{labeldatesource}year}}%
        }{%
          \iflabeldateispubstate{}{\clearfield{\thefield{labeldatesource}}}%
        }}}}}
%    \end{macrocode}
%
% \begin{itemize}
%   \item |minimum| will only merge the |date| with the label date if the two
%   are identical, that is, a bare year with no month or disambiguating suffix.
%   Therefore we clear the year if and only if there is no month component, no
%   |extradate|, \emph{and} (if this is the regular |date|) no |issue|.
% \end{itemize}
%
%    \begin{macrocode}
\def\bbx@opt@mergedate@minimum{%
  \renewbibmacro*{date+extradate}{%
    \iffieldundef{labelyear}{}{%
      \usebibmacro{labeldate}%
      \iflabeldateisdate{%
        \ifboolexpr{
          test {\ifdateshavedifferentprecision{label}{}}
          or
          not test {\iffieldundef{extradate}}
          or
          not test {\iffieldundef{issue}}
        }{}{%
          \clearfield{year}}%
      }{%
        \iflabeldateisanydate{%
          \ifboolexpr{
            test {\ifdateshavedifferentprecision{label}{\thefield{labeldatesource}}}
            or
            not test {\iffieldundef{extradate}}
          }{}{%
            \clearfield{\thefield{labeldatesource}year}}%
        }{%
          \iflabeldateispubstate{}{\clearfield{\thefield{labeldatesource}}}%
        }}}}}
%    \end{macrocode}
%
% \begin{itemize}
%   \item |false| suppresses any merging. We only clear the label date source
%   if it is a non-date field other than |pubstate|.
% \end{itemize}
%
%    \begin{macrocode}
\def\bbx@opt@mergedate@false{%
  \renewbibmacro*{date+extradate}{%
    \iffieldundef{labelyear}{}{%
      \usebibmacro{labeldate}%
      \iflabeldateisanydate{}{%
        \iflabeldateispubstate{}{\clearfield{\thefield{labeldatesource}}}%
      }}}}
%    \end{macrocode}
%
% We set the default to be |true|/|year|.
%
%    \begin{macrocode}
\ExecuteBibliographyOptions{mergedate}
%    \end{macrocode}
%
% The problem with moving years but leaving months and days behind is that the
% regular date range macros in |biblatex.sty| do nothing at all if no year
% is printed. We therefore need to patch the macros with extra routines for
% printing year-free date ranges: the rather extravagently named
% \cs{mknoyeardaterangefull} and \cs{mknoyeardaterangetrunc}.
%
%    \begin{macrocode}
\newrobustcmd*{\mknoyeardaterangefull}[2]{%
  \iffieldundef{#2month}{}{%
    \printtext[{#2date}]{%
      \datecircaprint
      \iffieldundef{#2yeardivision}{%
        \csuse{mkbibdate#1}{}{#2month}{#2day}%
        \blx@printtime{#2}{}%
      }{%
        \csuse{mkbibyeardivisiondate#1}{}{#2yeardivision}}%
      \dateuncertainprint
      \iffieldundef{#2endmonth}{}{%
        \iffieldequalstr{#2endmonth}{}{%
          \mbox{\bibdaterangesep}%
        }{%
          \bibdaterangesep
          \enddatecircaprint
          \iffieldundef{#2yeardivision}{%
            \csuse{mkbibdate#1}{}{#2endmonth}{#2endday}%
            \blx@printtime{#2}{end}%
          }{%
            \csuse{mkbibyeardivisiondate#1}{}{#2endyeardivision}}%
          \enddateuncertainprint}}}}}
%    \end{macrocode}
%
% There is a potential problem for \cs{mknoyeardaterangetrunc}, in that if
% the year and endyear are missing, it cannot tell if they are the same, so
% if the months are the same but the years are different, the range would
% be erroneously compressed. However, the only reason the year should
% be missing is that it is in the label, so we test |labelyear| instead.
%
%    \begin{macrocode}
\newrobustcmd*{\mknoyeardaterangetrunc}[2]{%
  \iffieldundef{#2month}{}{%
    \printtext[{#2date}]{%
      \datecircaprint
      \iffieldundef{#2yeardivision}{%
        \ifboolexpr{
          test {\ifdateyearsequal{label}{labelend}}
          and
          test {\iffieldsequal{#2month}{#2endmonth}}
        }{%
          \csuse{mkbibdate#1}{}{}{#2day}%
        }{%
          \csuse{mkbibdate#1}{}{#2month}{#2day}}%
      }{%
        \csuse{mkbibyeardivisiondate#1}{}{#2yeardivision}}%
      \dateuncertainprint
      \iffieldundef{#2endmonth}{}{%
        \iffieldequalstr{#2endmonth}{}{%
          \mbox{\bibdaterangesep}%
        }{%
          \bibdaterangesep
          \enddatecircaprint
          \iffieldundef{#2yeardivision}{%
            \csuse{mkbibdate#1}{}{#2endmonth}{#2endday}%
          }{%
            \csuse{mkbibyeardivisiondate#1}{}{#2endyeardivision}}%
          \enddateuncertainprint}}}}}
%    \end{macrocode}
%
% Now we patch the four date range commands. The |extra| commands,
% which print disambiguating labels as well, should only print those
% labels if the year is present, so they can use the same non-year
% date range functions as the non-|extra| commands.
%
%    \begin{macrocode}
\xpatchcmd{\mkdaterangefull}{%
  \iffieldundef{#2year} {\blx@nounit}%
}{%
  \iffieldundef{#2year} {\mknoyeardaterangefull{#1}{#2}}%
}{}{\wlog{WARNING: biblatex-oxref (oxyear) failed to patch mkdaterangefull}}
\xpatchcmd{\mkdaterangetrunc@i}{%
  \iffieldundef{#2year} {\blx@nounit}%
}{%
  \iffieldundef{#2year} {\mknoyeardaterangetrunc{#1}{#2}}%
}{}{\wlog{WARNING: biblatex-oxref (oxyear) failed to patch mkdaterangetrunc@i}}
\xpatchcmd{\mkdaterangefullextra}{%
  \iffieldundef{#2year} {\blx@nounit}%
}{%
  \iffieldundef{#2year} {\mknoyeardaterangefull{#1}{#2}}%
}{}{\wlog{WARNING: biblatex-oxref (oxyear) failed to patch mkdaterangefullextra}}
\xpatchcmd{\mkdaterangetruncextra@i}{%
  \iffieldundef{#2year} {\blx@nounit}%
}{%
  \iffieldundef{#2year} {\mknoyeardaterangetrunc{#1}{#2}}%
}{}{\wlog{WARNING: biblatex-oxref (oxyear) failed to patch mkdaterangetruncextra@i}}

%    \end{macrocode}
%
% \subsection{Bibliography formatting}
%
% We let \pkg{biblatex} measure shorthands so we can use
% \cs{shorthandwidth} later.
%
%    \begin{macrocode}
\DeclareFieldFormat{shorthandwidth}{#1}
%    \end{macrocode}
%
% We enhance the |family-given| name format to handle the \texttt{pseudo}
% and \texttt{inferred} annotations.
%
%    \begin{macrocode}
\xpretonameformat{family-given}{%
  \iffieldannotation{inferred}{\ifnumequal{\value{listcount}}{1}{\bibopenbracket}{}}{}%
  \ifitemannotation{inferred}{\bibopenbracket}{}%
}{}{\wlog{WARNING: biblatex-oxref (oxyear) failed to prepend to family-given}}
\xpatchnameformat{family-given}{%
  \usebibmacro{name:andothers}%
}{%
  \ifitemannotation{pseudo}{%
    \addspace\printtext[parens]{\bibsstring{pseudo}}%
  }{}%
  \ifitemannotation{inferred}{\bibclosebracket}{}%
  \usebibmacro{name:andothers}%
  \iffieldannotation{inferred}{%
    \ifboolexpr{
      test {\ifnumequal{\value{listcount}}{\value{maxnames}}}
      or
      test {\ifnumequal{\value{listcount}}{\value{listtotal}}}
      or (
        test {\ifnumequal{\value{listcount}}{\value{minnames}}}
        and
        test {\ifnumgreater{\value{listtotal}}{\value{maxnames}}} )
    }{\bibclosebracket}{}%
  }{}%
}{}{\wlog{WARNING: biblatex-oxref (oxyear) failed to patch family-given}}
\DeclareNameAlias{shortauthor}{family-given}
\DeclareNameAlias{shorteditor}{family-given}
%    \end{macrocode}
%
% Names at the head of the reference are family-given, but names elsewhere
% are given-family.
%
%    \begin{macrocode}
\DeclareNameAlias{sortname}{family-given}
\DeclareNameAlias{author}{family-given}
\DeclareNameAlias{editor}{family-given}
\DeclareNameAlias{translator}{family-given}
%    \end{macrocode}
%
% The bibliography formatting is just like |authoryear| except we do not
% eliminate item separation by default.
%
%    \begin{macrocode}
\defbibenvironment{bibliography}
  {\list
     {}
     {\setlength{\leftmargin}{\bibhang}%
      \setlength{\itemindent}{-\leftmargin}%
      \setlength{\itemsep}{\bibitemsep}%
      \setlength{\parsep}{\bibparsep}}}
  {\endlist}
  {\item}
%    \end{macrocode}
%
% The shorthand formatting is just like |authoryear|.
%
%    \begin{macrocode}
\defbibenvironment{shorthand}
  {\list
     {\printfield[shorthandwidth]{shorthand}}
     {\setlength{\labelwidth}{\shorthandwidth}%
      \setlength{\leftmargin}{\labelwidth}%
      \setlength{\labelsep}{\biblabelsep}%
      \addtolength{\leftmargin}{\labelsep}%
      \setlength{\itemsep}{\bibitemsep}%
      \setlength{\parsep}{\bibparsep}%
      \renewcommand*{\makelabel}[1]{##1\hss}}}
  {\endlist}
  {\item}
%    \end{macrocode}
%
% \subsection{Name and date formatting}
%
% We set up hashing just as in |authoryear|.
%
%    \begin{macrocode}
\InitializeBibliographyStyle{\global\undef\bbx@lasthash}
%    \end{macrocode}
%
% We ensure related entries do not interfere with the hashing.
%
%    \begin{macrocode}
\xapptobibmacro{begrelated}{%
  \booltrue{bbx@inset}}%
{}{\wlog{WARNING: biblatex-oxref (oxyear) failed to append to begrelated}}
\xapptobibmacro{endrelated}{%
  \usebibmacro*{bbx:savehash}}%
{}{\wlog{WARNING: biblatex-oxref (oxyear) failed to append to endrelated}}
%    \end{macrocode}
%
% We patch the |author| macro so that the date label information appears
% at the end (as in |authoryear|).
%
%    \begin{macrocode}
\xpatchbibmacro{author}{%
  \iffieldundef{authortype}%
}{%
  \usebibmacro{date+extradate}%
  \setunit*{\addspace}%
  \iffieldundef{authortype}%
}{}{\wlog{WARNING: biblatex-oxref (oxyear) failed to patch author (authortype)}}%
\xpatchbibmacro{author}{%
  \global\undef\bbx@lasthash
}{%
  \global\undef\bbx@lasthash
  \usebibmacro{labeltitle}%
  \setunit*{\addspace}%
  \usebibmacro{date+extradate}%
}{}{\wlog{WARNING: biblatex-oxref (oxyear) failed to patch author (lasthash)}}%
%    \end{macrocode}
%
% We patch it further so that, where an author name has a corresponding
% (different) short author name, the short name is given first and the long
% name given in parentheses. Note that this only affects cases where
% \code{authoraddon} has not been provided.
%
%    \begin{macrocode}
\xpatchbibmacro{namepairs}{%
  \printnames[by#1]%
}{%
  \printnames[#1]%
}{}{\wlog{WARNING: biblatex-oxref (oxyear) failed to patch namepairs}}
\xpatchbibmacro{author+altauthor}{%
  \printnames{author}%
}{%
  \ifboolexpr{%
    ( not test {\ifnameundef{shortauthor}} )
    and
    test {\ifnumequal{\value{shortauthor}}{\value{author}}}
  }{%
    \usebibmacro{namepairs}{author}{shortauthor}%
  }{%
    \printnames{author}%
  }%
}{}{\wlog{WARNING: biblatex-oxref (oxyear) failed to patch author+altauthor}}%
%    \end{macrocode}
%
% We apply the same patches to |bbx:editor|, but also move the editor
% string to after the date label.
%
%    \begin{macrocode}
\xpatchbibmacro{bbx:editor}{%
  \usebibmacro{#1}%
}{%
  \usebibmacro{date+extradate}%
  \setunit*{\addspace}%
  \usebibmacro{#1}%
}{}{\wlog{WARNING: biblatex-oxref (oxyear) failed to patch bbx:editor}}%
\xpatchbibmacro{bbx:editor}{%
  \global\undef\bbx@lasthash
}{%
  \global\undef\bbx@lasthash
  \usebibmacro{labeltitle}%
  \setunit*{\addspace}%
  \usebibmacro{date+extradate}%
}{}{\wlog{WARNING: biblatex-oxref (oxyear) failed to patch bbx:editor (lasthash)}}%
\xpatchbibmacro{editor+alteditor}{%
  \printnames[byeditor]%
}{%
  \printnames[editor]%
}{}{\wlog{WARNING: biblatex-oxref (oxyear) failed to patch editor+alteditor}}
\xpatchbibmacro{editor+alteditor}{%
  \printnames{editor}%
}{%
  \ifboolexpr{%
    ( not test {\ifnameundef{shorteditor}} )
    and
    test {\ifnumequal{\value{shorteditor}}{\value{editor}}}
  }{%
    \usebibmacro{namepairs}{editor}{shorteditor}%
  }{%
    \printnames{editor}%
  }%
}{}{\wlog{WARNING: biblatex-oxref (oxyear) failed to patch editor+alteditor (shorteditor)}}%
%    \end{macrocode}
%
% We apply the same patches to |bbx:translator| as we do for
% |bbx:editor|, except for the shortening one.
%
%    \begin{macrocode}
\xpatchbibmacro{bbx:translator}{%
  \global\undef\bbx@lasthash
}{%
  \global\undef\bbx@lasthash
  \usebibmacro{labeltitle}%
  \setunit*{\addspace}%
  \usebibmacro{date+extradate}%
}{}{\wlog{WARNING: biblatex-oxref (oxyear) failed to patch bbx:translator (lasthash)}}%
\xpatchbibmacro{bbx:translator}{%
  \usebibmacro{#1}%
}{%
  \usebibmacro{date+extradate}%
  \setunit*{\addspace}%
  \usebibmacro{#1}%
}{}{\wlog{WARNING: biblatex-oxref (oxyear) failed to patch bbx:translator}}%
%    \end{macrocode}
%
% The |labeltitle| macro differs from the one from |authoryear| in that
% it also includes the subtitle. We record the fact that we have cleared
% the title.
%
%    \begin{macrocode}
\newtoggle{blx@ox@clearedtitle}
\newbibmacro*{labeltitle}{%
  \iffieldundef{label}{%
    \iffieldundef{shorttitle}{%
      \ifboolexpr{
        test {\iffieldundef{title}}
        and
        test {\iffieldundef{subtitle}}
      }{%
        \printfield{library}%
        \clearfield{library}%
      }{%
        \printtext[title]{%
          \printfield[titlecase]{title}%
          \setunit{\subtitlepunct}%
          \printfield[titlecase]{subtitle}}%
        \clearfield{title}%
        \clearfield{subtitle}%
        \toggletrue{blx@ox@clearedtitle}%
        \setunit{\addspace}%
      }%
    }{%
      \printtext[title]{\printfield[titlecase]{shorttitle}}%
    }%
  }{%
    \printfield{label}%
  }%
}
%    \end{macrocode}
%
% If the labeltitle pulls the title from a maintitle+title macro,
% we flick a switch to make the driver use maintitle+volume instead.
%
%    \begin{macrocode}
\xpretobibmacro{maintitle+title}{%
  \iftoggle{blx@ox@clearedtitle}{%
    \usebibmacro{maintitle+volume}%
    \clearfield{maintitle}%
    \clearfield{volume}%
  }{}%
}{}{\wlog{WARNING: biblatex-oxref (oxyear) failed to prepend to maintitle+title}}
\DeclareFieldFormat[mvbook,mvcollection,mvreference,proceedings,mvproceedings]{maintitle+volume}{#1}
%    \end{macrocode}
%
% The date of |online| entries is printed in parentheses; as the year
% is moved after the author, this can lead to empty parentheses unless
% a month is printed, so we change the test accordingly.
%
%    \begin{macrocode}
\xpatchbibdriver{online}{%
  \iffieldundef{year}%
}{%
  \ifboolexpr{
    test {\iffieldundef{yeardivision}}
    and
    test {\iffieldundef{month}}
  }%
}{}{\wlog{WARNING: biblatex-oxref (oxyear) failed to patch online}}
%    \end{macrocode}
%
% We ensure the label title in citations matches the formatting used for
% the equivalent information in the bibliography entry.
%
%    \begin{macrocode}
\DeclareFieldFormat[bookinbook]{citetitle}{%
  \ifboolexpr{
    test {\iffieldequalstr{entrysubtype}{poem}}
    or
    test {\iffieldequalstr{entrysubtype}{play}}
  }{%
    \mkbibemph{#1}%
  }{%
    \mkbibquote{#1\isdot}}}
\DeclareFieldFormat[suppperiodical,inaudio,inmusic,inmovie,invideo,online,%
    image,manuscript,unpublished]{citetitle}{%
  \def\currentfield{title}%
  \ifboolexpr{
    test {\iffieldannotation{descriptor}}
    or (
      test {\iffieldundef{shorttitle}}
      and
      test {\iffieldundef{title}}
    )
  }{#1}{\mkbibquote{#1\isdot}}%
  \undef\currentfield}
\DeclareFieldFormat[suppperiodical,inaudio,inmusic,inmovie,invideo,online,%
    image,manuscript,unpublished]{citetitle}{%
  \def\currentfield{title}%
  \ifboolexpr{
    test {\iffieldannotation{descriptor}}
    or (
      test {\iffieldundef{shorttitle}}
      and
      test {\iffieldundef{title}}
    )
  }{#1}{\mkbibquote{#1\isdot}}%
  \undef\currentfield}
\DeclareFieldFormat[audio,music]{citetitle}{%
  \def\currentfield{title}%
  \ifboolexpr{
    test {\iffieldannotation{descriptor}}
    or (
      test {\iffieldundef{shorttitle}}
      and
      test {\iffieldundef{title}}
    )
  }{#1}{%
    \iffieldequalstr{entrysubtype}{podcast}{%
      \mkbibquote{#1\isdot}%
    }{%
      \mkbibemph{#1}}}%
  \undef\currentfield}
\DeclareFieldFormat[movie,video]{citetitle}{%
  \def\currentfield{title}%
  \ifboolexpr{
    test {\iffieldannotation{descriptor}}
    or (
      test {\iffieldundef{shorttitle}}
      and
      test {\iffieldundef{title}}
    )
  }{#1}{%
    \ifboolexpr{
      test {\iffieldequalstr{entrysubtype}{episode}}
      or
      test {\iffieldequalstr{entrysubtype}{clip}}
      or
      test {\iffieldequalstr{entrysubtype}{webcast}}
    }{%
      \mkbibquote{#1\isdot}%
    }{%
      \mkbibemph{#1}}}%
  \undef\currentfield}
\DeclareFieldFormat[legislation,legal]{citetitle}{#1}
\DeclareFieldFormat[misc]%
    {citetitle}{%
  \def\currentfield{title}%
  \ifboolexpr{
    test {\iffieldannotation{descriptor}}
    or (
      test {\iffieldundef{shorttitle}}
      and
      test {\iffieldundef{title}}
    )
  }{#1}{%
    \iffieldequalstr{relatedtype}{in}{%
      \mkbibquote{#1\isdot}%
    }{%
      \mkbibemph{#1}%
    }}%
  \undef\currentfield}

%    \end{macrocode}
%
% \subsection{Journal division formatting}
%
% \textsf{Oxyear} uses a colon to demarcate page numbers in journal articles.
%
%    \begin{macrocode}
\renewcommand*{\bibpagespunct}{%
  \ifboolexpr{
    test {\ifentrytype{article}}
    or
    test {\ifentrytype{suppperiodical}}
    or
    test {\ifentrytype{review}}
  }{%
    \addcolon\space
  }{%
    \addcomma\space
  }%
}
%    \end{macrocode}
%
% \subsection{Manuscripts}
%
% Since we clear the title, we need a more sophisticated test for whether to
% suppress the date.
%
%    \begin{macrocode}
\renewbibmacro{manuscript:date}{%
  \ifboolexpr{
    test {\ifnameundef{author}}
    and
    not togl {blx@ox@clearedtitle}
    and
    test {\iffieldundef{label}}
  }{}{\usebibmacro{date}}}
%    \end{macrocode}
%
% We include the |library| field as a fallback title.
%
%    \begin{macrocode}
\DeclareLabeltitle{%
  \field{shorttitle}
  \field{title}
  \field{maintitle}
  \field{library}
}
%    \end{macrocode}
%
% \subsection{Source maps}
%
% We use the source mapping capabilities of Biber to fix the following issues.
%
%    \begin{macrocode}
\DeclareStyleSourcemap{%
  \maps[datatype=bibtex]{%
%    \end{macrocode}
%
% \subsubsection{Suppressing a \enquote{nodate} label}
%
% Unless already set, the \key{nonodate} option is inserted if |sortyear| is
% used. We accomplish this with source maps; the first one works where options
% (not including |nonodate|) have been set, the second where no options have
% been set.
%
%    \begin{macrocode}
    \map[overwrite=true]{
      \step[notmatch=\regexp{nonodate}, fieldsource=options, final]
      \step[fieldsource=sortyear, final]
      \step[fieldset=options, append, fieldvalue={,nonodate}]
    }
    \map[overwrite=true]{
      \step[notfield=options, final]
      \step[fieldsource=sortyear, final]
      \step[fieldset=options, fieldvalue={nonodate}]
    }
%    \end{macrocode}
%
% \subsubsection{Standards}
%
% The purpose of this map is to change the number into a label in the absence
% of an author, so that the citations come out right and the date is positioned
% correctly.
%
%    \begin{macrocode}
    \map[overwrite=false]{
      \pertype{standard}
      \step[notfield=author,
            fieldsource=number,
            fieldtarget=label]
    }
}}

%    \end{macrocode}
%
% \iffalse %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%</y>
%<*a>
% \fi %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% \section{Alphabetic style: oxalph.bbx}
%
% \setcounter{FancyVerbLine}{19}
%
% \subsection{Preliminaries}
%
% This style is based on |oxyear|.
%
%    \begin{macrocode}
\RequireBibliographyStyle{oxyear}
%    \end{macrocode}
%
% \subsection{Suppressing labelextra}
%
% Since the label codes do all the disambiguation, it is not necessary for
% the date at the head of the reference to have a disambiguation component.
%
%    \begin{macrocode}
\xpatchcmd{\bbx@opt@mergedate@maximum}{%
  \printdateextra
}{%
  \printdate
}{}{\wlog{WARNING: biblatex-oxref (oxalph) failed to patch bbx@opt@mergedate@maximum (print)}}
\xpatchcmd{\bbx@opt@mergedate@maximum}{%
  \csuse{print\thefield{labeldatesource}dateextra}%
}{%
  \csuse{print\thefield{labeldatesource}date}%
}{}{\wlog{WARNING: biblatex-oxref (oxalph) failed to patch bbx@opt@mergedate@maximum (label)}}
\xpatchcmd{\bbx@opt@mergedate@compact}{%
  \csuse{print\thefield{labeldatesource}dateextra}%
}{%
  \csuse{print\thefield{labeldatesource}date}%
}{}{\wlog{WARNING: biblatex-oxref (oxalph) failed to patch bbx@opt@mergedate@compact}}
\xpatchbibmacro{labeldate}{%
  \printlabeldateextra
}{%
  \printlabeldate
}{}{\wlog{WARNING: biblatex-oxref (oxalph) failed to patch labeldate}}
\ExecuteBibliographyOptions{mergedate}

%    \end{macrocode}
%
% \subsection{Label codes: printing}
%
% This next code is extracted from the standard |alphabetic| style, and among
% other things ensures the citation labels are printed in the bibliography.
%
%    \begin{macrocode}
\ExecuteBibliographyOptions{labelalpha,sorting=anyt}

\DeclareFieldFormat{labelalphawidth}{\mkbibbrackets{#1}}
\DeclareFieldFormat{shorthandwidth}{\mkbibbrackets{#1}}

\defbibenvironment{bibliography}
  {\list
     {\printtext[labelalphawidth]{%
        \printfield{labelprefix}%
	\printfield{labelalpha}%
        \printfield{extraalpha}}}
     {\setlength{\labelwidth}{\labelalphawidth}%
      \setlength{\leftmargin}{\labelwidth}%
      \setlength{\labelsep}{\biblabelsep}%
      \addtolength{\leftmargin}{\labelsep}%
      \setlength{\itemsep}{\bibitemsep}%
      \setlength{\parsep}{\bibparsep}}%
      \renewcommand*{\makelabel}[1]{##1\hss}}
  {\endlist}
  {\item}

\defbibenvironment{shorthand}
  {\list
     {\printfield[shorthandwidth]{shorthand}}
     {\setlength{\labelwidth}{\shorthandwidth}%
      \setlength{\leftmargin}{\labelwidth}%
      \setlength{\labelsep}{\biblabelsep}%
      \addtolength{\leftmargin}{\labelsep}%
      \setlength{\itemsep}{\bibitemsep}%
      \setlength{\parsep}{\bibparsep}%
      \renewcommand*{\makelabel}[1]{##1\hss}}}
  {\endlist}
  {\item}
%    \end{macrocode}
%
% \subsection{Label codes: generating}
%
% The standard labels are generated from the |labelname| and |year|. We widen
% the net a bit, so that if there is no |labelname|, we fall back to the
% |shortlabeltitle| or |labeltitle|; also we use |labelyear| in place of
% |year|. The |shortlabeltitle| is generated from all the capital letters in
% the title and subtitle, with the help of a source map.
%
%    \begin{macrocode}
\DeclareStyleSourcemap{%
  \maps[datatype=bibtex]{%
    \map[overwrite=false]{%
      \step[fieldsource=title, final]
      \step[fieldset=shortlabeltitle, origfieldval]
      \step[fieldsource=subtitle]
      \step[fieldset=shortlabeltitle, origfieldval, append=true]
      \step[fieldsource=shortlabeltitle,
            match=\regexp{[^\p{Lu}]},
            replace=\regexp{}]
}}}
\DeclareLabelalphaTemplate{%
  \labelelement{
    \field[final]{shorthand}
    \field{label}
    \field[strwidth=3,strside=left,ifnames=1]{labelname}
    \field[strwidth=1,strside=left]{labelname}
    \field[strwidth=3,strside=left]{shortlabeltitle}
    \field[strwidth=4,strside=left]{labeltitle}
  }
  \labelelement{
    \field[strwidth=2,strside=right]{labelyear}
  }
}
%    \end{macrocode}
%
% \iffalse %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%</a>
%</bbx>
%<*cbx>
% \fi %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% \chapter{Citation styles}
%
% \settocdepth{section}
%
% \iffalse %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%<*n>
%<*default>
% \fi %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% \section{Notes style: oxnotes.cbx}
%
% \setcounter{FancyVerbLine}{19}
%
% The standard |verbose| style is a close match for what we need.
%
%    \begin{macrocode}
\RequireCitationStyle{verbose}
%    \end{macrocode}
%
% \iffalse %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%</default>
%<*ibid>
%    \begin{macrocode}
\RequireCitationStyle{verbose-ibid}
%    \end{macrocode}
%</ibid>
%<*note>
%    \begin{macrocode}
\RequireCitationStyle{verbose-note}
%    \end{macrocode}
%</note>
%<*inote>
%    \begin{macrocode}
\RequireCitationStyle{verbose-inote}
%    \end{macrocode}
%</inote>
%<*trad1>
%    \begin{macrocode}
\RequireCitationStyle{verbose-trad1}
%    \end{macrocode}
%</trad1>
%<*trad2>
%    \begin{macrocode}
\RequireCitationStyle{verbose-trad2}
%    \end{macrocode}
%</trad2>
%<*trad3>
%    \begin{macrocode}
\RequireCitationStyle{verbose-trad3}
%    \end{macrocode}
%</trad3>
% \fi %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Variants are also provided that load the respective variant of |verbose|
% at this point.
%
% The main difference is that the \key{citepages} option from these styles
% needs to be \val{separate} by default, and the \cs{postnotedelim} before
% the bibliography string |thiscite| (\enquote{at}) is replaced by a simple
% space.
%
%    \begin{macrocode}
\newbibmacro*{cite:postnote:pages}{%
  \setunit{\addspace}%
  \bibstring{thiscite}%
  \setunit{\addspace}%
  \printfield{postnote}}
\ExecuteBibliographyOptions{citepages=separate}
%    \end{macrocode}
%
% \iffalse %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%</n>
%<*m>
% \fi %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% \section{Numeric style: oxnum.cbx}
%
% \setcounter{FancyVerbLine}{19}
%
% The standard |numeric| style works, needing only a little configuration.
%
%    \begin{macrocode}
\RequireCitationStyle{numeric-comp}
%    \end{macrocode}
%
% Compressed citations are delimited with a semicolon, just like
% non-compressed citations.
%
%    \begin{macrocode}
\renewcommand*{\multicitedelim}{\addsemicolon\space}
\renewcommand*{\compcitedelim}{\addsemicolon\space}
%    \end{macrocode}
%
% The page reference postnote is given after a colon.
%
%    \begin{macrocode}
\renewcommand*{\postnotedelim}{\addcolon\space}
%    \end{macrocode}
%
% \iffalse %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%</m>
%<*y>
% \fi %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% \section{Author–year style: oxyear.cbx}
%
% \setcounter{FancyVerbLine}{19}
%
% The standard |authoryear-comp| style is a close match for what we need.
%
%    \begin{macrocode}
\RequireCitationStyle{authoryear-comp}
%    \end{macrocode}
%
% This sets \key{uniquename} to \val{full}, but that conflicts with
% \key{giveninits} set by the bibliography style, so we set it to \val{init}
% instead. If left alone, \pkg{biblatex} would do this anyway, but if we do it
% explicitly, we avoid the warning message.
%
%    \begin{macrocode}
\ExecuteBibliographyOptions{uniquename=init}
%    \end{macrocode}
%
% We provide a slightly different labeldate macro that obeys the \code{nonodate}
% option.
%
%    \begin{macrocode}
\renewbibmacro*{cite:labeldate+extradate}{%
  \ifboolexpr{
    test {\iffieldundef{labelyear}}
    or
    ( test {\iffieldequalstr{labeldatesource}{nodate}}
      and
      togl {blx@ox@nonodate} )
  }{}{\printtext[bibhyperref]{\printlabeldateextra}}}
%    \end{macrocode}
%
% We insert anonymous author handling into |cite|.
%
%    \begin{macrocode}
\xpatchbibmacro{cite}{%
  \printnames{labelname}%
}{%
  \ifboolexpr{
    test {\iffieldequalstr{labelnamesource}{author}}
    and
    togl {blx@ox@autoanon}
    and
    test {\iffieldequals{rawauthor}{\oxrefanon}}
  }{%
    \iftoggle{blx@ox@abbranon}{\bibcpsstring{anon}}{\bibcplstring{anon}}%
  }{%
    \printnames{labelname}%
  }%
}{}{\wlog{WARNING: biblatex-oxref (oxyear) failed to patch cite}}
%    \end{macrocode}
%
% The name and year are usually separated by a space, but if the date is
% replaced by a word (e.g. \enquote{forthcoming}, \enquote{n.d.}), they are separated by
% a comma.
%
%    \begin{macrocode}
\DeclareDelimFormat{nameyeardelim}{%
  \iflabeldateisanydate
    {\addspace}%
    {\addcomma\space}}
\DeclareDelimFormat{nonameyeardelim}{%
  \iflabeldateisanydate
    {\addspace}%
    {\addcomma\space}}
%    \end{macrocode}
%
% Compressed citations are delimited with a semicolon, just like
% non-compressed citations.
%
%    \begin{macrocode}
\renewcommand*{\multicitedelim}{\addsemicolon\space}
\renewcommand*{\compcitedelim}{\addsemicolon\space}
%    \end{macrocode}
%
% The page reference postnote is given after a colon.
%
%    \begin{macrocode}
\renewcommand*{\postnotedelim}{\addcolon\space}
%    \end{macrocode}
%
% \iffalse %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%</y>
%<*a>
% \fi %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% \section{Alphabetic style: oxalph.cbx}
%
% \setcounter{FancyVerbLine}{19}
%
% The standard |alphabetic| style works, needing only a little configuration.
%
%    \begin{macrocode}
\RequireCitationStyle{alphabetic}
%    \end{macrocode}
%
% Compressed citations are delimited with a semicolon, just like
% non-compressed citations.
%
%    \begin{macrocode}
\renewcommand*{\multicitedelim}{\addsemicolon\space}
\renewcommand*{\compcitedelim}{\addsemicolon\space}
%    \end{macrocode}
%
% The page reference postnote is given after a colon.
%
%    \begin{macrocode}
\renewcommand*{\postnotedelim}{\addcolon\space}
%    \end{macrocode}
%
% \iffalse %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%</a>
% \fi %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% \section{Common citation fixes}
%
% \setcounter{FancyVerbLine}{0}
%
% This code is appended to all the citation style files.
%
% Just in case someone loaded this without loading |oxref.bbx|, we ensure the
% necessary definitions are in place.
%
%    \begin{macrocode}
\RequirePackage{etoolbox}
\RequirePackage{xpatch}
\providetoggle{blx@ox@autoanon}
\providetoggle{blx@ox@abbranon}
%    \end{macrocode}
%
% We fix the |textcite| macro so if the \key{anon} option is set to \val{long}
% or \val{short}, a value of \enquote{Anonymous} is replaced by the bibliography
% string |anon|.
%
%    \begin{macrocode}
\xpatchbibmacro{textcite}{%
  \printnames{labelname}%
}{%
  \ifboolexpr{
    test {\iffieldequalstr{labelnamesource}{author}}
    and
    togl {blx@ox@autoanon}
    and
    test {\iffieldequals{rawauthor}{\oxrefanon}}
  }{%
    \iftoggle{blx@ox@abbranon}{\bibcpsstring{anon}}{\bibcplstring{anon}}%
  }{%
    \printnames{labelname}%
  }%
}{}{\wlog{WARNING: biblatex-oxref failed to patch textcite}}
%    \end{macrocode}
%
% \iffalse %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%</cbx>
%<*dbx>
% \fi %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% \chapter{Data model adjustments}
%
% \section{oxnotes.dbx, oxyear.dbx, oxnum.dbx, and oxalph.dbx}
%
% \setcounter{FancyVerbLine}{19}
%
% We provide an additional name part for handling titles.
%
%    \begin{macrocode}
\DeclareDatamodelConstant[type=list]{nameparts}{prefix,family,suffix,given,title}
%    \end{macrocode}
%
% The |datetype| and |origdatetype| fields are used for prefixing the date with
% a description.
%
%    \begin{macrocode}
\DeclareDatamodelFields[type=field,datatype=literal]{datetype,origdatetype}
%    \end{macrocode}
%
% We add the |inaudio| entry type and friends.
%
%    \begin{macrocode}
\DeclareDatamodelEntrytypes{inaudio,inmusic,inmovie,invideo}
%    \end{macrocode}
%
% The |authoraddon| and |editoraddon| fields are used for handling
% pseudonyms. The |serieseditor| field is used for the editor of a book series,
% as opposed to the editor of the particular cited work.
%
%    \begin{macrocode}
\DeclareDatamodelFields[type=list,datatype=name]{authoraddon,editoraddon,serieseditor}
%    \end{macrocode}
%
% The |jointauthor| and |jointauthortype| fields are used for internally for
% handling editors/translators who can be considered joint authors.
%
%    \begin{macrocode}
\DeclareDatamodelFields[type=list,datatype=name]{jointauthor}
\DeclareDatamodelFields[type=field,datatype=literal]{jointauthortype}
%    \end{macrocode}
%
% The |rawauthor| field is used internally for checking whether an
% the name given in the |author| field is a keyword meaning \enquote{anonymous}.
%
%    \begin{macrocode}
\DeclareDatamodelFields[type=field,datatype=literal]{rawauthor}
\DeclareDatamodelEntryfields{datetype,origdatetype,authoraddon,editoraddon,%
  serieseditor,jointauthor,jointauthortype,rawauthor}
%    \end{macrocode}
%
% We provide a |shortlabeltitle| field to contain our custom reduction of the
% |labeltitle|.
%
%    \begin{macrocode}
\DeclareDatamodelFields[type=field,datatype=literal]{shortlabeltitle}
%    \end{macrocode}
%
% This data model is borrowed from \textsf{biblatex-manuscripts-philology}.
%
%    \begin{macrocode}
\DeclareDatamodelEntrytypes{manuscript}
\DeclareDatamodelFields[type=field,datatype=literal]{catalog,dating,%
  shortlibrary,columns, collection,shortcollection,usualtitle,shelfmark,%
  sortshelfmark,support,columns,layer}
\DeclareDatamodelFields[type=list,datatype=name]{scribe,owner}
\DeclareDatamodelFields[type=list,datatype=literal]{origin}
\DeclareDatamodelEntryfields[manuscript]{catalog,dating,shortlibrary,%
  shortcollection,columns,languages,collection,usualtitle,shelfmark,%
  sortshelfmark,support,columns,origin,scribe,owner}
%    \end{macrocode}
%
% This data model helps with legal citations.
%
%    \begin{macrocode}
\DeclareDatamodelFields[type=field,datatype=date]{pardate}
\DeclareDatamodelFields[type=field,datatype=literal]{%
  parreporter,parseries,neutralcite}
\DeclareDatamodelFields[type=field,datatype=integer]{parvolume}
\DeclareDatamodelFields[type=field,datatype=range]{parpages}
\DeclareDatamodelEntryfields[jurisdiction]{neutralcite,pardate,%
  parreporter,parseries,parvolume,parpages}
%    \end{macrocode}
%
% \iffalse %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%</dbx>
%<*lbx>
% \fi %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% \chapter{Localization modules}
%
% \iffalse %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%<*en>
% \fi %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% \section{English: english-oxref.lbx}
%
% \setcounter{FancyVerbLine}{19}
%
% Here we set some language-specific punctuation and date formatting.
% In particular, we set \cs{blx@ox@langbibstring} to use its first
% argument.
%
%    \begin{macrocode}
\InheritBibliographyExtras{english}
\DeclareBibliographyExtras{%
  \def\finalandcomma{\addcomma}%
  \def\blx@ox@langbibstring#1#2{#1\addspace\bibstring{#2}}%
}
\UndeclareBibliographyExtras{%
  \def\blx@ox@langbibstring#1#2{\bibstring{#2}}%
}
%    \end{macrocode}
%
% We load the standard set of localization strings, then add our
% adjustments.
%
%    \begin{macrocode}
\DeclareBibliographyStrings{%
  inherit          = {english},
%    \end{macrocode}
%
% These are new strings defined by \pkg[biblatex]{oxref}:
%
% \begin{itemize}
%   \item Roles expressed as functions
% \end{itemize}
%
%    \begin{macrocode}
  director         = {{director}{dir\adddot}},
  directors        = {{directors}{dirs\adddot}},
  performer        = {{}{}},
  performers       = {{}{}},
  reader           = {{reader}{reader}},
  readers          = {{readers}{readers}},
  conductor        = {{conductor}{cond\adddot}},
  conductors       = {{conductors}{cond\adddot}},
  serieseditor     = {{series editor}{ser\adddotspace ed\adddot}},
  serieseditors    = {{series editors}{ser\adddotspace eds\adddot}},
  holder           = {{holder}{holder}},
  holders          = {{holders}{holders}},
  editorcm         = {{editor and compiler}{ed\adddotspace and comp\adddot}},
  editorcms        = {{editors and compilers}{eds\adddotspace and comp\adddot}},
%    \end{macrocode}
%
% \begin{itemize}
%   \item Roles expressed as actions
% \end{itemize}
%
%    \begin{macrocode}
  byperformer      = {{}{}},
  bydirector       = {{directed by}{dir\adddot}},
  byreader         = {{read by}{read by}},
  byconductor      = {{conducted by}{cond\adddot}},
  byserieseditor   = {{edited by}{ed\adddot}},
  byholder         = {{held by}{held by}},
  byeditorcm       = {{edited and compiled by}{ed\adddotspace and comp\adddot}},
%    \end{macrocode}
%
% \begin{itemize}
%   \item Publication details
% \end{itemize}
%
%    \begin{macrocode}
  facsimile        = {{facsimile edition}{facs\adddotspace edn\adddot}},
  revised          = {{revised edition}{rev\adddotspace edn\adddot}},
  revisedenlarged  = {{revised and enlarged edition}{rev\adddotspace and enl\addotspace edn\adddot}},
  revisedreprint   = {{revised reprint}{rev\adddotspace repr\adddot}},
  suppto           = {{Supplement to}{Supplement to}},
  equals           = {{=}{=}},
  original         = {{original}{orig\adddot}},
  amendedby        = {{as amended by}{as amended by}},
%    \end{macrocode}
%
% \begin{itemize}
%   \item Publication state
% \end{itemize}
%
%    \begin{macrocode}
  inpressin        = {{to be published in}{to be published in}},
%    \end{macrocode}
%
% \begin{itemize}
%   \item Pagination
% \end{itemize}
%
%    \begin{macrocode}
  book             = {{book}{bk\adddot}},
  books            = {{books}{bks\adddot}},
  canto            = {{canto}{canto}},
  cantos           = {{cantos}{cantos}},
  stanza           = {{stanza}{stanza}},
  stanzas          = {{stanzas}{stanzas}},
  act              = {{Act}{Act}},
  acts             = {{Acts}{Acts}},
  scene            = {{Scene}{Scene}},
  scenes           = {{Scenes}{Scenes}},
  folio            = {{folio}{fo\adddot}},
  folios           = {{folios}{fos\adddot}},
  article          = {{article}{art\adddot}},
  articles         = {{articles}{arts\adddot}},
  clause           = {{clause}{cl\adddot}},
  clauses          = {{clauses}{cls\adddot}},
  regulation       = {{regulation}{reg\adddot}},
  regulations      = {{regulations}{regs\adddot}},
  rule             = {{rule}{r\adddot}},
  rules            = {{rules}{rr\adddot}},
  booktotal        = {{book}{bk\adddot}},
  booktotals       = {{books}{bks\adddot}},
  cantototal       = {{canto}{canto}},
  cantototals      = {{cantos}{cantos}},
  stanzatotal      = {{stanza}{stanza}},
  stanzatotals     = {{stanzas}{stanzas}},
  acttotal         = {{Act}{Act}},
  acttotals        = {{Acts}{Acts}},
  scenetotal       = {{Scene}{Scene}},
  scenetotals      = {{Scenes}{Scenes}},
  foliototal       = {{folio}{fo\adddot}},
  foliototals      = {{folios}{fos\adddot}},
  articletotal     = {{article}{art\adddot}},
  articletotals    = {{articles}{arts\adddot}},
  clausetotal      = {{clause}{cl\adddot}},
  clausetotals     = {{clauses}{cls\adddot}},
  regulationtotal  = {{regulation}{reg\adddot}},
  regulationtotals = {{regulations}{regs\adddot}},
  ruletotal        = {{rule}{r\adddot}},
  ruletotals       = {{rules}{rr\adddot}},
%    \end{macrocode}
%
% \begin{itemize}
%   \item Types
% \end{itemize}
%
%    \begin{macrocode}
  facebook         = {{Facebook post}{Facebook post}},
  tweet            = {{Twitter post}{Twitter post}},
  podcast          = {{podcast}{podcast}},
  clip             = {{video}{video}},
  webcast          = {{webcast}{webcast}},
  poster           = {{poster}{poster}},
%    \end{macrocode}
%
% \begin{itemize}
%   \item Miscellaneous
% \end{itemize}
%
%    \begin{macrocode}
  nolocation       = {{no place}{n\adddot p\adddot}},
  modified         = {{last modified}{last modified}},
  recorded         = {{recorded}{recorded}},
  uploaded         = {{uploaded}{uploaded}},
  filed            = {{filed}{filed}},
  issued           = {{issued}{issued}},
%    \end{macrocode}
%
% \begin{itemize}
%   \item Labels
% \end{itemize}
%
%    \begin{macrocode}
  anon             = {{Anonymous}{Anon\adddot}},
  pseudo           = {{Pseudo-}{Ps\adddot-}},
  urldown          = {{downloaded}{downloaded}},
%    \end{macrocode}
%
% \begin{itemize}
%   \item Country names, patents, and patent requests,
% \end{itemize}
%
%    \begin{macrocode}
  countryjp        = {{Japan}{JP}},
  patentjp         = {{Japanese patent}{Japanese pat.\adddot}},
  patreqjp         = {{Japanese patent request}{Japanese pat.\adddot req.\adddot}},
%    \end{macrocode}
%
% \begin{itemize}
%   \item These are borrowed from other styles.
% \end{itemize}
%
%    \begin{macrocode}
  1column          = {{one column}{1\addnbspace col\adddot}},
  2column          = {{two columns}{2\addnbspace col\adddot}},
  inflayer         = {{inferior layer}{inf\adddotspace lay\adddot}},
  suplayer         = {{superior layer}{sup\adddotspace lay\adddot}},
  paper            = {{paper}{pap\adddot}},
  papyrus          = {{papyrus}{papy\adddot}},
  parchment        = {{parchment}{parch\adddot}},
  eucase           = {{Case}{Case}},
  eujoinedcases    = {{Joined Cases}{Joined Cases}},
  commissiondecision = {{Commission Decision}{Commission Decision}},
  application      = {{Application}{App\adddot}},
  order            = {{Order}{Ord\adddot}},
  bill             = {{Bill}{Bill}},
  draft            = {{draft}{draft}},
  opened           = {{opened for signature}{opened for signature}},
  signed           = {{signed}{signed}},
  adopted          = {{adopted}{adopted}},
  inforce          = {{entered into force}{entered into force}},
%    \end{macrocode}
%
% The rest of these strings are the standard ones, overridden to match the
% examples in the \emph{Oxford Guide to Style} and \emph{New Hart's Rules}.
% Many of these are guesses extrapolated from what is given.
%
% The roles expressed as functions do not need adjusting. The roles
% expressed as actions do not typically end in \enquote{by} when abbreviated;
% the \enquote{with} parts go first when abbreviated if there is more than one
% editorial role (at least, that is one way of interpreting the examples).
%
%    \begin{macrocode}
  byeditor         = {{edited by}{ed\adddot}},
  bycompiler       = {{compiled by}{comp\adddot}},
  byfounder        = {{founded by}{found\adddot}},
  bycontinuator    = {{continued by}{cont\adddot}},
  byredactor       = {{redacted by}{red\adddot}},
  byreviser        = {{revised by}{rev\adddot}},
  byreviewer       = {{reviewed by}{rev\adddot}},
  bycollaborator   = {{in collaboration with}{in collab\adddotspace with}},
  bytranslator     = {{translated \lbx@lfromlang\ by}{trans\adddot\ \lbx@sfromlang}},
  bycommentator    = {{commented by}{comm\adddot}},
  byannotator      = {{annotated by}{annot\adddot}},
  byeditortr       = {{edited and translated \lbx@lfromlang\ by}%
                      {ed\adddotspace and trans\adddot\ \lbx@sfromlang}},
  byeditorco       = {{edited and commented by}%
                      {ed\adddotspace and comm\adddot}},
  byeditoran       = {{edited and annotated by}%
                      {ed\adddotspace and annot\adddot}},
  byeditorin       = {{edited, with an introduction, by}%
                      {ed.\adddotspace with introduction}},
  byeditorfo       = {{edited, with a foreword, by}%
                      {ed.\adddotspace with foreword}},
  byeditoraf       = {{edited, with an afterword, by}%
                      {ed.\adddotspace with afterword}},
  byeditortrco     = {{edited, translated \lbx@lfromlang\finalandcomma\ and commented by}%
                      {ed.,\addabbrvspace trans\adddot\ \lbx@sfromlang\finalandcomma\ and comm\adddot}},
  byeditortran     = {{edited, translated \lbx@lfromlang\finalandcomma\ and annotated by}%
                      {ed.,\addabbrvspace trans\adddot\ \lbx@sfromlang\finalandcomma\ and annot\adddot}},
  byeditortrin     = {{edited and translated \lbx@lfromlang, with an introduction, by}%
                      {with introduction, ed\adddotspace and trans\adddot\ \lbx@sfromlang}},
  byeditortrfo     = {{edited and translated \lbx@lfromlang, with a foreword, by}%
                      {with foreword, ed\adddotspace and trans\adddot\ \lbx@sfromlang}},
  byeditortraf     = {{edited and translated \lbx@lfromlang, with an afterword, by}%
                      {with afterword, ed\adddotspace and trans\adddot\ \lbx@sfromlang}},
  byeditorcoin     = {{edited and commented, with an introduction, by}%
                      {with introduction, ed\adddotspace and comm\adddot}},
  byeditorcofo     = {{edited and commented, with a foreword, by}%
                      {with foreword, ed\adddotspace and comm\adddot}},
  byeditorcoaf     = {{edited and commented, with an afterword, by}%
                      {with afterword, ed\adddotspace and comm\adddot}},
  byeditoranin     = {{edited and annotated, with an introduction, by}%
                      {with introduction, ed\adddotspace and annot\adddot}},
  byeditoranfo     = {{edited and annotated, with a foreword, by}%
                      {with foreword, ed\adddotspace and annot\adddot}},
  byeditoranaf     = {{edited and annotated, with an afterword, by}%
                      {with afterword, ed\adddotspace and annot\adddot}},
  byeditortrcoin   = {{edited, translated \lbx@lfromlang\finalandcomma\ and commented, with an introduction, by}%
                      {with introduction, ed.,\addabbrvspace trans\adddot\ \lbx@sfromlang\finalandcomma\ and comm\adddot}},
  byeditortrcofo   = {{edited, translated \lbx@lfromlang\finalandcomma\ and commented, with a foreword, by}%
                      {with foreword, ed.,\addabbrvspace trans\adddot\ \lbx@sfromlang\finalandcomma\ and comm\adddot}},
  byeditortrcoaf   = {{edited, translated \lbx@lfromlang\finalandcomma\ and commented, with an afterword, by}%
                      {with afterword, ed.,\addabbrvspace trans\adddot\ \lbx@sfromlang\finalandcomma\ and comm\adddot}},
  byeditortranin   = {{edited, translated \lbx@lfromlang\finalandcomma\ and annotated, with an introduction, by}%
                      {with introduction, ed.,\addabbrvspace trans\adddot\ \lbx@sfromlang\finalandcomma\ and annot\adddot}},
  byeditortranfo   = {{edited, translated \lbx@lfromlang\finalandcomma\ and annotated, with a foreword, by}%
                      {with foreword, ed.,\addabbrvspace trans\adddot\ \lbx@sfromlang\finalandcomma\ and annot\adddot}},
  byeditortranaf   = {{edited, translated \lbx@lfromlang\finalandcomma\ and annotated, with an afterword, by}%
                      {with afterword, ed.,\addabbrvspace trans\adddot\ \lbx@sfromlang\finalandcomma\ and annot\adddot}},
  bytranslatorco   = {{translated \lbx@lfromlang\ and commented by}%
                      {trans\adddot\ \lbx@sfromlang\ and comm\adddot}},
  bytranslatoran   = {{translated \lbx@lfromlang\ and annotated by}%
                      {trans\adddot\ \lbx@sfromlang\ and annot\adddot}},
  bytranslatorin   = {{translated \lbx@lfromlang, with an introduction, by}%
                      {trans\adddot\ \lbx@sfromlang\ with introduction}},
  bytranslatorfo   = {{translated \lbx@lfromlang, with a foreword, by}%
                      {trans\adddot\ \lbx@sfromlang\ with foreword}},
  bytranslatoraf   = {{translated \lbx@lfromlang, with an afterword, by}%
                      {trans\adddot\ \lbx@sfromlang\ with afterword}},
  bytranslatorcoin = {{translated \lbx@lfromlang\ and commented, with an introduction, by}%
                      {with introduction, trans\adddot\ \lbx@sfromlang\ and comm\adddot}},
  bytranslatorcofo = {{translated \lbx@lfromlang\ and commented, with a foreword, by}%
                      {with foreword, trans\adddot\ \lbx@sfromlang\ and comm\adddot}},
  bytranslatorcoaf = {{translated \lbx@lfromlang\ and commented, with an afterword, by}%
                      {with afterword, trans\adddot\ \lbx@sfromlang\ and comm\adddot}},
  bytranslatoranin = {{translated \lbx@lfromlang\ and annotated, with an introduction, by}%
                      {with introduction, trans\adddot\ \lbx@sfromlang\ and annot\adddot}},
  bytranslatoranfo = {{translated \lbx@lfromlang\ and annotated, with a foreword, by}%
                      {with foreword, trans\adddot\ \lbx@sfromlang\ and annot\adddot}},
  bytranslatoranaf = {{translated \lbx@lfromlang\ and annotated, with an afterword, by}%
                      {with afterword, trans\adddot\ \lbx@sfromlang\ and annot\adddot}},
%    \end{macrocode}
%
% The roles expressed as objects and terms for supplementary material
% are not abbreviated.
%
%    \begin{macrocode}
  withintroduction = {{with an introduction by}{with an introduction by}},
  withcommentator  = {{with a commentary by}{with a commentary by}},
  withannotator    = {{with annotations by}{with annotations by}},
  withintroduction = {{with an introduction by}{with an introduction by}},
  withforeword     = {{with a foreword by}{with a foreword by}},
  withafterword    = {{with an afterword by}{with an afterword by}},
  introduction     = {{introduction}{introduction}},
%    \end{macrocode}
%
% The abbreviations for some publication details are different.
%
%    \begin{macrocode}
  newseries        = {{new series}{\mkbibacro{NS}}},
  oldseries        = {{old series}{\mkbibacro{OS}}},
  edition          = {{edition}{edn\adddot}},
  reprint          = {{reprint\nopunct}{repr\adddot\nopunct}},
  reviewof         = {{review of}{review of}},
  reprintas        = {{reprinted as}{repr\adddotspace as}},
  reprintfrom      = {{from}{from}},
  translationas    = {{English translation as}{Eng\adddotspace trans\adddotspace as}},
  origpubin        = {{originally published in}{originally pub\adddot}},
%    \end{macrocode}
%
% There is also a different abbreviation for \enquote{paragraph}.
%
%    \begin{macrocode}
  paragraph        = {{paragraph}{para\adddot}},
  paragraphs       = {{paragraphs}{paras\adddot}},
%    \end{macrocode}
%
% \emph{New Hart's Rules} uses \enquote{accessed} for URL dates.
%
%    \begin{macrocode}
  urlseen          = {{accessed}{accessed}},
%    \end{macrocode}
%
% Scholarly citation terms are abbreviated. Oxford style is to use \enquote{henceforth}
% for shorthands and \enquote{at} to cite a page within a range.
%
%    \begin{macrocode}
  idem             = {{idem}{id\adddot}},
  idemsm           = {{idem}{id\adddot}},
  idemsf           = {{eadem}{ead\adddot}},
  idemsn           = {{idem}{id\adddot}},
  idempm           = {{eidem}{eid\adddot}},
  idempf           = {{eaedem}{eaed\adddot}},
  idempn           = {{eadem}{ead\adddot}},
  idempp           = {{eidem}{eid\adddot}},
  citedas          = {{henceforth}{henceforth}},
  thiscite         = {{at}{at}},
%    \end{macrocode}
%
% Languages are abbreviated.
%
%    \begin{macrocode}
  langamerican     = {{English}{Eng\adddot}},
  langbrazilian    = {{Brazilian}{Braz\adddot}},
  langcatalan      = {{Catalan}{Catal\adddot}},
  langcroatian     = {{Croatian}{Croat\adddot}},
  langczech        = {{Czech}{Czech}},
  langdanish       = {{Danish}{Dan\adddot}},
  langdutch        = {{Dutch}{Dutch}},
  langenglish      = {{English}{Eng\adddot}},
  langestonian     = {{Estonian}{Eston\adddot}},
  langfinnish      = {{Finnish}{Finn\adddot}},
  langfrench       = {{French}{Fr\adddot}},
  langgerman       = {{German}{Ger\adddot}},
  langgreek        = {{Greek}{Gr\adddot}},
  langitalian      = {{Italian}{It\adddot}},
  langlatin        = {{Latin}{Lat\adddot}},
  langnorwegian    = {{Norwegian}{Norw\adddot}},
  langpolish       = {{Polish}{Pol\adddot}},
  langportuguese   = {{Portuguese}{Port\adddot}},
  langrussian      = {{Russian}{Russ\adddot}},
  langslovene      = {{Slovene}{Slov\adddot}},
  langspanish      = {{Spanish}{Sp\adddot}},
  langswedish      = {{Swedish}{Swed\adddot}},
}
%    \end{macrocode}
%
% \iffalse %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%</en>
%<*gb>
% \fi %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% \section{British English: british-oxref.lbx}
%
% \setcounter{FancyVerbLine}{19}
%
% Here we set some language-specific punctuation and date formatting.
%
%    \begin{macrocode}
\InheritBibliographyExtras{british}
\DeclareBibliographyExtras{%
%    \end{macrocode}
%
% The only difference from the standard British date format is that we print it
% \enquote{clean}, with a cardinal instead of an ordinal day.
%
%    \begin{macrocode}
  \protected\def\mkbibdatelong#1#2#3{%
    \iffieldundef{#3}
      {}
      {\stripzeros{\thefield{#3}}%
       \iffieldundef{#2}{}{\nobreakspace}}%
    \iffieldundef{#2}
      {}
      {\mkbibmonth{\thefield{#2}}%
       \iffieldundef{#1}{}{\space}}%
    \iffieldbibstring{#1}
      {\bibstring{\thefield{#1}}}
      {\dateeraprintpre{#1}\stripzeros{\thefield{#1}}}}%
%    \end{macrocode}
%
% As you'd expect from an Oxford style, we use the Oxford comma, and use a
% period as the time separator. The redefinition of \cs{blx@ox@langbibstring}
% is given here as well.
%
%    \begin{macrocode}
  \def\finalandcomma{\addcomma}%
  \def\bibtimesep{\addperiod}%
  \def\blx@ox@langbibstring#1#2{#1\addspace\bibstring{#2}}%
}
\UndeclareBibliographyExtras{%
  \def\blx@ox@langbibstring#1#2{\bibstring{#2}}%
}
%    \end{macrocode}
%
% We use the British abbreviations for 12-hour clock times.
%
%    \begin{macrocode}
\DeclareBibliographyStrings{%
  inherit          = {english},
  am               = {{a\adddot m\adddot}{a\adddot m\adddot}},
  pm               = {{p\adddot m\adddot}{p\adddot m\adddot}},
}
%    \end{macrocode}
%
% \iffalse %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%</gb>
%<*us>
% \fi %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% \section{American English: american-oxref.lbx}
%
% \setcounter{FancyVerbLine}{19}
%
%    \begin{macrocode}
\InheritBibliographyExtras{english}
\DeclareBibliographyExtras{\uspunctuation}
\InheritBibliographyStrings{english}
%    \end{macrocode}
%
% \section{Other languages}
%
% Currently \pkg[biblatex]{oxref} only supports British and American
% English explicitly, but if there is demand more languages may be
% added. If you would like to contribute support for your language, a
% list of the non-standard bibliography strings requiring definition may
% be found in section~\ref{sec:setup}.
%
% \iffalse %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%</us>
%</lbx>
% \fi %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%