summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/glossaries-extra/glossaries-extra-manual.tex
blob: 014415d45a94272a51b99224be56ecdddd46fed2 (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
\documentclass[report,inlinetitle,widecs]{nlctdoc}

\usepackage{alltt}
\usepackage{hologo}
\usepackage[colorlinks,
            hyperindex=false,
            pdfauthor={Nicola L.C. Talbot},
            pdftitle={glossaries-extra.sty: an extension to the glossaries
package},
            pdfkeywords={LaTeX,package,glossary,abbreviations}]{hyperref}
\usepackage[nogroupskip,nonumberlist]{glossaries-extra}

\makeglossaries

\GlsXtrEnableEntryUnitCounting{general}{0}{page}

\renewcommand*{\glsxtrifcounttrigger}[3]{#3}

\renewcommand*{\glslinkcheckfirsthyperhook}{%
  \ifnum\glsentrycurrcount\glslabel>0
   \setkeys{glslink}{hyper=false}%
  \fi
}

\newcommand*{\XeLaTeX}{\hologo{XeLaTeX}}
\newcommand*{\LuaLaTeX}{\hologo{LuaLaTeX}}
\newcommand*{\pdfLaTeX}{\hologo{pdfLaTeX}}

\IndexPrologue{\chapter*{\indexname}
 \addcontentsline{toc}{chapter}{\indexname}%
 \markboth{\indexname}{\indexname}}

\renewcommand*{\main}[1]{\hyperpage{#1}}
\newcommand*{\htextbf}[1]{\textbf{\hyperpage{#1}}}

\glssetcategoryattribute{general}{indexname}{htextbf}
\glssetcategoryattribute{general}{dualindex}{main}

\newglossaryentry{xindy}{
  name={\appfmt{xindy}},
  sort={xindy},
  description={An flexible indexing application with multilingual
  support written in Perl.}
}

\newglossaryentry{makeindex}{%
  name={\appfmt{makeindex}},%
  sort={makeindex},%
  description={An indexing application.},
}

\newglossaryentry{makeglossaries}{%
name={\appfmt{makeglossaries}},%
sort={makeglossaries},%
description={A custom designed Perl script interface
provided with the \styfmt{glossaries} package
to run \gls{xindy} or \gls{makeindex} according to 
the document settings.}}

\newglossaryentry{makeglossaries-lite.lua}{%
name={\appfmt{makeglossaries-lite.lua}\index{makeglossaries-lite.lua=\appfmt{makeglossaries-lite.lua}|htextbf}},%
sort={makeglossaries-lite.lua},%
text={\appfmt{makeglossaries-lite.lua}\iapp{makeglossaries-lite.lua}},%
description={A custom designed Lua script interface
to \gls{xindy} and \gls{makeindex} provided with the
\styfmt{glossaries}
package. This is a cut-down alternative to the Perl
\appfmt{makeglossaries} script. If you have Perl installed, use the
Perl script instead. Note that TeX Live creates a symbolic link
called \texttt{makeglossaries-lite} (without the \texttt{.lua}
extension) to the actual \texttt{makeglossaries-lite.lua} script.}
}

\newglossaryentry{bib2gls}{%
name={\appfmt{bib2gls}\index{bib2gls=\appfmt{bib2gls}|htextbf}},%
sort={bib2gls},%
text={\appfmt{bib2gls}\iapp{bib2gls}},%
description={A command line Java application that selects
entries from a .bib file and converts them to glossary
definitions. At the time of writing, this application
is still under development. Further details at:
\url{http://www.dickimaw-books.com/software/bib2gls/}.}%
}

\newglossaryentry{numberlist}{%
name={number list},%
description={A list of \glspl{entrylocation} (also 
called a location list). The number list can be suppressed using the 
\pkgopt{nonumberlist} package option.}
}

\newglossaryentry{entrylocation}{%
name={entry location},%
description={The location of the entry in the document. This
defaults to the page number on which the entry appears. An entry may
have multiple locations.}
}

\newglossaryentry{locationlist}{%
name={location list},%
description={A list of \glspl{entrylocation}.
See \gls{numberlist}.}%
}

\newglossaryentry{linktext}{%
name={link-text},
description={The text produced by commands such as \ics{gls}. It may
or may not have a hyperlink to the glossary.}
}

\let\glsd\glsuseri
\let\glsation\glsuserii

\newglossaryentry{firstuseflag}{%
name={first use flag},
description={A conditional that determines whether or not the entry
has been used according to the rules of \gls{firstuse}.}%
}

\newglossaryentry{firstusetext}{%
name={first use text},
description={The text that is displayed on \gls{firstuse}, which is
governed by the \gloskey{first} and \gloskey{firstplural} keys of
\ics{newglossaryentry}. (May be overridden by
\ics{glsdisp}.)}%
}

\newglossaryentry{firstuse}{%
  name={first use},
  user1={first used},
  see={firstuseflag,firstusetext},
  description={The first time a glossary entry is used (from the start
  of the document or after a reset) with one of the
  following commands: \ics{gls}, \ics{Gls}, \ics{GLS}, \ics{glspl},
  \ics{Glspl}, \ics{GLSpl} or \ics{glsdisp}.}%
}

\setcounter{IndexColumns}{2}

\newrobustcmd*{\eq}{\protect=}% hide from makeindex

\newcommand*{\igloskey}[2][newglossaryentry]{\icsopt{#1}{#2}}
\newcommand*{\gloskey}[2][newglossaryentry]{\csopt{#1}{#2}}
\newcommand*{\optfmt}[1]{\textsf{#1}}

\newcommand*{\glostyle}[1]{\textsf{#1}\index{glossary styles:>#1={\protect\sffamily#1}|main}}

\newcommand*{\acrstyle}[1]{\textsf{#1}\index{acronym
styles (glossaries):>#1={\protect\ttfamily#1}|main}}

\newcommand*{\abbrstyle}[1]{\textsf{#1}\index{abbreviation styles:>#1={\protect\sffamily#1}|main}}

\newcommand*{\depabbrstyle}[1]{\textsf{#1}\index{abbreviation styles (deprecated):>#1={\protect\sffamily#1}|main}}

\newcommand*{\category}[1]{\textsf{#1}\index{categories:>#1={\protect\sffamily#1}|main}}

\newcommand*{\catattr}[1]{\textsf{#1}\index{category attributes:>#1={\protect\sffamily#1}|main}}

\newcommand*{\postlinkcat}{%
 \cs{glsxtrpostlink}\meta{category}%
 \index{glsxtrpostlinkcategory=\cs{glsxtrpostlink}\meta{category}|hyperpage}%
}

\setlength\marginparwidth{70pt}

\begin{document}
\DeleteShortVerb{\|}
\MakeShortVerb{"}

 \title{glossaries-extra.sty v1.14:
 an extension to the glossaries package}
 \author{Nicola L.C. Talbot\\[10pt]
Dickimaw Books\\
\url{http://www.dickimaw-books.com/}}

 \date{2017-04-18}
 \maketitle

\begin{abstract}
The \styfmt{glossaries-extra} package is an extension to the
\styfmt{glossaries} package, providing additional features.
Some of the features provided by this package are only available
with \styfmt{glossaries} version 4.19 (or above).
This document assumes familiarity with the \styfmt{glossaries} package.

\end{abstract}

\begin{important}
Since \styfmt{glossaries-extra} internally loads the \styfmt{glossaries}
package, you also need to have \styfmt{glossaries} installed and
all the packages that \styfmt{glossaries} depends on (including, but
not limited to, \sty{tracklang}, \sty{mfirstuc}, \sty{etoolbox}, 
\sty{xkeyval} (at least version dated 2006/11/18), \sty{textcase},
\sty{xfor}, \sty{datatool-base} and \sty{amsgen}. These
packages are all available in the current \TeX\ Live and Mik\TeX\
distributions. If any of them are missing, please update your
\TeX\ distribution using your update manager.
(For help on this see, for example,
\href{http://tex.stackexchange.com/questions/55437/how-do-i-update-my-tex-distribution}{How do I update my \TeX\ distribution?}
or
\href{http://tex.stackexchange.com/questions/14925/updating-tex-on-linux}{Updating
\TeX\ on Linux}.)
\end{important}

Additional resources:
\begin{itemize}
\item The \styfmt{glossaries-extra} documented code
\href{http://mirrors.ctan.org/macros/latex/contrib/glossaries-extra/glossaries-extra-code.pdf}{glossaries-extra-code.pdf}.

\item The
\href{http://www.dickimaw-books.com/gallery/#glossaries-extra}{\styfmt{glossaries-extra} gallery}.

\item
\href{http://www.latex-community.org/know-how/latex/55-latex-general/263-glossaries-nomenclature-lists-of-symbols-and-acronyms}{Glossaries,
Nomenclature, Lists of Symbols and Acronyms}.

\item \href{https://github.com/nlct/bib2gls}{bib2gls}
\end{itemize}

\tableofcontents

\chapter{Introduction}
\label{sec:intro}

The \styfmt{glossaries} package is a flexible package, but it's also a
heavy-weight package that uses a lot of resources. As package
developer, I'm caught between those users who complain about the
drawbacks of a heavy-weight package with a large user manual and
those users who want more features (which necessarily adds to the
package weight and manual size).

The \styfmt{glossaries-extra} package is an attempt to provide
a~compromise for this
conflict. Version 4.22 of the \styfmt{glossaries} package is
the last version to incorporate new features.\footnote{4.21 was
originally intended as the last release of \styfmt{glossaries} to
incorporate new features, but a few new minor features slipped in with
some bug fixes in v4.21.} Future versions of
\styfmt{glossaries} will just be bug fixes. New features will
instead be added to \styfmt{glossaries-extra}.
This means that the base \styfmt{glossaries} package won't increase
in terms of package loading time and allocation of resources, but
those users who do want extra features available will have more of a
chance of getting their feature requests accepted.

\section{Package Defaults}
\label{sec:defaults}

I'm not happy with some of the default settings assumed by the
\styfmt{glossaries} package, and, judging from code I've seen, other
users also seem unhappy with them, as certain package options are
often used in questions posted on various sites. I can't change the default
behaviour of \styfmt{glossaries} as it would break backward
compatibility, but since \styfmt{glossaries-extra} is a separate
package, I have decided to implement some of these commonly-used 
options by default. You can switch them back if they're not 
appropriate.

The new defaults are:
\begin{itemize}
\item \pkgopt[true]{toc} (add the glossaries to the table of
contents). Use \pkgopt[false]{toc} to switch this back off.

\item \pkgopt[true]{nopostdot} (suppress the terminating full stop
after the description in the glossary). Use
\pkgopt[false]{nopostdot} to restore the terminating full stop
(period).

\item \pkgopt[true]{noredefwarn} (suppress the warnings that occur when
the \env{theglossary} environment and \cs{printglossary} are redefined while
\styfmt{glossaries} is loading). To restore the warnings, use
\pkgopt[false]{noredefwarn}. Note that this won't have any effect if
the \styfmt{glossaries} package has already been loaded before you use
the \styfmt{glossaries-extra} package.

\item If \sty{babel} has been loaded, the \pkgopt[babel]{translate}
option is switched on. To revert to using the \sty{translator}
interface, use \pkgopt[true]{translate}. There is no change to the
default if \sty{babel} hasn't been loaded.

\end{itemize}

The examples below illustrate the difference in explicit
package options between \styfmt{glossaries} and
\styfmt{glossaries-extra}. There may be other differences
resulting from modifications to commands provided by
\styfmt{glossaries} (see \sectionref{sec:modifications}).

\begin{enumerate}
\item 
\begin{verbatim}
\documentclass{article}
\usepackage{glossaries-extra}
\end{verbatim}
This is like:
\begin{verbatim}
\documentclass{article}
\usepackage[toc,nopostdot]{glossaries}
\usepackage{glossaries-extra}
\end{verbatim}

\item
\begin{verbatim}
\documentclass[british]{article}
\usepackage{babel}
\usepackage{glossaries-extra}
\end{verbatim}
This is like:
\begin{verbatim}
\documentclass[british]{article}
\usepackage{babel}
\usepackage[toc,nopostdot,translate=babel]{glossaries}
\usepackage{glossaries-extra}
\end{verbatim}

\item
\begin{verbatim}
\documentclass{memoir}
\usepackage{glossaries-extra}
\end{verbatim}
This is like:
\begin{verbatim}
\documentclass{memoir}
\usepackage[toc,nopostdot,noredefwarn]{glossaries}
\usepackage{glossaries-extra}
\end{verbatim}
\emph{However}
\begin{verbatim}
\documentclass{memoir}
\usepackage{glossaries}
\usepackage{glossaries-extra}
\end{verbatim}
This is like:
\begin{verbatim}
\documentclass{memoir}
\usepackage[toc,nopostdot]{glossaries}
\usepackage{glossaries-extra}
\end{verbatim}
Since by the time \styfmt{glossaries-extra} has been loaded,
\styfmt{glossaries} has already redefined \cls{memoir}'s
glossary-related commands.
\end{enumerate}

Another noticeable change is that by default \cs{printglossary}
will now display information text in the document if the external
glossary file doesn't exist. This is explanatory text to help new
users who can't work out what to do next to complete the document
build. Once the document is set up correctly and the external files
have been generated, this text will disappear.

This change is mostly likely to be noticed by users
with one or more redundant empty glossaries who ignore
transcript messages, explicitly use \gls{makeindex}\slash\gls{xindy}
on just the non-empty glossary (or glossaries) and use
the iterative 
\ics{printglossaries} command instead of \ics{printglossary}. For example,
consider the following:
\begin{verbatim}
\documentclass{article}

\usepackage[acronym]{glossaries}

\makeglossaries

\newacronym{laser}{laser}{light amplification by stimulated
emission of radiation}

\begin{document}

\gls{laser}

\printglossaries

\end{document}
\end{verbatim}
The above document will only display the list of
acronyms at the place where \ics{printglossaries} occurs. However it
will also attempt to input the \texttt{.gls} file associated with
the \texttt{main} glossary.

If you use \gls{makeglossaries}, you'll get the warning message:
\begin{verbatim}
Warning: File 'test.glo' is empty.
Have you used any entries defined in glossary 'main'?
Remember to use package option 'nomain' if you
don't want to use the main glossary.
\end{verbatim}
(where the original file is called \texttt{test.tex})
but if you simply call \gls{makeindex} directly to generate the
\texttt{.acr} file (without attempting to create the \texttt{.gls}
file) then the transcript file will always contain the message:
\begin{verbatim}
No file test.gls.
\end{verbatim}
This doesn't occur with \gls{makeglossaries} as it will create
the \texttt{.gls} file containing the single command \cs{null}.

If you simply change from \styfmt{glossaries} to
\styfmt{glossaries-extra} in this document, you'll find a change in the
resulting PDF if you don't use \gls{makeglossaries} and you only
generate the \texttt{.acr} file with \gls{makeindex}.

The transcript file will still contain the message
about the missing \texttt{.gls}, but now you'll also see
information in the actual PDF document. The simplest remedy is to
follow the advice inserted into the document at that point, which is
to add the \pkgopt{nomain} package option:
\begin{verbatim}
\documentclass{article}

\usepackage[nomain,acronym]{glossaries-extra}

\makeglossaries

\newacronym{laser}{laser}{light amplification by stimulated
emission of radiation}

\begin{document}

\gls{laser}

\printglossaries

\end{document}
\end{verbatim}


\section{New or Modified Package Options}
\label{sec:pkgopts}

If you haven't already loaded \styfmt{glossaries}, you can use any of
the package options provided by \styfmt{glossaries} when you load
\styfmt{glossaries-extra} and they will automatically be passed to
\styfmt{glossaries} (which \styfmt{glossaries-extra} will load). If
\styfmt{glossaries} has already been loaded, then those options will be
passed to \ics{setupglossaries}, but remember that not all of the
\styfmt{glossaries} package options may be used in that command.

\begin{important}
This section only lists options that are either unrecognised by
the \styfmt{glossaries} package or are a modified version of options 
of the same name provided by \styfmt{glossaries}. See the
\styfmt{glossaries} user manual for details about the unmodified
options.
\end{important}

The new and modified options provided by \styfmt{glossaries-extra}
are described below:

\begin{description}
\item[{\pkgopt{accsupp}}] Load the \sty{glossaries-accsupp}
package (if not already loaded).

If you want to define styles that can interface with the
accessibility support provided by \sty{glossaries-accsupp} use
the \cs{glsaccess\meta{xxx}} type of commands instead of
\cs{glsentry\meta{xxx}} (for example, \ics{glsaccesstext} instead of
\ics{glsentrytext}). If \sty{glossaries-accsupp} hasn't been loaded
those commands are equivalent (for example, \cs{glsaccesstext}
just does \cs{glsentrytext}) but if it has been loaded, then the
\cs{glsaccess\meta{xxx}} commands will add the accessibility
information. (See \sectionref{sec:accsupp} for further details.)

Note that the \pkgopt{accsupp} option can only be used as 
a~package option (not through \ics{glossariesextrasetup}) since the \sty{glossaries-accsupp}
package must be loaded before \styfmt{glossaries-extra} if it's
required.

\item[{\pkgopt{stylemods}}] This is a
\meta{key}=\meta{value} option used to load the
\sty{glossaries-extra-stylemods} package. The value may be a
comma-separated list of options to pass to that package. (Remember
to group \meta{value} if it contains any commas.) The value may be
omitted if no options need to be passed. See \sectionref{sec:glosstylemods}
for further details.

\item[{\pkgopt{undefaction}}] This is a \meta{key}=\meta{value}
option, which has two allowed values: \pkgoptfmt{warn} and
\pkgoptfmt{error}. This indicates what to do if an undefined
glossary entry is referenced. The default behaviour is
\pkgopt[error]{undefaction}, which produces an error message (the
default for \styfmt{glossaries}). You can switch this to a warning
message (and ?? appearing in the text) with
\pkgopt[warn]{undefaction}.

\begin{important}
Undefined entries can't be picked up by any commands that iterate
over a glossary list. This includes \ics{forglsentries} and
\ics{glsaddall}.
\end{important}

\item[{\pkgopt{record}}]\label{opt:record}(New to v1.08.) This is a \meta{key}=\meta{value}
option, which has three allowed values: \pkgoptfmt{off} (default),
\pkgoptfmt{only} and \pkgoptfmt{alsoindex}. If the value is omitted
\pkgoptfmt{only} is assumed. The option is provided for the benefit
of \gls{bib2gls} (see \sectionref{sec:bib2gls}).

The option may only be set in the preamble.

The \pkgopt[off]{record} option switches off the recording, as per
the default behaviour. It implements \pkgopt[error]{undefaction}.

The other values switch on the recording and also
\pkgopt[warn]{undefaction}, but \pkgopt[only]{record}
will also switch off the indexing mechanism (even if \cs{makeglossaries}
or \cs{makenoidxglossaries} has been used) whereas
\pkgopt[alsoindex]{record} will both record and index.
Note that \pkgopt[only]{record} will prevent the \gloskey{see} from
automatically implementing \cs{glssee}. (\gls{bib2gls} deals with the 
\gloskey{see} field.) You may explicitly use \cs{glssee} in the
document, but \gls{bib2gls} will ignore the cross-reference if the
\gloskey{see} field was already set for that entry.

With the recording on, any of the commands that would typically
index the entry (such as \cs{gls}, \cs{glstext} or \cs{glsadd})
will add a \cs{glsxtr@record} entry to the \texttt{.aux} file.
\gls{bib2gls} can then read these lines to find
out which entries have been used. (Remember that commands like
\cs{glsentryname} don't index, so any use of these commands won't
add a corresponding \cs{glsxtr@record} entry to the \texttt{.aux}
file.) See \sectionref{sec:bib2gls} for further details.

\item[{\pkgopt{docdef}}] This option governs the use of
\cs{newglossaryentry}. It was originally a boolean option,
but as from version 1.06, it can now take one of three values (if
the value is omitted, \pkgoptfmt{true} is assumed):
\begin{itemize}
\item[{\pkgopt[false]{docdef}}] \ics{newglossaryentry} is not 
permitted in the \env{document} environment (default).
\item[{\pkgopt[true]{docdef}}] \cs{newglossaryentry} behaves as it
does in the base \styfmt{glossaries} package. That is, where
its use is permitted in the \env{document} environment, it
uses the \texttt{.glsdefs} temporary file to store the entry
definitions so that on the next \LaTeX\ run the entries are
defined at the beginning of the \env{document} environment.
This allows the entry information to be referenced in the glossary,
even if the glossary occurs before \cs{newglossaryentry}.
(For example, when the glossary is displayed in the front matter.)
This method of saving the definitions for the next \LaTeX\ run
has drawbacks that are detailed in the \styfmt{glossaries} user
manual.
\item[{\pkgopt[restricted]{docdef}}] (new to version 1.06)
\ics{newglossaryentry} is permitted in the \env{document}
environment without using the \texttt{.glsdefs} file. This means
that all entries must be defined before the glossary is displayed,
but it avoids the complications associated with saving the
entry details in a temporary file. You will still need to take
care about any changes made to characters that are required
by the \meta{key}=\meta{value} mechanism (that is, the comma and
equal sign) and any \gls{makeindex} or \gls{xindy} character that
occurs in the \gloskey{sort} key or label. If any of those
characters are made active in the document, then it can cause
problems with the entry definition. This option will allow
\cs{newglossaryentry} to be used in the document with
\cs{makenoidxglossaries}, but note that \cs{longnewglossaryentry}
remains a preamble-only command.

With this option, if an entry appears in the glossary before
it has been defined, an error will occur (or a warning if
the \pkgopt[warn]{undefaction} option is used.) If you edit your
document and either remove an entry or change its label, you may
need to delete the document's temporary files (such as the
\texttt{.aux} and \texttt{.gls} files).

\end{itemize}

The \styfmt{glossaries} package allows
\cs{newglossaryentry} within the \env{document} environment (when
used with \gls{makeindex} or \gls{xindy}) but the user manual warns 
against this usage. By default the \styfmt{glossaries-extra} package
\emph{prohibits} this, only allowing definitions within the
preamble. If you are really determined to define entries in the
\env{document} environment, despite all the associated drawbacks,
you can restore this with \pkgopt[true]{docdef}. Note that this
doesn't change the prohibitions that the \styfmt{glossaries}
package has in certain circumstances (for example, when using
\qt{option~1}). See the \styfmt{glossaries} user manual for further
details. A better option if document definitions are required
is \pkgopt[restricted]{docdef}. Only use \pkgopt[true]{docdef}
if document definitions are necessary and one or more of the
glossaries occurs in the front matter.

\begin{sloppypar}
This option affects commands that internally use
\cs{newglossaryentry}, such as \cs{newabbreviation}, but not
the \qt{on-the-fly} commands described in \sectionref{sec:onthefly}.
\end{sloppypar}

\item[{\pkgopt{nomissingglstext}}] This is a boolean option.
If true, this will suppress the warning text that will appear in the
document if the external glossary files haven't been generated due
to an incomplete document build. However, it's probably simpler 
just to fix whatever has caused the failure to build the external
file or files.

\item[{\pkgopt{indexcrossrefs}}] This is a boolean option.
If \pkgoptfmt{true}, this will automatically index any
cross-referenced entries that haven't been marked as used at
the end of the document. Note that this necessarily adds to
the overall document build time, especially if you have defined
a large number of entries, so this defaults to \pkgoptfmt{false},
but it will be automatically switched on if you use the \gloskey{see} key in any
entries. To force it off, even if you use the \gloskey{see} key, you
need to explicitly set \pkgopt{indexcrossrefs} to \pkgoptfmt{false}.

Note that \gls{bib2gls} can automatically find dependent
entries when it parses the \texttt{.bib} source file.
The \pkgopt{record} option automatically implements
\pkgopt[false]{indexcrossrefs}.

\item[{\pkgopt{abbreviations}}] This option has no value and can't
be cancelled. If used,
it will automatically create a new glossary with the label
\texttt{abbreviations} and redefines \cs{glsxtrabbrvtype} to this
label. In addition, it defines a shortcut command
\begin{definition}[\DescribeMacro\printabbreviations]
\cs{printabbreviations}\oarg{options}
\end{definition}
which is equivalent to
\begin{alltt}
\cs{printglossary}[type=\cs{glsxtrabbrvtype},\meta{options}]
\end{alltt}
The title of the new glossary is given by
\begin{definition}[\DescribeMacro\abbreviationsname]
\cs{abbreviationsname}
\end{definition}
If this command is already defined, it's left unchanged. Otherwise
it's defined to \qt{Abbreviations} if \sty{babel} hasn't been loaded
or \cs{acronymname} if \sty{babel} has been loaded. However, if
you're using \sty{babel} it's likely you will need to change this.
(See \sectionref{sec:lang} for further details.)

\begin{important}
If you don't use the \pkgopt{abbreviations} package option,
the \cs{abbreviationsname} command won't be defined (unless it's
defined by an included language file).
\end{important}

If the \pkgopt{abbreviations} option is used and the 
\pkgopt{acronym} option provided by the \styfmt{glossaries}
package hasn't been used, then \ics{acronymtype}
will be set to \ics{glsxtrabbrvtype} so that acronyms defined with
\ics{newacronym} can be added to the list of abbreviations. If you
want acronyms in the \texttt{main} glossary and other abbreviations in the
\texttt{abbreviations} glossary then you will need to redefine
\cs{acronymtype} to \texttt{main}:
\begin{verbatim}
\renewcommand*{\acronymtype}{main}
\end{verbatim}

Note that there are no analogous options to the \styfmt{glossaries}
package's \pkgopt{acronymlists} option (or associated commands)
as the abbreviation mechanism is handled differently with
\styfmt{glossaries-extra}.

\item[{\pkgopt{symbols}}] This is passed to \styfmt{glossaries} but
will additionally define
\begin{definition}[\DescribeMacro\glsxtrnewsymbol]
\cs{glsxtrnewsymbol}\oarg{options}\marg{label}\marg{symbol}
\end{definition}
which is equivalent to
\begin{alltt}
\cs{newglossaryentry}\marg{label}\{name=\marg{symbol},
 sort=\marg{label},type=symbols,category=symbol,\meta{options}\}
\end{alltt}
Note that the \gloskey{sort} key is set to the \meta{label}
not the \meta{symbol} as the symbol will likely contain commands.

\item[{\pkgopt{numbers}}] This is passed to \styfmt{glossaries} but
will additionally define
\begin{definition}[\DescribeMacro\glsxtrnewnumber]
\cs{glsxtrnewnumber}\oarg{options}\marg{number}
\end{definition}
which is equivalent to
\begin{alltt}
\cs{newglossaryentry}\marg{label}\{name=\marg{number},
 sort=\marg{label},type=numbers,category=number,\meta{options}\}
\end{alltt}

\item[{\pkgopt{shortcuts}}] Unlike the \styfmt{glossaries} package
option of the same name, this option isn't boolean but has multiple
values:
\begin{itemize}
\item \pkgopt[acronyms]{shortcuts} (or \pkgopt[acro]{shortcuts}):
set the shortcuts provided by the \styfmt{glossaries} package for acronyms (such as \cs{ac}).

\item \pkgopt[abbreviations]{shortcuts} (or
\pkgopt[abbr]{shortcuts}):
set the abbreviation shortcuts provided by \styfmt{glossaries-extra}. (See
\sectionref{sec:abbrshortcuts}.) These settings don't switch on the
acronym shortcuts provided by the \styfmt{glossaries} package.

\item \pkgopt[other]{shortcuts}: set the \qt{other}
shortcut commands, but not the shortcut commands for abbreviations
or the acronym shortcuts provided by \styfmt{glossaries}.
The \qt{other} shortcuts are:
\begin{itemize}
\item \ics{newentry} equivalent to \ics{newglossaryentry}
\item \ics{newsym} equivalent to \ics{glsxtrnewsymbol} (see the
\pkgopt{symbols} option).
\item \ics{newnum} equivalent to \ics{glsxtrnewnumber} (see the
\pkgopt{numbers} option).
\end{itemize}

\item \pkgopt[all]{shortcuts} (or \pkgopt[true]{shortcuts}): 
define all the shortcut commands.

\item \pkgopt[none]{shortcuts} (or \pkgopt[false]{shortcuts}):
don't define any of the shortcut commands (default).
\end{itemize}

Note that multiple invocations of the \pkgopt{shortcuts} option
\emph{within the same option list} will override each other.
\end{description}

After the \styfmt{glossaries-extra} package has been loaded, you can
set available options using
\begin{definition}[\DescribeMacro\glossariesextrasetup]
\cs{glossariesextrasetup}\marg{options}
\end{definition}
The \pkgopt{abbreviations} and \pkgopt{docdef} options may only be
used in the preamble. Additionally, \pkgopt{docdef} can't be used
after \ics{makenoidxglossaries}.

\chapter{Modifications to Existing Commands and Styles}
\label{sec:modifications}

The commands used by \styfmt{glossaries} to automatically produce an
error if an entry is undefined (such as \ics{glsdoifexists}) are
changed to take the \pkgopt{undefaction} option into account.

The \ics{newignoredglossary}\marg{type} command now (as from v1.11) has a starred
version that doesn't automatically switch off the hyperlinks.
This starred version may be used with the \catattr{targeturl}
attribute to create a link to an external URL. (See
\sectionref{sec:categories} for further details.)
As from v1.12 both the starred and unstarred version check
that the glossary doesn't already exist. (The \styfmt{glossaries}
package omits this check.)

You can now provide an ignored glossary with:
\begin{definition}[\DescribeMacro\provideignoredglossary]
\cs{provideignoredglossary}\marg{type}
\end{definition}
which will only define the glossary if it doesn't already exist.
This also has a starred version that doesn't automatically switch
off hyperlinks.

The individual glossary displaying commands \ics{printglossary},
\ics{printnoidxglossary} and \cs{printunsrtglossary} have an extra
key \gloskey[printglossary]{target}. This is a boolean key which can
be used to switch off the automatic hypertarget for each entry.
Unlike \cs{glsdisablehyper} this doesn't switch off hyperlinks, so
any cross-references within the glossary won't be affected. This is
a way of avoiding duplicate target warnings if a glossary needs to
be displayed multiple times.

The \cs{newglossaryentry} command has two new keys:
\begin{itemize}
\item \gloskey{category}, which sets the category label for the given
entry. By default this is \texttt{general}. See
\sectionref{sec:categories} for further information about
categories.
\item \gloskey{alias}, which allows an entry to be alias to another
entry. See \sectionref{sec:alias} for further details.
\end{itemize}

The \cs{longnewglossaryentry} command now has a starred version
(as from v1.12) that doesn't automatically insert
\begin{verbatim}
\leavevmode\unskip\nopostdesc
\end{verbatim}
at the end of the description field.
\begin{definition}[\DescribeMacro\longnewglossaryentry]
\cs{longnewglossaryentry}*\marg{label}\marg{options}\marg{description}
\end{definition}
The \gloskey{descriptionplural} key is left unset unless explicitly
set in \meta{options}.

The unstarred version no longer hard-codes the above code (which
removes trailing space and suppresses the post-description hook) but instead
uses:
\begin{definition}[\DescribeMacro\glsxtrpostlongdescription]
\cs{glsxtrpostlongdescription}
\end{definition}
This can be redefined to allow the post-description hook to work
but retain the \cs{unskip} part if required.
For example:
\begin{verbatim}
\renewcommand*{\glsxtrpostlongdescription}{\leavevmode\unskip}
\end{verbatim}
This will discarded unwanted trailing space at the end of the description
but won't suppress the post-description hook.

The unstarred version also alters the base \sty{glossaries} package's
treatment of the \gloskey{descriptionplural} key. Since a
plural description doesn't make much sense for multi-paragraph
descriptions, the default behaviour with 
\sty{glossaries-extra}'s
\cs{longnewglossaryentry} is to simply leave the plural description
unset unless explicitly set using the \gloskey{descriptionplural}
key. The \styfmt{glossaries.sty} version of this command sets the description's
plural form to the same as the singular.\footnote{The
\gloskey{descriptionplural} key is a
throwback to the base package's original acronym mechanism before the introduction of
the \gloskey{long} and \gloskey{short} keys, where the long form was
stored in the \gloskey{description} field and the short form was stored in the
\gloskey{symbol} field.}

Note that this modified unstarred version doesn't append
\cs{glsxtrpostlongdescription} to the description's plural form.

The \ics{newterm} command (defined through the \pkgopt{index} package
option) is modified so that the category defaults to \category{index}.
The \ics{newacronym} command is modified to use the new abbreviation
interface provided by \styfmt{glossaries-extra}.
(See \sectionref{sec:abbreviations}.)

The \cs{makeglossaries} command now has an optional argument.
\begin{definition}[\DescribeMacro\makeglossaries]
\cs{makeglossaries}\oarg{list}
\end{definition}
If \meta{list} is empty, \cs{makeglossaries} behaves as per
its original definition in the \styfmt{glossaries} package,
otherwise \meta{list} can be a comma-separated list of glossaries
that need processing with an external indexing application.

It should then be possible to use \cs{printglossary} for those
glossaries listed in \meta{list} and \cs{printnoidxglossary}
for the other glossaries. (See the accompanying file
\texttt{sample-mixedsort.tex} for an example.)

\begin{important}
If you use the optional argument \meta{list}, you can't define
entries in the document (even with the \pkgopt{docdef} option).
\end{important}

You will need at least version 2.20 of \gls{makeglossaries} or at
least version 1.3 of the Lua alternative \gls{makeglossaries-lite.lua} (both distributed
with \styfmt{glossaries} v4.27) to allow for this use of
\cs{makeglossaries}\oarg{list}. Alternatively, use the
\pkgopt{automake} option.

\section{Entry Indexing}
\label{sec:wrglossary}

The \styfmt{glossaries-extra} package provides extra keys for
commands like \cs{gls} and \cs{glstext}:
\begin{description}
\item[{\gloskey[glslink]{noindex}}] This is a boolean key. If true,
this suppresses the indexing. (That is, it prevents \cs{gls} or
whatever from adding a line to the external glossary file.)
This is more useful than the \pkgopt{indexonlyfirst} package option
provided by \styfmt{glossaries}, as the \gls{firstuse} might not be the most
pertinent use. (If you want to apply \pkgopt{indexonlyfirst}
to selected entries, rather than all of them, you can use
the \catattr{indexonlyfirst} attribute, see
\sectionref{sec:categories} for further details.)
Note that the \gloskey[glslink]{noindex} key isn't available
for \ics{glsadd} (and \ics{glsaddall}) since the whole purpose
of that command is to index an entry.

\item[{\gloskey[glslink]{wrgloss}}] (New to v1.14.) 
This is may only take the
values \optfmt{before} or \optfmt{after}. By default, commands
that both index and display link text (such as \cs{gls},
\cs{glstext} and \cs{glslink}), perform the indexing before
the link text as the indexing creates a whatsit that can cause
problems if it occurs after the link text. However, it may
be that in some cases (such as long phrases) you may actually
want the indexing performed after the link text. In this
case you can use \texttt{wrgloss=after} for specific 
instances. Note that this option doesn't 
have an effect if the indexing has been suppressed through
other settings (such as \gloskey[glslink]{noindex}).

The default value is set up using
\begin{definition}[\DescribeMacro\glsxtrinitwrgloss]
\cs{glsxtrinitwrgloss}
\end{definition}
which is defined as:
\begin{verbatim}
\newcommand*{\glsxtrinitwrgloss}{%
 \glsifattribute{\glslabel}{wrgloss}{after}%
 {%
   \glsxtrinitwrglossbeforefalse
 }%
 {%
   \glsxtrinitwrglossbeforetrue
 }%
}
\end{verbatim}
This sets the conditional
\begin{definition}[\DescribeMacro\ifglsxtrinitwrglossbefore]
\cs{ifglsxtrinitwrgloss}
\end{definition}
which is used to determine where to perform the indexing.

This means you can set the \catattr{wrgloss} 
attribute to \optfmt{after} to automatically use this as
the default for entries with that category attribute. (Note that
adding \gloskey[glslink]{wrgloss} to the default options
in \ics{GlsXtrSetDefaultGlsOpts} will override 
\cs{glsxtrinitwrgloss}.)

\end{description}

There is a new hook that's used each time indexing information is
written to the external glossary files:
\begin{definition}[\DescribeMacro\glsxtrdowrglossaryhook]
\cs{glsxtrdowrglossaryhook}\marg{label}
\end{definition}
where \meta{label} is the entry's label. This does nothing by
default but may be redefined. (See, for example, the 
accompanying sample file \texttt{sample-indexhook.tex}, 
which uses this hook to determine which entries haven't been
indexed.)

As from version 1.14, there are two new keys for \cs{glsadd}: 
\gloskey[glsadd]{thevalue} and \gloskey[glsadd]{theHvalue}. 
These keys are designed for manually adding explicit locations
rather than obtaining the value from the associated counter. (If 
you want an automated method, you might want to investigate \gls{bib2gls}.) This is
intended primarily for adding locations in supplementary material
that can't otherwise be picked up by \gls{makeindex} or \gls{xindy}.
They therefore aren't available for commands like \cs{gls} or
\cs{glslink}. Remember that the value will still need to 
be a valid location according to the rules of whichever indexing
application you use.

For example, suppose the file \texttt{suppl.tex} contains:
\begin{verbatim}
\documentclass{article}

\usepackage{glossaries-extra}

\newglossaryentry{sample}{name={sample},description={an example}}

\renewcommand{\thepage}{S.\arabic{page}}

\begin{document}
First page.
\newpage
\gls{sample}.
\end{document}
\end{verbatim}
This has an entry on page S.2. Suppose another document wants to
include this location in the glossary. Then this can be done by
setting \gloskey[glsadd]{thevalue} to \texttt{S.2}. For example:
\begin{verbatim}
\documentclass{article}

\usepackage{glossaries-extra}

\makeglossaries

\newglossaryentry{sample}{name={sample},description={an example}}

\begin{document}
Some \gls{sample} text.

\printglossaries
\glsadd[thevalue={S.2}]{sample}
\end{document}
\end{verbatim}
(By placing \cs{glsadd} at the end of the document, it adds the
supplementary location to the end of the location list, although the
ordering may be changed by the indexing application depending on its
location collation settings.)

If you want hyperlinks, things are more complicated. First
you need to set the \catattr{externallocation} to the location of
the PDF file. For example:
\begin{verbatim}
\glssetcategoryattribute{supplemental}{externallocation}{suppl.pdf}

\newglossaryentry{sample}{category=supplemental,
 name={sample},description={an example}}
\end{verbatim}
Next you need to add \texttt{glsxtrsupphypernumber} as the format:
\begin{verbatim}
\glsadd[thevalue={S.2},format=glsxtrsupphypernumber]{sample}
\end{verbatim}
Both documents will need to use the \sty{hyperref} package.
Remember that the counter used for the location also needs to match.
If \cs{theH}\meta{counter} is defined in the other document
and is not the same as \cs{the}\meta{counter}, then you need
to use \gloskey[glsadd]{theHvalue} to set the appropriate value.
See the accompanying sample files \texttt{sample-suppl-hyp.tex}
and \texttt{sample-suppl-main-hyp.tex} for an example that uses
\sty{hyperref}.

\begin{important}
The hyperlink for the supplementary location may or \emph{may not}
take you to the relevant place in the external PDF file
\emph{depending on your PDF viewer}. Some may not support external
links, and some may take you to the first page or last visited page.
\end{important}

The value of the \gloskey{see} key is now saved
as a field. This isn't the case with \styfmt{glossaries}, where
the \gloskey{see} attribute is simply used to directly
write a line to the corresponding glossary file and is then 
discarded. This is why the \gloskey{see} key can't be
used before \ics{makeglossaries} (since the file hasn't been opened
yet). It's also the reason why the \gloskey{see} key doesn't have
any effect when used in entries that are defined in the
\env{document} environment. Since the value isn't saved,
it's not available when the \texttt{.glsdefs} file is created at the
end of the document and so isn't available at the start of the
\env{document} environment on the next run.

This modification allows \styfmt{glossaries-extra} to provide
\begin{definition}[\DescribeMacro\glsxtraddallcrossrefs]
\cs{glsxtraddallcrossrefs}
\end{definition}
which is used at the end of the document to automatically add
any unused cross-references unless the package option
\pkgopt{indexcrossrefs} was set to false.

As a by-product of this enhancement, the \gloskey{see} key will now
work for entries defined in the \env{document} environment, but it's still
best to define entries in the preamble, and the \gloskey{see} key
still can't perform any indexing before the file has been opened by
\cs{makeglossaries}. Note that \styfmt{glossaries} v4.24 introduced
the \pkgopt{seenoindex} package option, which can be used to
suppress the error when the \gloskey{see} key is used before
\cs{makeglossaries}, so \pkgopt[ignore]{seenoindex} will allow the 
\gloskey{see} value to be stored even though it may not be possible
to index it at that point.

As from version 1.06, you can display the cross-referenced
information for a given entry using
\begin{definition}[\DescribeMacro\glsxtrusesee]
\cs{glsxtrusesee}\marg{label}
\end{definition}
This internally uses
\begin{definition}[\DescribeMacro\glsxtruseseeformat]
\cs{glsxtruseseeformat}\marg{tag}\marg{xr list}
\end{definition}
where \meta{tag} and \meta{xr list} are obtained from the value of
the entry's \gloskey{see} field (if non-empty).
By default, this just does \cs{glsseeformat}\oarg{tag}\marg{xr
list}\verb|{}|, which is how the cross-reference is displayed in the
\gls{numberlist}. Note that \cs{glsxtrusesee} does nothing if the
\gloskey{see} field hasn't been set for the entry given by
\meta{label}.

Suppose you want to suppress the \gls*{numberlist}
using \pkgopt{nonumberlist}. This will automatically prevent the
cross-references from being displayed. The
\pkgopt{seeautonumberlist} package option will automatically
enable the \gls*{numberlist} for entries that have the \gloskey{see}
key set, but this will also show the rest of the \gls*{numberlist}.

Another approach in this situation is to use the post description
hook with \cs{glsxtrusesee} to append the cross-reference after
the description. For example:
\begin{verbatim}
\renewcommand*{\glsxtrpostdescgeneral}{%
 \ifglshasfield{see}{\glscurrententrylabel}
 {, \glsxtrusesee{\glscurrententrylabel}}%
 {}%
}
\end{verbatim}
Now the cross-references can appear even though the \gls{numberlist}
has been suppressed.

\section{Entry Display Style Modifications}
\label{sec:entryfmtmods}

Recall from the \styfmt{glossaries} package that commands such as \cs{gls}
display text at that point in the document (optionally with a
hyperlink to the relevant line in the glossary). This text is
referred to as the \qt{\gls{linktext}} regardless of whether or not it
actually has a hyperlink. The actual text and the way it's displayed
depends on the command used (such as \cs{gls}) and the entry format.

The default entry format (\ics{glsentryfmt}) used in the
\gls{linktext} by commands like \ics{gls}, \ics{glsxtrfull},
\ics{glsxtrshort} and \ics{glsxtrlong} (but not commands like
\ics{glslink}, \ics{glsfirst} and \cs{glstext}) is changed by \styfmt{glossaries-extra} to test for
regular entries, which are determined as follows:

\begin{itemize}
\item If an entry is assigned to a category that has the
\catattr{regular} attribute set (see \sectionref{sec:categories}), the entry is considered a~regular
entry, even if it has a~value for the \gloskey{short} key.
In this case \cs{glsentryfmt} uses \ics{glsgenentryfmt}
(provided by \styfmt{glossaries}), which uses the \gloskey{first}
(or \gloskey{firstplural}) value on \gls{firstuse} and the
\gloskey{text} (or \gloskey{plural}) value on subsequent use.

\item An entry that doesn't have a~value for the \gloskey{short} 
key is assumed to be a~regular entry, even if the
\catattr{regular} attribute isn't set to \qt{true} (since it can't
be an abbreviation without the short form).
In this case \cs{glsentryfmt} uses \ics{glsgenentryfmt}.

\item If an entry does has a~value for the \gloskey{short} key
and hasn't been marked as a~regular entry through the 
\catattr{regular} attribute, it's not
considered a regular entry. 
In this case \cs{glsentryfmt} uses \ics{glsxtrgenabbrvfmt}
(defined by \styfmt{glossaries-extra}) which is governed
by the abbreviation style (see \sectionref{sec:abbrstyle}).

\end{itemize}

This means that entries with a short
form can be treated as regular entries rather than
abbreviations if it's more appropriate for the desired style.

As from version 1.04, \ics{glsentryfmt} now puts \ics{glsgenentry}
in the argument of the new command
\begin{definition}[\DescribeMacro\glsxtrregularfont]
\cs{glsxtrregularfont}\marg{text}
\end{definition}
This just does its argument \meta{text} by default. This means that
if you want regular entries in a different font but don't want
that font to apply to abbreviations, then you can redefine
\cs{glsxtrregularfont}. This is more precise than changing
\ics{glstextformat} which will be applied to all linking commands
for all entries.

For example:
\begin{verbatim}
\renewcommand*{\glsxtrregularfont}[1]{\textsf{#1}}
\end{verbatim}
You can access the label through \cs{glslabel}. For example,
you can query the category:
\begin{verbatim}
\renewcommand*{\glsxtrregularfont}[1]{%
 \glsifcategory{\glslabel}{general}{\textsf{#1}}{#1}}
\end{verbatim}
or query the category attribute:
\begin{verbatim}
\glssetcategoryattribute{general}{font}{sf}

\renewcommand*{\glsxtrregularfont}[1]{%
 \glsifattribute{\glslabel}{font}{sf}{\textsf{#1}}{#1}}
\end{verbatim}
or use the attribute to store the control sequence name:
\begin{verbatim}
\glssetcategoryattribute{general}{font}{textsf}
\glssetcategoryattribute{acronym}{font}{emph}

\renewcommand*{\glsxtrregularfont}[1]{%
  \glshasattribute{\glslabel}{font}%
  {\csuse{\glsgetattribute{\glslabel}{font}}{#1}}%
  {#1}%
}
\end{verbatim}
(Remember the category and attribute settings will only queried 
here for \catattr{regular} entries, so if the abbreviation style 
for the \category{acronym} category in the above example changes 
the regular attribute to \qt{false}, \cs{glsxtrregularfont} will 
no longer apply.)

The \cs{glspostlinkhook} provided by the \styfmt{glossaries} package to
insert information after the \gls{linktext} produced by commands like \cs{gls} and \cs{glstext} is
redefined to
\begin{definition}[\DescribeMacro\glsxtrpostlinkhook]
\cs{glsxtrpostlinkhook}
\end{definition}
This command will discard a following full stop (period) if the
\catattr{discardperiod} attribute is set to \qt{true} for the
current entry's category. It will also do
\begin{definition}[\DescribeMacro\glsxtrpostlink]
\cs{glsxtrpostlink}
\end{definition}
if a full stop hasn't be discarded and
\begin{definition}[\DescribeMacro\glsxtrpostlinkendsentence]
\cs{glsxtrpostlinkendsentence}
\end{definition}
if a full stop has been discarded.

\begin{important}
Avoid the use of \cs{gls}-like and \cs{glstext}-like commands
within the post-link hook as they will cause interference.
Consider using commands like \cs{glsentrytext}, \cs{glsaccesstext}
or \cs{glsxtrp} (\sectionref{sec:nested}) instead.
\end{important}

By default \cs{glsxtrpostlink} just does \postlinkcat\ if it exists, where
\meta{category} is the category label for the current entry.
(For example,  for the \category{general} category, 
\cs{glsxtrpostlinkgeneral} if it has been defined.)

\begin{sloppypar}
The sentence-ending hook is slightly more complicated.
If the command \postlinkcat\ is defined the hook will do that
and then insert a full stop with the space factor adjusted to match
the end of sentence. If \postlinkcat\ hasn't
been defined, the space factor is adjusted to match the end of
sentence. This means that if you have, for example, an entry that
ends with a full stop, a redundant following full stop will be
discarded and the space factor adjusted (in case the entry is in
uppercase) unless the entry is followed by additional material, in
which case the following full stop is no longer redundant and needs
to be reinserted.
\end{sloppypar}

There are some convenient commands you might want to use
when customizing the post-\gls{linktext} category hooks:
\begin{definition}[\DescribeMacro\glsxtrpostlinkAddDescOnFirstUse]
\cs{glsxtrpostlinkAddDescOnFirstUse}
\end{definition}
This will add the description in parentheses on \gls{firstuse}.

For example, suppose you want to append the description in
parentheses on \gls{firstuse} for entries in the \category{symbol}
category:
\begin{verbatim}
\newcommand*{\glsxtrpostlinksymbol}{%
  \glsxtrpostlinkAddDescOnFirstUse
}
\end{verbatim}

\begin{definition}[\DescribeMacro\glsxtrpostlinkAddSymbolOnFirstUse]
\cs{glsxtrpostlinkAddSymbolOnFirstUse}
\end{definition}
This will append the symbol (if defined) in parentheses on
\gls{firstuse}.

If you want to provide your own custom format be aware that you
can't use \ics{ifglsused} within the post-\gls{linktext} hook as by this point
the \gls{firstuseflag} will have been unset. Instead you can use
\begin{definition}[\DescribeMacro\glsxtrifwasfirstuse]
\cs{glsxtrifwasfirstuse}\marg{true}\marg{false}
\end{definition}
This will do \meta{true} if the last used entry was the
\gls{firstuse}
for that entry, otherwise it will do \meta{false}. (Requires at
least \styfmt{glossaries} v4.19 to work properly.) This command is
locally set by commands like \cs{gls}, so don't rely on it outside
of the post-\gls{linktext} hook.

\begin{important}
Note that commands like \ics{glsfirst} and \ics{glsxtrfull} fake
\gls{firstuse} for the benefit of the post-\gls{linktext} hooks by setting 
\cs{glsxtrifwasfirstuse} to \cs{@firstoftwo}.
(Although, depending on the styles in use, they may not exactly match
the text produced by \ics{gls}-like commands on \gls{firstuse}.)
However, the \abbrstyle{short-postfootnote} style alters \cs{glsxtrfull}
so that it fakes non-\gls{firstuse} otherwise the inline full format
would include the footnote, which is inappropriate.
\end{important}

For example, if you want to place the description in a footnote
after the \gls{linktext} on \gls{firstuse} for the \category{general} category:
\begin{verbatim}
\newcommand*{\glsxtrpostlinkgeneral}{%
  \glsxtrifwasfirstuse{\footnote{\glsentrydesc{\glslabel}}}{}%
}
\end{verbatim}

The \abbrstyle{short-postfootnote} abbreviation style uses the 
post-\gls{linktext} hook to
place the footnote after trailing punctuation characters.

You can set the default options used by \ics{glslink}, \ics{gls}
etc with:
\begin{definition}[\DescribeMacro\GlsXtrSetDefaultGlsOpts]
\cs{GlsXtrSetDefaultGlsOpts}\marg{options}
\end{definition}
For example, if you mostly don't want to index entries then
you can do:
\begin{verbatim}
\GlsXtrSetDefaultGlsOpts{noindex}
\end{verbatim}
and then use, for example, \verb|\gls[noindex=false]{sample}|
when you actually want the location added to the \gls{numberlist}.
These defaults may be overridden by other settings (such as
category attributes) in addition to any settings passed in the 
option argument of commands like \cs{glslink} and \cs{gls}.

Note that if you don't want \emph{any} indexing, just omit
\cs{makeglossaries} and \cs{printglossaries} (or analogous
commands). If you want to adjust the default for
\gloskey[glslink]{wrgloss}, it's better to do this by redefining
\ics{glsxtrinitwrgloss} instead.

Commands like \ics{gls} have star (\texttt{*}) and plus 
(\texttt{+}) modifiers as a short cut for \texttt{hyper=false}
and \texttt{hyper=true}. The \styfmt{glossaries-extra} package
provides a way to add a third modifier, if required, using
\begin{definition}[\DescribeMacro\GlsXtrSetAltModifier]
\cs{GlsXtrSetAltModifier}\marg{char}\marg{options}
\end{definition}
where \meta{char} is the character used as the modifier and
\meta{options} is the default set of options (which may be
overridden). Note that \meta{char} must be a single character
(not a UTF-8 character, unless you are using \XeLaTeX\ or
\LuaLaTeX).

\begin{important}
When choosing the character \meta{char} take care of any
changes in category code.
\end{important}

Example:
\begin{verbatim}
\GlsXtrSetAltModifier{!}{noindex}
\end{verbatim}
This means that \verb|\gls!{sample}| will be equivalent to
\verb|\gls[noindex]{sample}|. It's not possible to mix modifiers.
For example, if you want to do 
\begin{verbatim}
\gls[noindex,hyper=false]{sample}
\end{verbatim}
you can use \verb|\gls*[noindex]{sample}| or
\verb|\gls![hyper=false]{sample}| but you can't combine the
\texttt{*} and \texttt{!} modifiers.

\Glspl{locationlist} displayed with \cs{printnoidxglossary}
internally use
\begin{definition}[\DescribeMacro\glsnoidxdisplayloc]
\cs{glsnoidxdisplayloc}\marg{prefix}\marg{counter}\marg{format}\marg{location}
\end{definition}
This command is provided by \styfmt{glossaries}, but is modified by
\styfmt{glossaries-extra} to check for the start and end range
formation identifiers \verb|(| and \verb|)| which are discarded to
obtain the actual control sequence name that forms the location
formatting command.

If the range identifiers aren't present, this just uses
\begin{definition}[\DescribeMacro\glsxtrdisplaysingleloc]
\cs{glsxtrdisplaysingleloc}\marg{format}\marg{location}
\end{definition}
otherwise it uses
\begin{definition}[\DescribeMacro\glsxtrdisplaystartloc]
\cs{glsxtrdisplaystartloc}\marg{format}\marg{location}
\end{definition}
for the start of a range (where the identifier has been stripped
from \meta{format}) or
\begin{definition}[\DescribeMacro\glsxtrdisplayendloc]
\cs{glsxtrdisplayendloc}\marg{format}\marg{location}
\end{definition}
for the end of a range (where the identifier has been stripped
from \meta{format}).

By default the start range command saves the format in
\begin{definition}[\DescribeMacro\glsxtrlocrangefmt]
\cs{glsxtrlocrangefmt}
\end{definition}
and does
\begin{display}
\cs{glsxtrdisplaysingleloc}\marg{format}\marg{location}
\end{display}
(If the format is empty, it will be replaced with 
\texttt{glsnumberformat}.)

The end command checks that the format matches the start of the
range, does
\begin{definition}[\DescribeMacro\glsxtrdisplayendlochook]
\cs{glsxtrdisplayendlochook}\marg{format}\marg{location}
\end{definition}
(which does nothing by default), followed by
\begin{display}
\cs{glsxtrdisplaysingleloc}\marg{format}\marg{location}
\end{display}
and then sets \cs{glsxtrlocrangefmt} to empty.

This means that the list
\begin{verbatim}
\glsnoidxdisplayloc{}{page}{(textbf}{1},
\glsnoidxdisplayloc{}{page}{textbf}{1},
\glsnoidxdisplayloc{}{page}{)textbf}{1}.
\end{verbatim}
doesn't display any differently from 
\begin{verbatim}
\glsnoidxdisplayloc{}{page}{textbf}{1},
\glsnoidxdisplayloc{}{page}{textbf}{1},
\glsnoidxdisplayloc{}{page}{textbf}{1}.
\end{verbatim}
but it does make it easier to define your own custom list handler
that can accommodate the ranges.


\section{Entry Counting Modifications}
\label{sec:entrycountmods}

The \ics{glsenableentrycount} command is modified to allow
for the \catattr{entrycount} attribute. This means that
you not only need to enable entry counting with
\cs{glsenableentrycount}, but you also need
to set the appropriate attribute (see \sectionref{sec:categories}).

For example, instead of just doing:
\begin{verbatim}
\glsenableentrycount
\end{verbatim}
you now need to do:
\begin{verbatim}
\glsenableentrycount
\glssetcategoryattribute{abbreviation}{entrycount}{1}
\end{verbatim}
This will enable the entry counting for entries in the
\category{abbreviation} category, but any entries assigned to
other categories will be unchanged.

Further information about entry counting, including the
new per-unit feature, is described in \sectionref{sec:entrycount}.

\section{Plurals}

Some languages, such as English, have a general rule that plurals
are formed from the singular with a suffix appended. This isn't 
an absolute rule. There are plenty of exceptions (for example,
geese, children, churches, elves, fairies, sheep). The
\sty{glossaries} package allows the \gloskey{plural} key to be
optional when defining entries. In some cases a plural may not make
any sense (for example, the term is a symbol) and in some cases
the plural may be identical to the singular.

To make life easier for languages where the majority of plurals can
simply be formed by appending a suffix to the singular, the
\sty{glossaries} package sets lets the \gloskey{plural} field default
to the value of the \gloskey{text} field with \ics{glspluralsuffix}
appended. This command is defined to be just the letter \qt{s}.
This means that the majority of terms don't need to have the
\gloskey{plural} supplied as well, and you only need to use it for the
exceptions.

For languages that don't have this general rule, the \gloskey{plural}
field will always need to be supplied, where needed.

There are other plural fields, such as \gloskey{firstplural},
\gloskey{longplural} and \gloskey{shortplural}. Again, if you are using
a language that doesn't have a simple suffix rule, you'll have to
supply the plural forms if you need them (and if a plural makes
sense in the context).

If these fields are omitted, the \sty{glossaries} package follows
these rules:
\begin{itemize}
\item If \gloskey{firstplural} is missing, then \cs{glspluralsuffix}
is appended to the \gloskey{first} field, if that field has been
supplied. If the \gloskey{first} field hasn't been supplied but the
\gloskey{plural} field has been supplied, then the \gloskey{firstplural}
field defaults to the \gloskey{plural} field. If the \gloskey{plural}
field hasn't been supplied, then both the \gloskey{plural} and
\gloskey{firstplural} fields default to the \gloskey{text} field (or
\gloskey{name}, if no \gloskey{text} field) with \cs{glspluralsuffix}
appended.

\item If the \gloskey{longplural} field is missing, then 
\cs{glspluralsuffix} is appended to the \gloskey{long} field, if the
\gloskey{long} field has been supplied.

\item If the \gloskey{shortplural} field is missing then, \emph{with
the base \sty{glossaries} acronym mechanism}, \ics{acrpluralsuffix}
is appended to the \gloskey{short} field.

\end{itemize}

This \emph{last case is changed} with \styfmt{glossaries-extra}.
With this extension package, the \gloskey{shortplural} field
defaults to the \gloskey{short} field with \ics{abbrvpluralsuffix}
appended unless overridden by category attributes. This
suffix command is set by the abbreviation styles. This means that
every time an abbreviation style is implemented,
\cs{abbrvpluralsuffix} is redefined. In most cases its redefined to
use
\begin{definition}[\DescribeMacro\glsxtrabbrvpluralsuffix]
\cs{glsxtrabbrvpluralsuffix}
\end{definition}
which defaults to just \cs{glspluralsuffix}. Some of the
abbreviation styles have their own command for the plural suffix,
such as \cs{glsxtrscsuffix} which is defined as:
\begin{verbatim}
\newcommand*{\glsxtrscsuffix}{\glstextup{\glsxtrabbrvpluralsuffix}}
\end{verbatim}
So if you want to completely strip all the plural suffixes used for
abbreviations then you need to redefine \cs{glsxtrabbrvpluralsuffix}
\emph{not} \cs{abbrvpluralsuffix}, which changes with the style. Redefining
\cs{acrpluralsuffix} will have no affect, since it's not used by the
new abbreviation mechanism.

If you require a mixture (for example, in a multilingual document),
there are two attributes that affect the short plural suffix
formation. The first is \catattr{aposplural} which uses the suffix
\begin{verbatim}
'\abbrvpluralsuffix
\end{verbatim}
That is, an apostrophe followed by \cs{abbrvpluralsuffix} is
appended. The second attribute is \catattr{noshortplural} which
suppresses the suffix and simply sets \gloskey{shortplural} to the
same as \gloskey{short}.

\section{Nested Links}
\label{sec:nested}

Complications arise when you use \ics{gls} in the 
value of the \gloskey{name} field (or \gloskey{text} 
or \gloskey{first} fields, if set). This tends to occur with
abbreviations that extend other abbreviations. For example,
SHTML is an abbreviation for SSI enabled HTML, where SSI
is an abbreviation for Server Side Includes and HTML
is an abbreviation for Hypertext Markup Language.

Things can go wrong if we try the following with the
\styfmt{glossaries} package:
\begin{verbatim}
\newacronym{ssi}{SSI}{Server Side Includes}
\newacronym{html}{HTML}{Hypertext Markup Language}
\newacronym{shtml}{S\gls{html}}{\gls{ssi} enabled \gls{html}}
\end{verbatim}

The main problems are:
\begin{enumerate}
\item\label{itm:nestedfirstucprob} The first letter upper casing commands, such as \ics{Gls},
won't work for the \texttt{shtml} entry on \gls{firstuse} if the
long form is displayed before the short form (which is the
default abbreviation style). This will attempt to do
\begin{verbatim}
\gls{\uppercase ssi} enabled \gls{html}
\end{verbatim}
which just doesn't work. Grouping the \verb|\gls{ssi}| doesn't
work either as this will effectively try to do
\begin{verbatim}
\uppercase{\gls{ssi}} enabled \gls{html}
\end{verbatim}
This will upper case the label \texttt{ssi} so the entry won't be
recognised. This problem will also occur if you use the all capitals
version, such as \ics{GLS}.

\item\label{itm:nonexpandprob} The long and abbreviated forms accessed through
\ics{glsentrylong} and \ics{glsentryshort} are no longer expandable
and so can't be used be used in contexts that require this,
such as PDF bookmarks.

\item\label{itm:nestedsortprob} The nested commands may end up in the \gloskey{sort} key,
which will confuse the indexing.

\item\label{itm:inconsistentfirstuseprob} The \texttt{shtml} entry produces inconsistent results
depending on whether the \texttt{ssi} or \texttt{html} entries have
been used. Suppose both \texttt{ssi} and \texttt{html} are used
before \texttt{shtml}. For example:
\begin{verbatim}
This section discusses \gls{ssi}, \gls{html} and \gls{shtml}.
\end{verbatim}
This produces:
\begin{quote}
This section discusses server side includes (SSI), hypertext markup
language (HTML) and SSI enabled HTML (SHTML).
\end{quote}
So the \gls{firstuse} of the \texttt{shtml} entry produces
\qt{SSI enabled HTML (SHTML)}.

Now let's suppose the \texttt{html} entry is used before the
\texttt{shtml} but the \texttt{ssi} entry is used after the
\texttt{shtml} entry, for example:
\begin{verbatim}
The sample files are either \gls{html} or \gls{shtml}, but let's
first discuss \gls{ssi}.
\end{verbatim}
This produces:
\begin{quote}
The sample files are either hypertext markup language (HTML) or
server
side includes (SSI) enabled HTML (SHTML), but let’s first discuss
SSI.
\end{quote}
So the \gls{firstuse} of the \texttt{shtml} entry now produces
\qt{server side includes (SSI) enabled HTML (SHTML)}, which looks
a bit strange.

Now let's suppose the \texttt{shtml} entry is used before (or
without) the other two entries:
\begin{verbatim}
This article is an introduction to \gls{shtml}.
\end{verbatim}
This produces:
\begin{quote}
This article is an introduction to server side includes (SSI)
enabled hypertext markup language (HTML) (SHTML).
\end{quote}
So the \gls{firstuse} of the \texttt{shtml} entry now produces
\qt{server side includes (SSI) enabled hypertext markup language (HTML) 
(SHTML)}, which is even more strange.

This is all aggravated by setting the style using the
\styfmt{glossaries} package's
\cs{setacronymstyle}. For example:
\begin{verbatim}
\setacronymstyle{long-short}
\end{verbatim}
as this references the label through the use of \cs{glslabel}
when displaying the long and short forms, but this value
changes with each use of \cs{gls}, so instead of displaying
\qt{(SHTML)} at the end of the \gls{firstuse}, it now displays
\qt{(HTML)}, since \cs{glslabel} has been changed to \texttt{html}
by \verb|\gls{html}|.

Another oddity occurs if you reset the \texttt{html} entry between
uses of the \texttt{shtml} entry. For example:
\begin{verbatim}
\gls{shtml} ... \glsreset{html}\gls{shtml}
\end{verbatim}
The next use of \texttt{shtml} produces \qt{Shypertext markup
language (HTML)}, which is downright weird.

Even without this, the short form has nested formatting commands,
which amount to \verb|\acronymfont{S\acronymfont{HTML}}|. This
may not be a problem for some styles, but if you use one of the 
\qt{sm} styles (that use \ics{textsmaller}), this will produce
an odd result.

\item\label{itm:indexingprob} Each time the \texttt{shtml} entry is used, the 
\texttt{html} entry will also be indexed and marked as used,
and on \gls{firstuse} this will happen to both the \texttt{ssi}
and \texttt{html} entries.  This kind of duplication in the location
list isn't usually particularly helpful to the reader.

\item\label{itm:nestedhyplinkprob} If \sty{hyperref} is in use, you'll get nested hyperlinks
and there's no consistent way of dealing with this across the 
available PDF viewers. If on the \gls{firstuse} case, the user
clicks on the \qt{HTML} part of the \qt{SSI enabled HTML (SHTML)}
link, they may be directed to the HTML entry in the glossary or 
they may be directed to the SHTML entry in the glossary.

\end{enumerate}

For these reasons it's better to use the simple expandable commands like
\ics{glsentrytext} or \ics{glsentryshort} in the definition
of other entries (although that doesn't fix the first problem).
Alternatively use something like:
\begin{verbatim}
\newacronym
 [description={\acrshort{ssi} enabled \acrshort{html}}]
 {shtml}{SHTML}{SSI enabled HTML}
\end{verbatim}
with \styfmt{glossaries} or:
\begin{verbatim}
\newabbreviation
 [description={\glsxtrshort{ssi} enabled \glsxtrshort{html}}]
 {shtml}{SHTML}{SSI enabled HTML}
\end{verbatim}
with \styfmt{glossaries-extra}. This fixes all the above
listed problems (as long as you don't use \ics{glsdesc}).
Note that replacing \cs{gls} with \cs{acrshort} in the original
example may fix the \gls{firstuse} issue, but it doesn't
fix any of the other problems listed above.

If it's simply that you want to use the abbreviation font, you can
use \cs{glsabbrvfont}:
\begin{verbatim}
\setabbreviationstyle{long-short-sc}

\newabbreviation{ssi}{ssi}{server-side includes}
\newabbreviation{html}{html}{hypertext markup language}
\newabbreviation{shtml}{shtml}{\glsabbrvfont{ssi} enabled
\glsabbrvfont{html}}
\end{verbatim}
This will pick up the font style setting of the outer entry (shtml,
in the above case). This isn't a problem in the above example as all
the abbreviations use the same style.

However if you're really determined to use
\ics{gls} in a field that may be included within 
some \gls{linktext}, \styfmt{glossaries-extra} patches internals
used by the linking commands so that if \cs{gls} (or plural or
case changing variants) occurs in the \gls{linktext} it will
behave as though you used 
\texttt{\ics{glstext}[hyper=false,noindex]}
instead. Grouping is also added so that, for example, when
\verb|\gls{shtml}| is used for the first time the long form
\begin{verbatim}
\gls{ssi} enabled \gls{html}
\end{verbatim}
is treated as
\begin{verbatim}
{\glstext[hyper=false,noindex]{ssi}} enabled 
{\glstext[hyper=false,noindex]{html}}
\end{verbatim}
This overcomes problems~\ref{itm:inconsistentfirstuseprob}, 
\ref{itm:indexingprob} and \ref{itm:nestedhyplinkprob} listed 
above, but still doesn't fix problems~\ref{itm:nestedfirstucprob}
and \ref{itm:nonexpandprob}.
Problem~\ref{itm:nestedsortprob} usually won't be an issue as most abbreviation
styles set the \gloskey{sort} key to the short form, so using these
commands in the long form but not the short form will only affect
entries with a style that sorts according to the long form (such as
\abbrstyle{long-noshort-desc}).

Additionally, any instance of the long form commands, such
as \ics{glsxtrlong} or \ics{acrlong} will be temporarily
redefined to just use
\begin{alltt}
\{\ics{glsentrylong}\marg{label}\meta{insert}\}
\end{alltt}
(or case-changing versions). Similarly the short form commands,
such as \ics{glsxtrshort} or \ics{acrshort} will use
\ics{glsentryshort} in the argument of either \cs{glsabbrvfont}
(for \cs{glsxtrshort}) or \cs{acronymfont} (for \cs{acrshort}).
So if the \texttt{shtml} entry had instead been defined as:
\begin{verbatim}
\newacronym{shtml}{SHTML}{\acrshort{ssi} enabled \acrshort{html}}
\end{verbatim}
then (using the \abbrstyle{long-short} style) the \gls{firstuse} 
will be like
\begin{verbatim}
{\acronymfont{\glsentryshort{ssi}}} enabled 
{\acronymfont{\glsentryshort{html}}} (SHTML)
\end{verbatim}
whereas if the entry is defined as:
\begin{verbatim}
\newabbreviation{shtml}{SHTML}{\glsxtrshort{ssi} enabled
\glsxtrshort{html}}
\end{verbatim}
then the \gls{firstuse} will be like:
\begin{verbatim}
{\glsabbrvfont{\glsentryshort{ssi}}} enabled 
{\glsabbrvfont{\glsentryshort{html}}} (SHTML)
\end{verbatim}
Note that the first optional argument of
\cs{acrshort} or \cs{glsxtrshort} is ignored in this context. 
(The final optional argument will be inserted, if present.)
The abbreviation style that governs \ics{glsabbrvfont} will be 
set for \ics{glsxtrshort}. Note that \cs{acrshort} doesn't
set the abbreviation style.

Alternatively you can use:
\begin{definition}[\DescribeMacro\glsxtrp]
\cs{glsxtrp}\marg{field}\marg{label}
\end{definition}
where \meta{field} is the field label and corresponds to a 
command in the form \cs{gls}\meta{field} (e.g.\ \cs{glstext}) or
in the form \cs{glsxtr}\meta{field} (e.g.\ \cs{glsxtrshort}).

There's a shortcut command for the most common fields:
\begin{definition}[\DescribeMacro\glsps]
\cs{glsps}\marg{label}
\end{definition}
which is equivalent to \verb|\glsxtrp{short}|\marg{label}, and
\begin{definition}[\DescribeMacro\glspt]
\cs{glspt}\marg{label}
\end{definition}
which is equivalent to \verb|\glsxtrp{text}|\marg{label}.

The \cs{glsxtrp} command behaves much like the
\cs{glsfmt}\meta{field} commands described in
\sectionref{sec:headtitle} but the post-link hook is also
suppressed and extra grouping is added. It automatically sets
\gloskey[glslink]{hyper} to \texttt{false} and
\gloskey[glslink]{noindex} to \texttt{true}.  If you want to change
this, you can use
\begin{definition}[\DescribeMacro\glsxtrsetpopts]
\cs{glsxtrsetpopts}\marg{options}
\end{definition}
For example:
\begin{verbatim}
\glsxtrsetpopts{hyper=false}
\end{verbatim}
will just switch off the hyperlinks but not the indexing.
Be careful using this command or you can end up back to the
original problem of nested links.

The hyper link is re-enabled within glossaries. This is 
done through the command:
\begin{definition}[\DescribeMacro\glossxtrsetpopts]
\cs{glossxtrsetpopts}
\end{definition}
which by default just does
\begin{verbatim}
\glsxtrsetpopts{noindex}
\end{verbatim}
You can redefine this if you want to adjust the setting when
\cs{glsxtrp} is used in the glossary. For example:
\begin{verbatim}
\renewcommand{\glossxtrsetpopts}{\glsxtrsetpopts{noindex=false}}
\end{verbatim}

For example,
\begin{verbatim}
\glsxtrp{short}{ssi}
\end{verbatim}
is equivalent to
\begin{verbatim}
{\let\glspostlinkhook\relax
 \glsxtrshort[hyper=false,noindex]{ssi}[]%
}
\end{verbatim}
in the main body of the document or
\begin{verbatim}
{\let\glspostlinkhook\relax
 \glsxtrshort[noindex]{ssi}[]%
}
\end{verbatim}
inside the glossary. (Note the post-link hook is locally disabled.)

If \verb|\glsxtrp{short}{ssi}| occurs in a sectioning mark,
it's equivalent to
\begin{verbatim}
{\glsxtrheadshort{ssi}}
\end{verbatim}
(which recognises the \catattr{headuc} attribute.)

If \sty{hyperref} has been loaded, then the bookmark will 
use \cs{glsentry}\meta{field}
(\verb|\glsentryshort{ssi}| in the above example).

There are similar commands
\begin{definition}[\DescribeMacro\Glsxtrp]
\cs{Glsxtrp}\marg{field}\marg{label}
\end{definition}
for first letter upper case and
\begin{definition}[\DescribeMacro\Glsxtrp]
\cs{GLSxtrp}\marg{field}\marg{label}
\end{definition}
for all upper case.

\begin{important}
If you use any of the case-changing commands, such as \ics{Gls}
or \ics{Glstext}, (either all caps or first letter upper casing)
don't use any of the linking commands, such as \ics{gls} or
\ics{glstext}, in the definition of entries for any of the
fields that may be used by those case-changing commands.
\end{important}

You can, with care, protect against issue~\ref{itm:nestedfirstucprob} by
inserting an empty group at the start if the long form starts with a
command that breaks the first letter uppercasing commands like
\cs{Gls}, but you still won't be able to use the all caps commands,
such as \cs{GLS}.

If you \emph{really need} nested commands, the safest method is
\begin{verbatim}
\newabbreviation{shtml}{shtml}{{}\glsxtrp{short}{ssi} enabled
\glsxtrp{short}{html}}
\end{verbatim}
but be aware that it may have some unexpected results occasionally.

Example document:
\begin{verbatim}
\documentclass{report}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{slantsc}
\usepackage[colorlinks]{hyperref}
\usepackage[nopostdot=false]{glossaries-extra}

\makeglossaries

\setabbreviationstyle{long-short-sc}

\newabbreviation{ssi}{ssi}{server-side includes}
\newabbreviation{html}{html}{hypertext markup language}
\newabbreviation{shtml}{shtml}{{}\glsps{ssi} enabled {}\glsps{html}}

\pagestyle{headings}

\glssetcategoryattribute{abbreviation}{headuc}{true}
\glssetcategoryattribute{abbreviation}{glossdesc}{title}

\begin{document}

\tableofcontents

\chapter{\glsfmtfull{shtml}}

First use: \gls{shtml}, \gls{ssi} and \gls{html}.

Next use: \gls{shtml}, \gls{ssi} and \gls{html}.

\newpage
Next page.

\printglossaries
\end{document}
\end{verbatim}

\section{Acronym Style Modifications}
\label{sec:acronymmods}

The \styfmt{glossaries-extra} package provides a new way of dealing
with abbreviations and redefines \ics{newacronym} to
use \cs{newabbreviation} (see \sectionref{sec:abbreviations}).
The simplest way to update a document that uses
\cs{newacronym} from \styfmt{glossaries} to
\styfmt{glossaries-extra} is do just add
\begin{verbatim}
\setabbreviationstyle[acronym]{long-short}
\end{verbatim}
before you define any entries.
For example, the following document using just \styfmt{glossaries}
\begin{verbatim}
\documentclass{article}
\usepackage[acronym,nopostdot,toc]{glossaries}
\makeglossaries
\setacronymstyle{long-short}
\newacronym{html}{HTML}{hypertext markup language}
\begin{document}
\gls{html}
\printglossaries
\end{document}
\end{verbatim}
can be easily adapted to use \styfmt{glossaries-extra}:
\begin{verbatim}
\documentclass{article}
\usepackage[acronym]{glossaries-extra}
\makeglossaries
\setabbreviationstyle[acronym]{long-short}
\newacronym{html}{HTML}{hypertext markup language}
\begin{document}
\gls{html}
\printglossaries
\end{document}
\end{verbatim}
Table~\ref{tab:acrabbrvstyles} lists the nearest equivalent
\styfmt{glossaries-extra} abbreviation styles for 
the predefined acronym styles provided by \styfmt{glossaries}, but
note that the new styles use different formatting commands. See 
\sectionref{sec:predefabbrvstyles} for further details.

\begin{table}[htbp]
\caption[Old Acronym Styles Verses New Abbreviation Styles]{Old Acronym Styles 
\cs{setacronymstyle}\marg{old-style-name} Verses New Abbreviation 
Styles \cs{setabbreviationstyle}\oarg{category}\marg{new-style-name}}
\label{tab:acrabbrvstyles}
\centering
\begin{tabular}{@{}p{\dimexpr0.3\textwidth-2\tabcolsep}p{0.7\textwidth}@{}}
\bfseries Old Style Name & 
\bfseries New Style Name\\
\acrstyle{long-sc-short} & \abbrstyle{long-short-sc}\\
\acrstyle{long-sm-short} & \abbrstyle{long-short-sm}\\
\acrstyle{long-sp-short} & \abbrstyle{long-short} \newline with
\ttfamily\cs{renewcommand}\{\cs{glsxtrfullsep}\}[1]\{\cs{glsacspace}\{\#1\}\}\\
\acrstyle{short-long} & \abbrstyle{short-long}\\
\acrstyle{sc-short-long} & \abbrstyle{short-sc-long}\\
\acrstyle{sm-short-long} & \abbrstyle{short-sm-long}\\
\acrstyle{long-short-desc} & \abbrstyle{long-short-desc}\\
\acrstyle{long-sc-short-desc} & \abbrstyle{long-short-sc-desc}\\
\acrstyle{long-sm-short-desc} & \abbrstyle{long-short-sm-desc}\\
\acrstyle{long-sp-short-desc} & \abbrstyle{long-short-desc} \newline with
\ttfamily\cs{renewcommand}\{\cs{glsxtrfullsep}\}[1]\{\cs{glsacspace}\{\#1\}\}\\
\acrstyle{short-long-desc} & \abbrstyle{short-long-desc}\\
\acrstyle{sc-short-long-desc} & \abbrstyle{short-sc-long-desc}\\
\acrstyle{sm-short-long-desc} & \abbrstyle{short-sm-long-desc}\\
\acrstyle{dua} & \abbrstyle{long-noshort}\\
\acrstyle{dua-desc} & \abbrstyle{long-noshort-desc}\\
\acrstyle{footnote} & \abbrstyle{short-footnote}\\
\acrstyle{footnote-sc} & \abbrstyle{short-sc-footnote}\\
\acrstyle{footnote-sm} & \abbrstyle{short-sm-footnote}\\
\acrstyle{footnote-desc} & \abbrstyle{short-footnote-desc}\\
\acrstyle{footnote-sc-desc} & \abbrstyle{short-sc-footnote-desc}\\
\acrstyle{footnote-sm-desc} & \abbrstyle{short-sm-footnote-desc}
\end{tabular}
\end{table}

The reason for introducing the new style of abbreviation commands
provided by \styfmt{glossaries-extra} is because the original
acronym commands provided by \styfmt{glossaries} are too restrictive
to work with the internal modifications made by
\styfmt{glossaries-extra}. However, if you really want to restore
the generic acronym function provided
by \styfmt{glossaries} you can use
\begin{definition}[\DescribeMacro\RestoreAcronyms]
\cs{RestoreAcronyms}
\end{definition}
(before any use of \cs{newacronym}).

\cs{RestoreAcronyms} should not be used in combination with the newer
\styfmt{glossaries-extra} abbreviations. Don't combine old and 
new style entries with the same \gloskey{type}. The
original \styfmt{glossaries} acronym mechanism doesn't work well
with the newer \styfmt{glossaries-extra} commands.

\begin{important}
If you use \cs{RestoreAcronyms}, don't use any of the commands
provided by \styfmt{glossaries-extra} intended for abbreviations
(such as \ics{glsxtrshort} or \ics{glsfmtshort}) with entries
defined via \ics{newacronym} as it will cause unexpected 
results.
\end{important}

In general, there's rarely any need for \cs{RestoreAcronyms}. If you
have a document that uses \ics{newacronymstyle}, then it's best to
either stick with just \styfmt{glossaries} for that document or
define an equivalent abbreviation style with
\ics{newabbreviationstyle}. (See \sectionref{sec:newabbrvstyle} for
further details.)

\begin{definition}[\DescribeMacro\glsacspace]
\cs{glsacspace}\marg{label}
\end{definition}
The space command \cs{glsacspace} used by the
\acrstyle{long-sp-short} acronym style provided by \styfmt{glossaries}
is modified so that it uses
\begin{definition}[\DescribeMacro\glsacspacemax]
\cs{glsacspacemax}
\end{definition}
instead of the hard-coded 3em. This is a command not a length
and so can be changed using \cs{renewcommand}.

Any of the new abbreviation styles that use \ics{glsxtrfullsep}
(such as \abbrstyle{long-short}) can easily be changed to use
\cs{glsacspace} with
\begin{verbatim}
\renewcommand*{\glsxtrfullsep}[1]{\glsacspace{#1}}
\end{verbatim}

The \gls{firstuse} acronym font command
\begin{definition}[\firstacronymfont]
\cs{firstacronymfont}\marg{text}
\end{definition}
is redefined to use the \gls{firstuse} abbreviation font command
\ics{glsfirstabbrvfont}. This will be reset if you use
\cs{RestoreAcronyms}.

The subsequent use acronym font command
\begin{definition}[\acronymfont]
\cs{acronymfont}\marg{text}
\end{definition}
is redefined to use the subsequent use abbreviation font command
\ics{glsabbrvfont}. This will be reset if you use
\cs{RestoreAcronyms}.

\section{Glossary Style Modifications}
\label{sec:glosstylemods}

The default value of \ics{glslistdottedwidth} is changed so that
it's set at the start of the document (if it hasn't been changed in
the preamble). This should take into account situations where
\cs{hsize} isn't set until the start of the document.

The \sty{glossaries} package tries to determine the group
title from its label by first checking if 
\cs{}\meta{label}\texttt{groupname} exists. If it doesn't exist,
then the title is assumed to be the same as the label.
For example, when typesetting the \qt{A} letter group,
\sty{glossaries} first checks if \cs{Agroupname} exists.
This could potentially cause conflict with another package
that may have some other meaning for \cs{Agroupname}, so
\sty{glossaries-extra} first checks for the existence
of the internal command \cs{glsxtr@grouptitle@}\meta{label}
which shouldn't clash with another package. You can set the
group title using
\begin{definition}[\DescribeMacro\glsxtrsetgrouptitle]
\cs{glsxtrsetgrouptitle}\marg{label}\marg{title}
\end{definition}
For example:
\begin{verbatim}
\glsxtrsetgrouptitle{A}{A (a)}
\end{verbatim}

\subsection{Style Hooks}
\label{sec:stylehooks}

The commands \ics{glossentryname} and \ics{glossentrydesc} are
modified to take into account the \catattr{glossname},
\catattr{glossdesc} and \catattr{glossdescfont} attributes (see \sectionref{sec:categories}).
This means you can make simple case-changing modifications to
the name and description without defining a new glossary style.

There is a hook after \ics{glossentryname} and 
\ics{Glossentryname}:
\begin{definition}[\DescribeMacro\glsxtrpostnamehook]
\cs{glsxtrpostnamehook}\marg{label}
\end{definition}
By default this checks the \catattr{indexname} attribute.
If the attribute exists for the category to which the label belongs,
then the name is automatically indexed using
\begin{definition}
\ics{glsxtrdoautoindexname}\marg{label}\texttt{\{indexname\}}
\end{definition}
See \sectionref{sec:autoindex} for further details.

\begin{sloppypar}
As from version 1.04, the post-name hook \cs{glsxtrpostnamehook}
will also use \cs{glsxtrpostname}\meta{category} if it exists.
You can use \ics{glscurrententrylabel} to obtain the entry label
with the definition of this command. For example, suppose you are
using a glossary style the doesn't display the symbol, you can
insert the symbol after the name for a particular category, say,
the \qt{symbol} category:
\end{sloppypar}
\begin{verbatim}
\newcommand*{\glsxtrpostnamesymbol}{\space
 (\glsentrysymbol{\glscurrententrylabel})}
\end{verbatim}

The post-description code used within the glossary is modified so
that it also does
\begin{definition}[\DescribeMacro\glsxtrpostdescription]
\cs{glsxtrpostdescription}
\end{definition}
This occurs before the original \cs{glspostdescription}, so if the
\pkgopt[false]{nopostdot} option is used, it will be inserted before
the terminating full stop.

This new command will do \cs{glsxtrpostdesc\meta{category}}
if it exists, where \meta{category} is the category label associated
with the current entry. For example \cs{glsxtrpostdescgeneral}
for entries with the category set to \category{general}
or \cs{glsxtrpostdescacronym} for entries with the category set to
\category{acronym}.

Since both \cs{glossentry} and \cs{subglossentry} set
\begin{definition}[\DescribeMacro\glscurrententrylabel]
\cs{glscurrententrylabel}
\end{definition}
to the label for the current entry, you can use this within the
definition of these post-description hooks if you need to reference
the label.

For example, suppose you want to insert the plural form in brackets
after the description in the glossary, but only for entries in the
\category{general} category, then you could do:
\begin{verbatim}
\renewcommand{\glsxtrpostdescgeneral}{\space
 (plural: \glsentryplural{\glscurrententrylabel})}
\end{verbatim}
This means you don't have to define a custom glossary style, which
you may find more complicated. (It also allows more flexibility if
you decide to change the underlying glossary style.)

\begin{important}
This feature can't be used for glossary styles that ignore
\cs{glspostdescription} or if you redefine
\cs{glspostdescription} without including \cs{glsxtrpostdescription}.
(For example, if you redefine \cs{glspostdescription} to do
nothing instead of using the \pkgopt{nopostdot} option to suppress
the terminating full stop.) See \sectionref{sec:stylemods} to patch
the predefined styles provided by \styfmt{glossaries} that are missing 
\cs{glspostdescription}.
\end{important}

\subsection{Number List}
\label{sec:glosstylenumlist}

The \gls{numberlist} is now placed inside the argument of
\begin{definition}[\DescribeMacro\GlsXtrFormatLocationList]
\cs{GlsXtrFormatLocationList}\marg{number list}
\end{definition}
This is internally used by \cs{glossaryentrynumbers}. The
\pkgopt{nonumberlist} option redefines \cs{glossaryentrynumbers} so that it
doesn't display the \gls{numberlist}, but it still saves the
\gls{numberlist} in case it's required.

\begin{important}
If you want to suppress the \gls{numberlist} always use the
\pkgopt{nonumberlist} option instead of redefining
\cs{glossaryentrynumbers} to do nothing.
\end{important}

If you want to, for example, change the font for the entire
\gls{numberlist} then redefine \cs{GlsXtrFormatLocationList} as
appropriate. Don't modify \cs{glossaryentrynumbers}.

Sometimes users like to insert \qt{page} or \qt{pages} in front of
the \gls{numberlist}. This is quite fiddly to do with the base
\styfmt{glossaries} package, but \styfmt{glossaries-extra}
provides a way of doing this. First you need to enable this
option and specify the text to display using:
\begin{definition}[\DescribeMacro\GlsXtrEnablePreLocationTag]
\cs{GlsXtrEnablePreLocationTag}\marg{page}\marg{pages}
\end{definition}
where \meta{page} is the text to display if the \gls{numberlist} only
contains a single location and \meta{pages} is the text to display
otherwise. For example:
\begin{verbatim}
\GlsXtrEnablePreLocationTag{Page: }{Pages: }
\end{verbatim}
An extra run is required when using this command.

\begin{important}
Use \texttt{glsignore} not \texttt{@gobble} as the format if you
want to suppress the page number (and only index the entry once).
\end{important}

See the accompanying sample file \texttt{sample-pages.tex}.

Note that \gls{bib2gls} can be instructed to insert
a prefix at the start of non-empty location lists, which
can be used as an alternative to \cs{GlsXtrEnablePreLocationTag}.

\subsection{The \styfmt{glossaries-extra-stylemods} Package}
\label{sec:stylemods}

As from v1.02, \styfmt{glossaries-extra} now includes the package
\sty{glossaries-extra-stylemods} that will redefine the predefined
styles to include the post-description hook (for those that are
missing it).  You will need to make sure the styles have already
been defined before loading \styfmt{glossaries-extra}. For example:
\begin{verbatim}
\usepackage{glossaries-extra}
\usepackage{glossary-longragged}
\usepackage{glossaries-extra-stylemods}
\end{verbatim}
Alternatively you can load
\texttt{glossary-}\meta{name}\texttt{.sty} at the same time by
passing \meta{name} as a package option to
\sty{glossaries-extra-stylemods}. For example:
\begin{verbatim}
\usepackage{glossaries-extra}
\usepackage[longragged]{glossaries-extra-stylemods}
\end{verbatim}
Another option is to use the \pkgopt{stylemods} key when you
load \styfmt{glossaries-extra}. You can omit a value if you only want to use
the predefined styles that are automatically loaded by
\styfmt{glossaries} (for example, the \glostyle{long3col} style):
\begin{verbatim}
\usepackage[style=long3col,stylemods]{glossaries-extra}
\end{verbatim}
Or the value of \pkgopt{stylemods} may be a comma-separated list
of the style package identifiers. For example:
\begin{verbatim}
\usepackage[style=mcoltree,stylemods=mcols]{glossaries-extra}
\end{verbatim}
Remember to group the value if it contains any commas:
\begin{verbatim}
\usepackage[stylemods={mcols,longbooktabs}]{glossaries-extra}
\end{verbatim}

Note that the \glostyle{inline} style is dealt with slightly
differently. The original definition provided by the
\sty{glossary-inline} package uses \cs{glspostdescription} at the
end of the glossary (not after each entry description) within the
definition of \cs{glspostinline}. The style modification changes
this so that \cs{glspostinline} just does a full stop followed by
space factor adjustment, and the description
\cs{glsinlinedescformat} and sub-entry description formats
\cs{glsinlinesubdescformat} are redefined to include
\cs{glsxtrpostdescription} (not \cs{glspostdescription}). This means
that the modified \glostyle{inline} style isn't affected by the
\pkgopt{nopostdot} option, but the post-description category hook
can still be used.

As from version 1.05, the \styfmt{glossaries-extra-stylemods}
package provides some additional commands for use with the
\glostyle{alttree} style to make it easier to modify.
These commands are only defined if the
\sty{glossary-tree} package has already been loaded, which is
typically the case unless the \pkgopt{notree} option has been used
when loading \styfmt{glossaries}.

\begin{definition}[\DescribeMacro\eglssetwidest]
\cs{eglssetwidest}\oarg{level}\marg{name}
\end{definition}
This is like \cs{glssetwidest} (provided by \sty{glossary-tree})
but performs a protected expansion on \meta{name}. This has
a localised effect. For a global setting, use
\begin{definition}[\DescribeMacro\xglssetwidest]
\cs{xglssetwidest}\oarg{level}\marg{name}
\end{definition}
The widest entry value can later be retrieved using
\begin{definition}[\DescribeMacro\glsgetwidestname]
\cs{glsgetwidestname}
\end{definition}
for the top-level entries and
\begin{definition}[\DescribeMacro\glsgetwidestsubname]
\cs{glsgetwidestsubname}\marg{level}
\end{definition}
for sub-entries, where \meta{level} is the level number.

The command \cs{glsfindwidesttoplevelname} provided by
\sty{glossary-tree} has a CamelCase synonym:
\begin{definition}[\DescribeMacro\glsFindWidestTopLevelName]
\cs{glsFindWidestTopLevelName}\oarg{glossary list}
\end{definition}
Similar commands are also provided:
\begin{definition}[\DescribeMacro\glsFindWidestUsedTopLevelName]
\cs{glsFindWidestUsedTopLevelName}\oarg{glossary list}
\end{definition}
This has an additional check that the entry has been used.
Naturally this is only useful if the glossaries that use
the \glostyle{alttree} style occur at the end of the document.
This command should be placed just before the start of the glossary.
(Alternatively, place it at the end of the document and save
the value in the auxiliary file for the next run.)

\begin{definition}[\DescribeMacro\glsFindWidestUsedAnyName]
\cs{glsFindWidestUsedAnyName}\oarg{glossary list}
\end{definition}
This is like the previous command but if doesn't check the
\gloskey{parent} key. This is useful if all levels should have the
same width for the name.

\begin{definition}[\DescribeMacro\glsFindWidestAnyName]
\cs{glsFindWidestAnyName}\oarg{glossary list}
\end{definition}
This is like the previous command but doesn't check if the entry
has been used.

\begin{definition}[\DescribeMacro\glsFindWidestUsedLevelTwo]
\cs{glsFindWidestUsedLevelTwo}\oarg{glossary list}
\end{definition}
This is like \cs{glsFindWidestUsedTopLevelName} but also sets
the first two sub-levels as well. Any entry that has a
great-grandparent is ignored.

\begin{definition}[\DescribeMacro\glsFindWidestLevelTwo]
\cs{glsFindWidestLevelTwo}\oarg{glossary list}
\end{definition}
This is like the previous command but doesn't check if the entry has
been used.

\begin{definition}[\DescribeMacro\glsFindWidestUsedAnyNameSymbol]
\cs{glsFindWidestUsedAnyNameSymbol}\oarg{glossary
list}\marg{register}
\end{definition}
This is like \cs{glsFindWidestUsedAnyName} but also measures the
symbol. The length of the widest symbol is stored in
\meta{register}.

\begin{definition}[\DescribeMacro\glsFindWidestAnyNameSymbol]
\cs{glsFindWidestAnyNameSymbol}\oarg{glossary list}\marg{register}
\end{definition}
This is like the previous command but it doesn't check if the entry
has been used.

\begin{definition}[\DescribeMacro\glsFindWidestUsedAnyNameSymbolLocation]
\cs{glsFindWidestUsedAnyNameSymbolLocation}\oarg{glossary
list}\marg{symbol register}\marg{location register}
\end{definition}
This is like \cs{glsFindWidestUsedAnyNameSymbol} but also
measures the \gls{numberlist}. This requires
\ics{glsentrynumberlist} (see the \styfmt{glossaries} user manual).
The length of the widest symbol is stored in \meta{symbol register}
and the length of the widest \gls*{numberlist} is stored in
\meta{location register}.

\begin{definition}[\DescribeMacro\glsFindWidestAnyNameSymbolLocation]
\cs{glsFindWidestAnyNameSymbolLocation}\oarg{glossary
list}\marg{symbol register}\marg{location register}
\end{definition}
This is like the previous command but it doesn't check if the entry
has been used.

\begin{definition}[\DescribeMacro\glsFindWidestUsedAnyNameLocation]
\cs{glsFindWidestUsedAnyNameLocation}\oarg{glossary
list}\marg{register}
\end{definition}
This is like \cs{glsFindWidestUsedAnyNameSymbolLocation} but doesn't
measure the symbol. The length of the widest \gls{numberlist}
is stored in \meta{register}.

\begin{definition}[\DescribeMacro\glsFindWidestAnyNameLocation]
\cs{glsFindWidestAnyNameLocation}\oarg{glossary
list}\marg{register}
\end{definition}
This is like the previous command but doesn't check if the entry has
been used.

The layout of the symbol, description and \gls{numberlist}
is governed by
\begin{definition}[\DescribeMacro\glsxtralttreeSymbolDescLocation]
\cs{glsxtralttreeSymbolDescLocation}\marg{label}\marg{number list}
\end{definition}
for top-level entries and
\begin{definition}[\DescribeMacro\glsxtralttreeSubSymbolDescLocation]
\cs{glsxtralttreeSubSymbolDescLocation}\marg{label}\marg{number list}
\end{definition}
for sub-entries.

There is now a user level command that performs the initialisation
for the \glostyle{alttree} style:
\begin{definition}[\DescribeMacro\glsxtralttreeInit]
\cs{glsxtralttreeInit}
\end{definition}

The paragraph indent for subsequent paragraphs in multi-paragraph
descriptions is provided by the length
\begin{definition}[\DescribeMacro\glsxtrAltTreeIndent]
\cs{glsxtrAltTreeIndent}
\end{definition}

For additional commands that are available with the 
\glostyle{alttree} style, see the documented code
(\texttt{glossaries-extra-code.pdf}). For examples, see
the accompanying sample files \texttt{sample-alttree.tex},
\texttt{sample-alttree-sym.tex} and
\texttt{sample-alttree-marginpar.tex}.

\chapter{Abbreviations}
\label{sec:abbreviations}

Abbreviations include acronyms (words formed from initial letters,
such as \qt{laser}),
initialisms (initial letters of a phrase, such as \qt{html}, that
aren't pronounced as words) and contractions (where
parts of words are omitted, often replaced by an apostrophe, such as
\qt{don't}).
The \qt{acronym} code provided by the \styfmt{glossaries} package is
misnamed as it's more often than not used for initialisms instead.
Acronyms tend not to be \emph{expanded} on \gls{firstuse} (although they may
need to be \emph{described} for readers unfamiliar with the term). They are therefore more like a regular term,
which may or may not require a description in the glossary.

The \styfmt{glossaries-extra} package corrects this misnomer, and
provides better abbreviation handling, with
\begin{definition}[\DescribeMacro\newabbreviation]
\cs{newabbreviation}\oarg{options}\marg{label}\marg{short}\marg{long}
\end{definition}

This sets the \gloskey{category} key to \texttt{abbreviation} by
default, but that value may be overridden in \meta{options}.
The category may have attributes that modify the way abbreviations
are defined. For example, the \catattr{insertdots} attribute will
automatically insert full stops (periods) into \meta{short} or the
\catattr{noshortplural} attribute will set the default value
of the \gloskey{shortplural} key to just \meta{short} (without
appending the plural suffix). See \sectionref{sec:categories} for
further details.

See \sectionref{sec:nested} regarding the pitfalls of using
commands like \ics{gls} or \ics{glsxtrshort} within
\meta{short} or \meta{long}.

\begin{important}
Make sure that you set the category attributes before defining new
abbreviations or they may not be correctly applied.
\end{important}

The \ics{newacronym} command provided by the \styfmt{glossaries}
package is redefined by \styfmt{glossaries-extra} to use
\cs{newabbreviation} with the \gloskey{category} set to
\texttt{acronym} (see also \sectionref{sec:acronymmods}) so
\begin{definition}[\DescribeMacro\newacronym]
\cs{newacronym}\oarg{options}\marg{label}\marg{short}\marg{long}
\end{definition}
is now equivalent to
\begin{display}\raggedright\ttfamily
\cs{newabbreviation}[type=\cs{acronymtype},category=acronym,\meta{options}]\marg{label}\marg{short}\marg{long}
\end{display}

\begin{sloppypar}
The \cs{newabbreviation} command is superficially similar to the
\styfmt{glossaries} package's \cs{newacronym} but you can apply
different styles to different categories. The default style is
\abbrstyle{short-nolong} for entries in the \category{acronym} category and 
\abbrstyle{short-long} for entries in the \category{abbreviation}
category. (These aren't the same as the acronym styles provided by
the \styfmt{glossaries} package, although they may produce similar
results.)
\end{sloppypar}

The short form is displayed within commands like \cs{gls} using
\begin{definition}[\DescribeMacro\glsfirstabbrvfont]
\cs{glsfirstabbrvfont}\marg{short-form}
\end{definition}
on \gls{firstuse} and
\begin{definition}[\DescribeMacro\glsabbrvfont]
\cs{glsabbrvfont}\marg{short-form}
\end{definition}
for subsequent use.

\begin{important}
These commands (\cs{glsfirstabbrvfont} and \cs{glsabbrvfont}) are
reset by the abbreviation styles and whenever an abbreviation is
used by commands like \cs{gls} (but not by commands like
\ics{glsentryshort}) so don't try redefining them outside of an
abbreviation style.
\end{important}

If you use the \abbrstyle{long-short} style,
\cs{glsabbrvfont} is redefine to use
\begin{definition}[\DescribeMacro\glsabbrvdefaultfont]
\cs{glsabbrvdefaultfont}\marg{text}
\end{definition}
whereas the \abbrstyle{long-short-sc} style redefines
\cs{glsabbrvfont} to use \cs{glsxtrscfont}. If you want to use a different
font-changing command you can either redefine \cs{glsabbrvdefaultfont} and
use one of the base styles, such as \abbrstyle{long-short}, or
define a new style in a similar manner to the \qt{sc}, \qt{sm}
or \qt{em} styles.

Similarly the basic styles redefine \cs{glsfirstabbrvfont}
to use
\begin{definition}[\DescribeMacro\glsfirstabbrvdefaultfont]
\cs{glsfirstabbrvdefaultfont}\marg{short-form}
\end{definition}
whereas the font modifier styles, such as \abbrstyle{long-short-sc},
use their own custom command, such as \cs{glsfirstscfont}.


The commands that display the full form for abbreviations use 
\cs{glsfirstabbrvfont} to display the short form and
\begin{definition}[\DescribeMacro\glsfirstlongfont]
\cs{glsfirstlongfont}\marg{long-form}
\end{definition}
to display the long form on \gls{firstuse} or for the inline full
format. Commands like \cs{glsxtrlong} use 
\begin{definition}[\DescribeMacro\glslongfont]
\cs{glslongfont}\marg{long-form}
\end{definition}
instead.

As with \ics{glsabbrvfont}, this command
is changed by all styles. Currently all predefined abbreviation
styles, except the \qt{long-em} (emphasize long form) versions, provided by 
\styfmt{glossaries-extra} redefine
\cs{glsfirstlongfont} to use
\begin{definition}[\DescribeMacro\glsfirstlongdefaultfont]
\cs{glsfirstlongdefaultfont}\marg{long-form}
\end{definition}
and \cs{glslongfont} to use
\begin{definition}[\DescribeMacro\glslongdefaultfont]
\cs{glslongdefaultfont}\marg{long-form}
\end{definition}

You can redefine these command if you want to change the font used by
the long form for all your abbreviations (except for the
emphasize-long styles), or you can
define your own abbreviation style that provides a different format
for only those abbreviations defined with that style.

The \qt{long-em} (emphasize long) styles use
\begin{definition}[\DescribeMacro\glsfirstlongemfont]
\cs{glsfirstlongemfont}\marg{long-form}
\end{definition}
instead of \cs{glsfirstlongdefaultfont}\marg{long-form} and
\begin{definition}[\DescribeMacro\glslongemfont]
\cs{glslongemfont}\marg{long-form}
\end{definition}
instead of \cs{glslongdefaultfont}\marg{long-form}. The first form
\cs{glsfirstlongemfont} is initialised to use \cs{glslongemfont}.

Note that by default inserted material (provided in the final
optional argument of commands like \cs{gls}), is placed outside the
font command in the predefined styles. To move it inside, use:
\begin{definition}[\DescribeMacro\glsxtrinsertinsidetrue]
\cs{glsxtrinsertinsidetrue}
\end{definition}
This applies to all the predefined styles. For example:
\begin{verbatim}
\setabbreviationstyle{long-short}
\renewcommand*{\glsfirstlongdefaultfont}[1]{\emph{#1}}
\glsxtrinsertinsidetrue
\end{verbatim}
This will make the long form and the inserted text emphasized,
whereas the default (without \cs{glsxtrinsertinsidetrue}) would 
place the inserted text outside of the emphasized font.

Note that for some styles, such as the \abbrstyle{short-long}, the
inserted text would be placed inside the font command for the short
form (rather than the long form in the above example).

There are two types of full forms. The display full form, which is
used on \gls{firstuse} by commands like \ics{gls} and the inline full
form, which is used by commands like \ics{glsxtrfull}.
For some of the abbreviation styles, such as \abbrstyle{long-short}, the display and inline forms
are the same. In the case of styles such as \abbrstyle{short-nolong} or
\abbrstyle{short-footnote}, the display and inline full forms are different.

These formatting commands aren't stored in the \gloskey{short},
\gloskey{shortplural}, \gloskey{long} or \gloskey{longplural}
fields, which means they won't be used within commands like 
\cs{glsentryshort} (but they are used within commands like
\cs{glsxtrshort} and \cs{glsfmtshort}).
Note that \ics{glsxtrlong} and the case-changing variants don't use
\cs{glsfirstlongfont}.

\section{Tagging Initials}
\label{sec:tagging}

If you would like to tag the initial letters in the long form
such that those letters are underlined in the glossary but
not in the main part of the document, you can use
\begin{definition}[\DescribeMacro\GlsXtrEnableInitialTagging]
\cs{GlsXtrEnableInitialTagging}\marg{categories}\marg{cs}
\end{definition}
before you define your abbreviations.

This command (robustly) defines \meta{cs} (a control sequence) 
to accept a single argument, which is the letter (or letters)
that needs to be tagged. The normal behaviour of this command
within the document is to simply do its argument, but in the
glossary it's activated for those categories that have
the \catattr{tagging} attribute set to \qt{true}. For those
cases it will use
\begin{definition}[\DescribeMacro\glsxtrtagfont]
\cs{glsxtrtagfont}\marg{text}
\end{definition}
This command defaults to \ics{underline}\marg{text}
but may be redefined as required.

The control sequence \meta{cs} can't already be defined when
used with the unstarred version of 
\cs{GlsXtrEnableInitialTagging} for safety reasons.
The starred version will overwrite any previous definition
of \meta{cs}. As with redefining any commands, ensure that
you don't redefine something important. In fact, just forget
the existence of the starred version and let's pretend I didn't
mention it.

The first argument of \cs{GlsXtrEnableInitialTagging} is a
comma-separated list of category names. The \catattr{tagging}
attribute will automatically be set for those categories.
You can later set this attribute for other categories (see
\sectionref{sec:categories}) but this must be done before the
glossary is displayed.

The accompanying sample file \texttt{sample-mixtures.tex}
uses initial tagging for both the \category{acronym} and
\category{abbreviation} categories:
\begin{verbatim}
\GlsXtrEnableInitialTagging{acronym,abbreviation}{\itag}
\end{verbatim}
This defines the command \cs{itag} which can be used in the
definitions. For example:
\begin{verbatim}
\newacronym
 [description={a system for detecting the location and
 speed of ships, aircraft, etc, through the use of radio
 waves}% description of this term
 ]
 {radar}% identifying label
 {radar}% short form (i.e. the word)
 {\itag{ra}dio \itag{d}etection \itag{a}nd \itag{r}anging}

\newabbreviation{xml}{XML}
 {e\itag{x}tensible \itag{m}arkup \itag{l}anguage}
\end{verbatim}
The underlining of the tagged letters only occurs in the
glossary and then only for entries with the \catattr{tagging}
attribute set.

\section{Abbreviation Styles}
\label{sec:abbrstyle}

The abbreviation style must be set before abbreviations are defined
using:
\begin{definition}[\DescribeMacro\setabbreviationstyle]
\cs{setabbreviationstyle}\oarg{category}\marg{style-name}
\end{definition}
where \meta{style-name} is the name of the style and \meta{category}
is the category label (\texttt{abbreviation} by default). New
abbreviations will pick up the current style according to their
given category. If there is no style set for the category, the
fallback is the style for the \texttt{abbreviation} category.
Some styles may automatically modify one or more of the attributes
associated with the given category. For example, the
\abbrstyle{long-noshort} and \abbrstyle{short-nolong} styles set the
\catattr{regular} attribute to \texttt{true}.

\begin{important}
If you want to apply different styles to groups of abbreviations,
assign a different category to each group and set the style for the
given category.
\end{important}

Note that \ics{setacronymstyle} is disabled by
\styfmt{glossaries-extra}. Use
\begin{alltt}
\cs{setabbreviationstyle}[acronym]\marg{style-name}
\end{alltt}
instead. The original acronym interface can be restored with
\ics{RestoreAcronyms} (see \sectionref{sec:acronymmods}). However the
original acronym interface is incompatible with all the commands
described here.

Abbreviations can be used with the standard \styfmt{glossaries}
commands, such as \ics{gls}, but don't use the acronym commands
like \ics{acrshort} (which use \ics{acronymfont}). The short form can be
produced with:
\begin{definition}[\DescribeMacro\glsxtrshort]
\cs{glsxtrshort}\oarg{options}\marg{label}\oarg{insert}
\end{definition}
(Use this instead of \ics{acrshort}.)

The long form can be produced with
\begin{definition}[\DescribeMacro\glsxtrlong]
\cs{glsxtrlong}\oarg{options}\marg{label}\oarg{insert}
\end{definition}
(Use this instead of \ics{acrlong}.)

The \emph{inline} full form can be produced with
\begin{definition}[\DescribeMacro\glsxtrfull]
\cs{glsxtrfull}\oarg{options}\marg{label}\oarg{insert}
\end{definition}
(This this instead of \ics{acrfull}.)

As mentioned earlier, the inline full form may not necessarily match the format used on
\gls{firstuse} with \cs{gls}. For example, the
\abbrstyle{short-nolong} style
only displays the short form on \gls{firstuse}, but the full
form will display the long form followed by the short form in
parentheses.

\begin{important}
If you want to use an abbreviation in a chapter or section
title, use the commands described in \sectionref{sec:headtitle}
instead.
\end{important}

The arguments \meta{options}, \meta{label} and \meta{insert} are the
same as for commands such as \cs{glstext}. There are also analogous
case-changing commands:

First letter upper case short form:
\begin{definition}[\DescribeMacro\Glsxtrshort]
\cs{Glsxtrshort}\oarg{options}\marg{label}\oarg{insert}
\end{definition}

First letter upper case long form:
\begin{definition}[\DescribeMacro\Glsxtrlong]
\cs{Glsxtrlong}\oarg{options}\marg{label}\oarg{insert}
\end{definition}

First letter upper case inline full form:
\begin{definition}[\DescribeMacro\Glsxtrfull]
\cs{Glsxtrfull}\oarg{options}\marg{label}\oarg{insert}
\end{definition}

All upper case short form:
\begin{definition}[\DescribeMacro\Glsxtrshort]
\cs{GLSxtrshort}\oarg{options}\marg{label}\oarg{insert}
\end{definition}

All upper case long form:
\begin{definition}[\DescribeMacro\Glsxtrlong]
\cs{GLSxtrlong}\oarg{options}\marg{label}\oarg{insert}
\end{definition}

All upper case inline full form:
\begin{definition}[\DescribeMacro\GLSxtrfull]
\cs{GLSxtrfull}\oarg{options}\marg{label}\oarg{insert}
\end{definition}

Plural forms are also available.

Short form plurals:
\begin{definition}[\DescribeMacro\glsxtrshortpl]
\cs{glsxtrshortpl}\oarg{options}\marg{label}\oarg{insert}
\end{definition}
\begin{definition}[\DescribeMacro\Glsxtrshortpl]
\cs{Glsxtrshortpl}\oarg{options}\marg{label}\oarg{insert}
\end{definition}
\begin{definition}[\DescribeMacro\GLSxtrshortpl]
\cs{GLSxtrshortpl}\oarg{options}\marg{label}\oarg{insert}
\end{definition}

Long form plurals:
\begin{definition}[\DescribeMacro\glsxtrlongpl]
\cs{glsxtrlongpl}\oarg{options}\marg{label}\oarg{insert}
\end{definition}
\begin{definition}[\DescribeMacro\Glsxtrlongpl]
\cs{Glsxtrlongpl}\oarg{options}\marg{label}\oarg{insert}
\end{definition}
\begin{definition}[\DescribeMacro\GLSxtrlongpl]
\cs{GLSxtrlongpl}\oarg{options}\marg{label}\oarg{insert}
\end{definition}

Full form plurals:
\begin{definition}[\DescribeMacro\glsxtrfullpl]
\cs{glsxtrfullpl}\oarg{options}\marg{label}\oarg{insert}
\end{definition}
\begin{definition}[\DescribeMacro\Glsxtrfullpl]
\cs{Glsxtrfullpl}\oarg{options}\marg{label}\oarg{insert}
\end{definition}
\begin{definition}[\DescribeMacro\GLSxtrfullpl]
\cs{GLSxtrfullpl}\oarg{options}\marg{label}\oarg{insert}
\end{definition}

\begin{important}
Be careful about using \cs{glsentryfull}, \cs{Glsentryfull},
\cs{glsentryfullpl} and \cs{Glsentryfullpl}. These commands will use
the currently applied style rather than the style in use when the
entry was defined. If you have mixed styles, you'll need to use
\ics{glsxtrfull} instead. Similarly for \cs{glsentryshort} etc.
\end{important}

\section{Shortcut Commands}
\label{sec:abbrshortcuts}

The abbreviation shortcut commands can be enabled using
the package option \pkgopt[abbreviation]{shortcuts} 
(or \pkgopt[abbr]{shortcuts}). This defines the commands listed in
\tableref{tab:abbrshortcuts}.

\begin{table}[htbp]
\caption{Abbreviation Shortcut Commands}
\label{tab:abbrshortcuts}
\centering
\begin{tabular}{ll}
\bfseries Shortcut & \bfseries Equivalent Command\\
\ics{ab} & \ics{cgls}\\
\ics{abp} & \ics{cglspl}\\
\ics{as} & \ics{glsxtrshort}\\
\ics{asp} & \ics{glsxtrshortpl}\\
\ics{al} & \ics{glsxtrlong}\\
\ics{alp} & \ics{glsxtrlongpl}\\
\ics{af} & \ics{glsxtrfull}\\
\ics{afp} & \ics{glsxtrfullpl}\\
\ics{As} & \ics{Glsxtrshort}\\
\ics{Asp} & \ics{Glsxtrshortpl}\\
\ics{Al} & \ics{Glsxtrlong}\\
\ics{Alp} & \ics{Glsxtrlongpl}\\
\ics{Af} & \ics{Glsxtrfull}\\
\ics{Afp} & \ics{Glsxtrfullpl}\\
\ics{AS} & \ics{GLSxtrshort}\\
\ics{ASP} & \ics{GLSxtrshortpl}\\
\ics{AL} & \ics{GLSxtrlong}\\
\ics{ALP} & \ics{GLSxtrlongpl}\\
\ics{AF} & \ics{GLSxtrfull}\\
\ics{AFP} & \ics{GLSxtrfullpl}\\
\ics{newabbr} & \ics{newabbreviation}
\end{tabular}
\end{table}

\section{Predefined Abbreviation Styles}
\label{sec:predefabbrvstyles}

There are two types of abbreviation styles: those that treat the
abbreviation as a regular entry (so that \ics{gls} uses
\ics{glsgenentryfmt}) and those that don't treat the abbreviation as
a regular entry (so that \ics{gls} uses \ics{glsxtrgenabbrvfmt}).

The regular entry abbreviation styles set the \catattr{regular}
attribute to \qt{true} for the category assigned to each 
abbreviation with that style. This means that on \gls{firstuse},
\ics{gls} uses the value of the \gloskey{first} field and on
subsequent use \ics{gls} uses the value of the \gloskey{text} field
(and analogously for the plural and case-changing versions). The
\gloskey{short} and \gloskey{long} fields are set as appropriate
and may be accessed through commands like \ics{glsxtrshort}. 

The other abbreviation styles don't modify the \catattr{regular}
attribute. The \gloskey{first} and \gloskey{text} fields (and their
plural forms) are set and can be accessed through commands like 
\cs{glsfirst}, but they aren't used by commands like \ics{gls},
which instead use the short form (stored in the \gloskey{short} key)
and the display full format (through commands like
\ics{glsxtrfullformat} that are defined by the style).

In both cases, the \gls{firstuse} of \ics{gls} may not match the
text produced by \ics{glsfirst} (and likewise for the plural
and case-changing versions).

\begin{important}
For the \qt{sc} styles that use \ics{textsc}, be careful about your choice
of fonts as some only have limited support. For
example, you may not be able to combine bold and small-caps. I
recommend that you at least use the \sty{fontenc} package with the
\pkgoptfmt{T1} option or something similar.
\end{important}

The \qt{sc} styles all use
\begin{definition}[\DescribeMacro\glsxtrscfont]
\cs{glsxtrscfont}\marg{text}
\end{definition}
which is defined as
\begin{verbatim}
\newcommand*{\glsxtrscfont}[1]{\textsc{#1}}
\end{verbatim}
and
\begin{definition}[\DescribeMacro\glsxtrfirstscfont]
\cs{glsxtrfirstscfont}\marg{text}
\end{definition}
which is defined as
\begin{verbatim}
\newcommand*{\glsxtrfirstscfont}[1]{\glsxtrscfont{#1}}
\end{verbatim}
The default plural suffix for the short form is set to
\begin{definition}[\DescribeMacro\glsxtrscsuffix]
\cs{glsxtrscsuffix}
\end{definition}
This just defined as
\begin{verbatim}
\newcommand*{\glsxtrscsuffix}{\glstextup{\glspluralsuffix}}
\end{verbatim}
The \ics{glstextup} command is provided by \styfmt{glossaries}
and is used to switch off the small caps font for the suffix.
If you override the default short plural using the
\gloskey{shortplural} key when you define the abbreviation
you will need to make the appropriate adjustment if necessary.
(Remember that the default plural suffix behaviour can be modified
through the use of the \catattr{aposplural} and
\catattr{noshortplural} attributes. See 
\sectionref{sec:categories} for further details.)

Remember that \cs{textsc} renders \emph{lowercase} letters as small
capitals. Uppercase letters are rendered as normal uppercase
letters, so if you specify the short form in uppercase, you won't
get small capitals unless you redefine \cs{glsxtrscfont} to
convert its argument to lowercase. For example:
\begin{verbatim}
\renewcommand*{\glsxtrscfont}[1]{\textsc{\MakeLowercase{#1}}}
\end{verbatim}

The \qt{sm} styles all use
\begin{definition}[\DescribeMacro\glsxtrsmfont]
\cs{glsxtrsmfont}\marg{text}
\end{definition}
This is defined as:
\begin{verbatim}
\newcommand*{\glsxtrsmfont}[1]{\textsmaller{#1}}
\end{verbatim}
and
\begin{definition}[\DescribeMacro\glsxtrfirstsmfont]
\cs{glsxtrfirstsmfont}\marg{text}
\end{definition}
which is defined as
\begin{verbatim}
\newcommand*{\glsxtrfirstsmfont}[1]{\glsxtrsmfont{#1}}
\end{verbatim}
If you want to use this style, you must explicitly load the \sty{relsize}
package which defines the \ics{textsmaller} command. If you want to
easily switch between the \qt{sc} and \qt{sm} styles, you may find
it easier to redefine this command to convert to upper case:
\begin{verbatim}
\renewcommand*{\glsxtrsmfont}[1]{\textsmaller{\MakeTextUppercase{#1}}}
\end{verbatim}
The default plural suffix for the short form is set to
\begin{definition}[\DescribeMacro\glsxtrsmsuffix]
\cs{glsxtrsmsuffix}
\end{definition}
This just does \ics{glspluralsuffix}.

The \qt{em} styles all use
\begin{definition}[\DescribeMacro\glsabbrvemfont]
\cs{glsabbrvemfont}\marg{text}
\end{definition}
which is defined as:
\begin{verbatim}
\newcommand*{\glsabbrvemfont}[1]{\emph{#1}}
\end{verbatim}
and
\begin{definition}[\DescribeMacro\glsfirstabbrvemfont]
\cs{glsfirstabbrvemfont}\marg{text}
\end{definition}
which is defined as:
\begin{verbatim}
\newcommand*{\glsfirstabbrvemfont}[1]{\glsabbrvemfont{#1}}
\end{verbatim}

Some of the styles use
\begin{definition}[\DescribeMacro\glsxtrfullsep]
\cs{glsxtrfullsep}\marg{label}
\end{definition}
as a separator between the long and short forms. This is defined as
a space by default, but may be changed as required. For example:
\begin{verbatim}
\renewcommand*{\glsxtrfullsep}[1]{~}
\end{verbatim}
or
\begin{verbatim}
\renewcommand*{\glsxtrfullsep}[1]{\glsacspace{#1}}
\end{verbatim}

The new naming scheme for abbreviation styles is as follows:
\begin{itemize}
\item
\meta{field1}[\texttt{-}\meta{modifier1}]\texttt{-}\meta{field2}[\texttt{-}\meta{modifier2}][\texttt{-user}]

This is for the parenthetical styles. The \texttt{-}\meta{modifier} parts may
be omitted. These styles display \meta{field1} followed by
\meta{field2} in parentheses. If \meta{field2} starts with \qt{no}
then the parenthetical element is omitted from the display style but
is included in the inline style.

If the \texttt{-}\meta{modifier} part is present, then the field has
a font changing command applied to it.

If the \texttt{-user} part is present, then the \gloskey{user1}
value, if provided, is inserted into the parenthetical material .
(The field used for the inserted material may be changed.)

Examples:
 \begin{itemize}
  \item\abbrstyle{long-noshort-sc}: \meta{field1} is the long
form, the short form is set in smallcaps but omitted in the display
style.
  \item\abbrstyle{long-em-short-em}: both the long form and the
short form are emphasized. The short form is in parentheses.
  \item\abbrstyle{long-short-em}: the
short form is emphasized but not the long form. The short form is in parentheses.
  \item\abbrstyle{long-short-user}: if the \gloskey{user1} key has
been set, this produces the style \meta{long} (\meta{short},
\meta{user1}) otherwise it just produces \meta{long} (\meta{short}).
 \end{itemize}

\item
\meta{field1}[\texttt{-}\meta{modifier1}]\texttt{-}[\texttt{post}]\texttt{footnote}

The display style uses \meta{field1} followed by a footnote with the
other field in it. If \texttt{post} is present then the footnote is
placed after the \gls{linktext} using the post-link hook.
The inline style does \meta{field1} followed by the other field in
parentheses.

If \texttt{-}\meta{modifier1} is present, \meta{field1} has a
font-changing command applied to it.

Examples:
\begin{itemize}
\item \abbrstyle{short-footnote}: short form in the text with the
long form in the footnote.
\item \abbrstyle{short-sc-postfootnote}: short form in smallcaps
with the long form in the footnote outside of the \gls{linktext}.
\end{itemize}

\begin{important}
Take care with the footnote styles. Remember that there are some
situations where \ics{footnote} doesn't work.
\end{important}

\item \meta{style}\texttt{-desc}

Like \meta{style} but the \gloskey{description} key must be provided
when defining abbreviations with this style.

Examples:
\begin{itemize}

\item \abbrstyle{short-long-desc}: like \abbrstyle{short-long} but
requires a description.
\item \abbrstyle{short-em-footnote-desc}: like
\abbrstyle{short-em-footnote} but requires a description.
\end{itemize}
\end{itemize}

Not all combinations that fit the above syntax are provided.
Pre-version 1.04 styles that didn't fit this naming scheme are either
provided with a synonym (where the former name wasn't ambiguous) or
provided with a deprecated synonym (where the former name was
confusing).
The deprecated style names generate a warning using:
\begin{definition}[\DescribeMacro\GlsXtrWarnDeprecatedAbbrStyle]
\cs{GlsXtrWarnDeprecatedAbbrStyle}\marg{old-name}\marg{new-name}
\end{definition}
where \meta{old-name} is the deprecated name and \meta{new-name} is
the preferred name. You can suppress these warnings by redefining
this command to do nothing.

\subsection{Predefined Abbreviation Styles that Set the Regular
Attribute}
\label{sec:predefregabbrvstyles}

The following abbreviation styles set the \catattr{regular}
attribute to \qt{true} for all categories that have abbreviations
defined with any of these styles.

\begin{description}
\item[\abbrstyle{short-nolong}]
This only displays the short form on \gls{firstuse}. The \gloskey{name}
is set to the short form. The \gloskey{description} is set to the
long form. The inline full form displays
\meta{short} (\meta{long}). The long form on its own can be
displayed through commands like \ics{glsxtrlong}.

\item[\abbrstyle{short}] A synonym for \abbrstyle{short-nolong}.

\item[\abbrstyle{short-sc-nolong}]
Like \abbrstyle{short-nolong} but redefines \cs{glsabbrvfont} to
use \ics{glsxtrscfont}.

\item[\abbrstyle{short-sc}] A synonym for \abbrstyle{short-sc-nolong}

\item[\abbrstyle{short-sm-nolong}]
Like \abbrstyle{short-nolong} but redefines \cs{glsabbrvfont} to
use \ics{glsxtrsmfont}.

\item[\abbrstyle{short-sm}] A synonym for \abbrstyle{short-sm-nolong}.

\item[\abbrstyle{short-em-nolong}]
Like \abbrstyle{short-nolong} but redefines \cs{glsabbrvfont} to
use \ics{glsxtremfont}.

\item[\abbrstyle{short-em}] A synonym for \abbrstyle{short-em-nolong}

\item[\abbrstyle{short-nolong-desc}]
Like the \abbrstyle{short-nolong} style, but the \gloskey{name} is set to
the full form and the \gloskey{description} must be supplied by the
user. You may prefer to use the \abbrstyle{short-nolong} style with the
post-description hook set to display the long form and override
the \gloskey{description} key. (See the sample file
\texttt{sample-acronym-desc.tex}.)

\item[\abbrstyle{short-desc}] A synonym for
\abbrstyle{short-nolong-desc}.

\item[\abbrstyle{short-sc-nolong-desc}]
Like \abbrstyle{short-nolong} but redefines \cs{glsabbrvfont} to
use \ics{glsxtrscfont}.

\item[\abbrstyle{short-sc-desc}] A synonym for
\abbrstyle{short-sc-nolong-desc}.

\item[\abbrstyle{short-sm-nolong-desc}]
Like \abbrstyle{short-nolong-desc} but redefines \cs{glsabbrvfont} to
use \ics{glsxtrsmfont}.

\item[\abbrstyle{short-sm-desc}] A synonym for
\abbrstyle{short-sm-nolong-desc}.

\item[\abbrstyle{short-em-nolong-desc}]
Like \abbrstyle{short-nolong-desc} but redefines \cs{glsabbrvfont} to
use \ics{glsxtremfont}.

\item[\abbrstyle{short-em-desc}] A synonym for
\abbrstyle{short-em-nolong-desc}.

\item[\abbrstyle{long-noshort-desc}]
This style only displays the long form, regardless of first or
subsequent use of commands \ics{gls}. The short form may be 
accessed through commands like \ics{glsxtrshort}. The inline full
form displays \meta{long} (\meta{short}).

The \gloskey{name} and \gloskey{sort} keys are set to the long form and the
\gloskey{description} must be provided by the user. The predefined
glossary styles won't display the short form. You can use the
post-description hook to automatically append the short form to the
description. The inline full form will display \meta{long}
(\meta{short}).

\item[\abbrstyle{long-desc}] A synonym for
\abbrstyle{long-noshort-desc}.

\item[\abbrstyle{long-noshort-sc-desc}]
Like the \abbrstyle{long-noshort-desc} style but the short form (accessed
through commands like \ics{glsxtrshort}) use \ics{glsxtrscfont}.
(This style was originally called \depabbrstyle{long-desc-sc}. Renamed in version
1.04, but original name retained as a deprecated synonym for
backward-compatibility.)

\item[\abbrstyle{long-noshort-sm-desc}]
Like \abbrstyle{long-noshort-desc} but redefines \cs{glsabbrvfont} to
use \ics{glsxtrsmfont}.
(This style was originally called \depabbrstyle{long-desc-sm}. Renamed in version
1.04, but original name retained as a deprecated synonym for
backward-compatibility.)

\item[\abbrstyle{long-noshort-em-desc}]
Like \abbrstyle{long-noshort-desc} but redefines \cs{glsabbrvfont} to
use \ics{glsxtremfont}. The long form isn't emphasized.
(This style was originally called \depabbrstyle{long-desc-em}. Renamed in version
1.04, but original name retained as a deprecated synonym for
backward-compatibility.)

\item[\abbrstyle{long-em-noshort-em-desc}]
New to version 1.04, like \abbrstyle{long-noshort-desc} but redefines
\cs{glsabbrvfont} to use \ics{glsxtremfont}. The long form uses
\ics{glsfirstlongemfont} and \ics{glslongemfont}.

\item[\abbrstyle{long-noshort}]
This style doesn't really make sense if you don't use the short
form anywhere in the document, but is provided for completeness.
This is like the \abbrstyle{long-noshort-desc} style, but the \gloskey{name}
and \gloskey{sort} keys are
set to the short form and the \gloskey{description} is set to the
long form.

\item[\abbrstyle{long}] A synonym for \abbrstyle{long-noshort}

\item[\abbrstyle{long-noshort-sc}]
Like the \abbrstyle{long-noshort} style but the short form (accessed
through commands like \ics{glsxtrshort}) use \ics{glsxtrscfont}.
(This style was originally called \depabbrstyle{long-sc}. Renamed in version
1.04, but original name retained as a deprecated synonym for
backward-compatibility.)

\item[\abbrstyle{long-noshort-sm}]
Like \abbrstyle{long-noshort} but redefines \cs{glsabbrvfont} to
use \ics{glsxtrsmfont}.
(This style was originally called \depabbrstyle{long-sm}. Renamed in version
1.04, but original name retained as a deprecated synonym for
backward-compatibility.)

\item[\abbrstyle{long-noshort-em}]
This style is like \abbrstyle{long-noshort} but redefines \cs{glsabbrvfont} to
use \ics{glsxtremfont}. The long form isn't emphasized.
(This style was originally called \depabbrstyle{long-em}. Renamed in version
1.04, but original name retained as a deprecated synonym for
backward-compatibility.)

\item[\abbrstyle{long-em-noshort-em}]
New to version 1.04, this style is like \abbrstyle{long-noshort} but redefines \cs{glsabbrvfont} to
use \ics{glsxtremfont}, \cs{glsfirstlongfont} to use
\cs{glsfirstlongemfont} and \cs{glslongfont} to use
\cs{glslongemfont}. The short form isn't used by commands like
\ics{gls}, but can be obtained using \ics{glsxtrshort}.

\end{description}

\subsection{Predefined Abbreviation Styles that Don't Set the Regular
Attribute}
\label{sec:predefnonregabbrvstyles}

The following abbreviation styles will set the 
\catattr{regular} attribute to \qt{false} if it has previously
been set. If it hasn't already been set, it's left unset.
Other attributes may also be set, depending on the style.

\begin{description}
\item[\abbrstyle{long-short}]
On \gls{firstuse}, this style uses the format \meta{long} (\meta{short}).
The inline and display full forms are the same. The \gloskey{name}
and \gloskey{sort} keys are set to the short form. (The
\gloskey{name} key additionally includes the font command
\cs{glsabbrvfont}.) The 
\gloskey{description} is set to the long form. The long and short
forms are separated by \cs{glsxtrfullsep}. If you want to insert
material within the parentheses (such as a~translation), try the
\abbrstyle{long-short-user} style.

\item[\abbrstyle{long-short-sc}]
Like \abbrstyle{long-short} but redefines \cs{glsabbrvfont} to
use \ics{glsxtrscfont}.

\item[\abbrstyle{long-short-sm}]
Like \abbrstyle{long-short} but redefines \cs{glsabbrvfont} to
use \ics{glsxtrsmfont}.

\item[\abbrstyle{long-short-em}]
Like \abbrstyle{long-short} but redefines \cs{glsabbrvfont} to
use \ics{glsxtremfont}.

\item[\abbrstyle{long-em-short-em}]
New to version 1.04, this style is like \abbrstyle{long-short-em} but redefines \cs{glsfirstlongfont} to
use \ics{glsfirstlongemfont}.

\item[\abbrstyle{long-short-user}]
This style was introduced in version 1.04. It's like the
\abbrstyle{long-short} style but additional information can be
inserted into the parenthetical material. This checks the value
of the field given by
\begin{definition}[\DescribeMacro\glsxtruserfield]
\cs{glsxtruserfield}
\end{definition}
(which defaults to \texttt{useri}) using \ics{ifglshasfield}
(provided by \styfmt{glossaries}).  If the field hasn't been set,
the style behaves like the \abbrstyle{long-short} style and
produces \meta{long} (\meta{short}) but if the field has been set,
the contents of that field are inserted within the parentheses in
the form \meta{long} (\meta{short}, \meta{field-value}).
The format is governed by
\begin{definition}[\DescribeMacro\glsxtruserparen]
\cs{glsxtruserparen}\marg{text}\marg{label}
\end{definition}
where \meta{text} is the short form (for the
\abbrstyle{long-short-user} style) or the long form (for the
\abbrstyle{short-long-user} style). This command first inserts
a space using \cs{glsxtrfullsep} and then the parenthetical content.
The \meta{text} argument includes the font formatting command,
\cs{glsfirstabbrvfont}\marg{short} in the case of the
\abbrstyle{long-short-user} style and
\cs{glsfirstlongfont}\marg{long} in the
case of the \abbrstyle{short-long-user} style.

For example:
\begin{verbatim}
\setabbreviationstyle[acronym]{long-short-user}

\newacronym{tug}{TUG}{\TeX\ User Group}

\newacronym
 [user1={German Speaking \TeX\ User Group}]
 {dante}{DANTE}{Deutschsprachige Anwendervereinigung \TeX\ e.V}

\end{verbatim}
On first use, \verb|\gls{tug}| will appear as:
\begin{quote}
\TeX\ User Group (TUG)
\end{quote}
whereas \verb|\gls{dante}| will appear as:
\begin{quote}
Deutschsprachige Anwendervereinigung \TeX\ e.V (DANTE, German Speaking \TeX\ User Group)
\end{quote}

The short form is formatted according to
\begin{definition}[\DescribeMacro\glsabbrvuserfont]
\cs{glsabbrvuserfont}\marg{text}
\end{definition}
and the plural suffix is given by
\begin{definition}[\DescribeMacro\glsxtrusersuffix]
\cs{glsxtrusersuffix}
\end{definition}

These may be redefined as appropriate. For example,
if you want a~smallcaps style, you can just set these commands
to those used by the \abbrstyle{long-short-sc} style:
\begin{verbatim}
\renewcommand{\glsabbruserfont}[1]{\glsxtrscfont{#1}}
\renewcommand{\glsxtrusersuffix}{\glsxtrscsuffix}
\end{verbatim}

\item[\abbrstyle{long-short-desc}]
On \gls{firstuse}, this style uses the format \meta{long} (\meta{short}).
The inline and display full forms are the same. The \gloskey{name}
is set to the full form. The \gloskey{sort} key is set to
\meta{long} (\meta{short}). Before version 1.04, this was
incorrectly set to the short form. If you want to revert back to
this you can redefine
\begin{definition}[\DescribeMacro\glsxtrlongshortdescsort]
\cs{glsxtrlongshortdescsort}
\end{definition}
For example:
\begin{verbatim}
\renewcommand*{\glsxtrlongshortdescsort}{\the\glsshorttok}
\end{verbatim}
The \gloskey{description} must be supplied by the user.
The long and short forms are separated by \cs{glsxtrfullsep}.

\item[\abbrstyle{long-short-sc-desc}]
Like \abbrstyle{long-short-desc} but redefines \cs{glsabbrvfont} to
use \ics{glsxtrscfont}.

\item[\abbrstyle{long-short-sm-desc}]
Like \abbrstyle{long-short-desc} but redefines \cs{glsabbrvfont} to
use \ics{glsxtrsmfont}.

\item[\abbrstyle{long-short-em-desc}]
Like \abbrstyle{long-short-desc} but redefines \cs{glsabbrvfont} to
use \ics{glsxtremfont}.

\item[\abbrstyle{long-em-short-em-desc}]
New to version 1.04, this style is like \abbrstyle{long-short-em-desc} but redefines \cs{glsfirstlongfont} to
use \ics{glsfirstlongemfont}.


\item[\abbrstyle{long-short-user-desc}]
New to version 1.04, this style is like a~cross between the
\abbrstyle{long-short-desc} style and the
\abbrstyle{long-short-user} style. The display and inline forms are
as for \abbrstyle{long-short-user} and the \gloskey{name} key is as
\abbrstyle{long-short-desc}. The \gloskey{description} key must be
supplied in the optional argument of \cs{newabbreviation}
(or \cs{newacronym}). The \gloskey{sort} key is set to \meta{long}
(\meta{short}) as per the \abbrstyle{long-short-desc} style.

\item[\abbrstyle{short-long}]
On \gls{firstuse}, this style uses the format \meta{short} (\meta{long}).
The inline and display full forms are the same. The \gloskey{name}
and \gloskey{sort} keys are set to the short form. The 
\gloskey{description} is set to the long form.
The short and long forms are separated by \cs{glsxtrfullsep}.
If you want to insert
material within the parentheses (such as a~translation), try the
\abbrstyle{short-long-user} style.

\item[\abbrstyle{short-sc-long}]
Like \abbrstyle{short-long} but redefines \cs{glsabbrvfont} to
use \ics{glsxtrscfont}.

\item[\abbrstyle{short-sm-long}]
Like \abbrstyle{short-long} but redefines \cs{glsabbrvfont} to
use \ics{glsxtrsmfont}.

\item[\abbrstyle{short-em-long}]
Like \abbrstyle{short-long} but redefines \cs{glsabbrvfont} to
use \ics{glsxtremfont}.

\item[\abbrstyle{short-em-long-em}]
New to version 1.04, this style is like \abbrstyle{short-em-long} but redefines \cs{glsfirstlongfont} to
use \ics{glsfirstlongemfont}.

\item[\abbrstyle{short-long-user}]
New to version 1.04. This style is like the
\abbrstyle{long-short-user} style but with the long and short forms
switched. The parenthetical material is governed by the same command
\ics{glsxtruserparen}, but the first argument supplied to it is 
the long form instead of the short form.

\item[\abbrstyle{short-long-desc}]
On \gls{firstuse}, this style uses the format \meta{short} (\meta{long}).
The inline and display full forms are the same. The \gloskey{name}
is set to the full form. The 
\gloskey{description} must be supplied by the user.
The short and long forms are separated by \cs{glsxtrfullsep}.

\item[\abbrstyle{short-sc-long-desc}]
Like \abbrstyle{short-long-desc} but redefines \cs{glsabbrvfont} to
use \ics{glsxtrscfont}.

\item[\abbrstyle{short-sm-long-desc}]
Like \abbrstyle{short-long-desc} but redefines \cs{glsabbrvfont} to
use \ics{glsxtrsmfont}.

\item[\abbrstyle{short-em-long-desc}]
Like \abbrstyle{short-long-desc} but redefines \cs{glsabbrvfont} to
use \ics{glsxtremfont}.

\item[\abbrstyle{short-em-long-em-desc}]
New to version 1.04, this style is like \abbrstyle{short-em-long-desc} but redefines \cs{glsfirstlongfont} to
use \ics{glsfirstlongemfont}.

\item[\abbrstyle{short-long-user-desc}]
New to version 1.04, this style is like a~cross between the
\abbrstyle{short-long-desc} style and the
\abbrstyle{short-long-user} style. The display and inline forms are
as for \abbrstyle{short-long-user} and the \gloskey{name} key is as
\abbrstyle{short-long-desc}. The \gloskey{description} key must be
supplied in the optional argument of \cs{newabbreviation}
(or \cs{newacronym}).

\item[\abbrstyle{short-footnote}]
On \gls{firstuse}, this style displays the short form with the long form
as a footnote. This style automatically sets the
\catattr{nohyperfirst} attribute to \qt{true} for the supplied
category, so the \gls{firstuse} won't be hyperlinked (but the footnote
marker may be, if the \sty{hyperref} package is used).

The inline full form uses the \meta{short}
(\meta{long}) style. The \gloskey{name} is set to the short form.
The \gloskey{description} is set to the long form.

As from version 1.05, all the footnote styles use:
\begin{definition}[\DescribeMacro\glsfirstlongfootnotefont]
\cs{glsfirstlongfootnotefont}\marg{text}
\end{definition}
to format the long form on \gls{firstuse} or for the full form and
\begin{definition}[\DescribeMacro\glslongfootnotefont]
\cs{glslongfootnotefont}\marg{text}
\end{definition}
to format the long form elsewhere (for example, when used with
\cs{glsxtrlong}).

As from version 1.07, all the footnote styles use:
\begin{definition}[\DescribeMacro\glsxtrabbrvfootnote]
\cs{glsxtrabbrvfootnote}\marg{label}\marg{long}
\end{definition}
By default, this just does \ics{footnote}\marg{long} (the first
argument is ignored). For example, to make the footnote text
link to the relevant place in the glossary:
\begin{verbatim}
\renewcommand{\glsxtrabbrvfootnote}[2]{%
  \footnote{\glshyperlink[#2]{#1}}%
}
\end{verbatim}
or to include the short form with a hyperlink:
\begin{verbatim}
\renewcommand{\glsxtrabbrvfootnote}[2]{%
  \footnote{\glshyperlink[\glsfmtshort{#1}]{#1}: #2}%
}
\end{verbatim}
Note that I haven't used commands like \cs{glsxtrshort} to 
avoid interference (see \sectionref{sec:entryfmtmods}
and \sectionref{sec:nested}).

\item[\abbrstyle{footnote}] A synonym for
\abbrstyle{short-footnote}.

\item[\abbrstyle{short-sc-footnote}]
Like \abbrstyle{short-footnote} but redefines \cs{glsabbrvfont} to
use \ics{glsxtrscfont}.
(This style was originally called \depabbrstyle{footnote-sc}. Renamed in version
1.04, but original name retained as a deprecated synonym for
backward-compatibility.)

\item[\abbrstyle{short-sc-footnote}]
Like \abbrstyle{short-footnote} but redefines \cs{glsabbrvfont} to
use \ics{glsxtrsmfont}.
(This style was originally called \depabbrstyle{footnote-sm}. Renamed in version
1.04, but original name retained as a deprecated synonym for
backward-compatibility.)

\item[\abbrstyle{short-em-footnote}]
Like \abbrstyle{short-footnote} but redefines \cs{glsabbrvfont} to
use \ics{glsxtremfont}.
(This style was originally called \depabbrstyle{footnote-em}. Renamed in version
1.04, but original name retained as a deprecated synonym for
backward-compatibility.)

\item[\abbrstyle{short-postfootnote}]
This is similar to the \abbrstyle{short-footnote} style but doesn't modify
the category attribute. Instead it changes \postlinkcat\ to 
insert the footnote after the
\gls{linktext} on \gls{firstuse}. This will also defer the footnote until after any
following punctuation character that's recognised by
\ics{glsxtrifnextpunc}.

The inline full form uses the \meta{short}
(\meta{long}) style. The \gloskey{name} is set to the short form.
The \gloskey{description} is set to the long form.
Note that this style will change \cs{glsxtrfull} (and it's variants)
so that it fakes non-\gls{firstuse}. (Otherwise the footnote would
appear after the inline form.)

\item[\abbrstyle{postfootnote}] A synonym for
\abbrstyle{short-postfootnote}.

\item[\abbrstyle{short-sc-postfootnote}]
Like \abbrstyle{short-postfootnote} but redefines \cs{glsabbrvfont} to
use \ics{glsxtrscfont}.
(This style was originally called \depabbrstyle{postfootnote-sc}. Renamed in version
1.04, but original name retained as a deprecated synonym for
backward-compatibility.)

\item[\abbrstyle{short-sm-postfootnote}]
Like \abbrstyle{short-postfootnote} but redefines \cs{glsabbrvfont} to
use \ics{glsxtrsmfont}.
(This style was originally called \depabbrstyle{postfootnote-sm}. Renamed in version
1.04, but original name retained as a deprecated synonym for
backward-compatibility.)

\item[\abbrstyle{short-em-postfootnote}]
Like \abbrstyle{short-postfootnote} but redefines \cs{glsabbrvfont} to
use \ics{glsxtremfont}.
(This style was originally called \depabbrstyle{postfootnote-em}. Renamed in version
1.04, but original name retained as a deprecated synonym for
backward-compatibility.)

\item[\abbrstyle{short-postlong-user}]
This style was introduced in version 1.12. It's like the
\abbrstyle{short-long-user} style but defers the parenthetical
material to after the link-text. This means that you don't have such
a long hyperlink (which can cause problems for the DVI \LaTeX\ format)
and it also means that the user supplied material can include a
hyperlink to another location.

\item[\abbrstyle{short-postlong-user-desc}]
This style was introduced in version 1.12. It's like the above
\abbrstyle{short-postlong-user} style but the \gloskey{description}
must be specified.

\item[\abbrstyle{long-postshort-user}]
This style was introduced in version 1.12. It's like the above
\abbrstyle{short-postlong-user} style but the long form is shown
first and the short form is in the parenthetical material (as for
\abbrstyle{long-short-user}) style.

\item[\abbrstyle{long-postshort-user-desc}]
This style was introduced in version 1.12. It's like the above
\abbrstyle{long-postshort-user} style but the \gloskey{description}
must be specified.

\end{description}

\section{Defining New Abbreviation Styles}
\label{sec:newabbrvstyle}

New abbreviation styles may be defined using:
\begin{definition}[\DescribeMacro\newabbreviationstyle]
\cs{newabbreviationstyle}\marg{name}\marg{setup}\marg{fmts}
\end{definition}
\begin{sloppypar}\noindent
where \meta{name} is the name of the new style (as used in the
mandatory argument of \ics{setabbreviationstyle}). This is similar
but not identical to the \styfmt{glossaries} package's
\ics{newacronymstyle} command.
\end{sloppypar}

\begin{important}
You can't use styles defined by
\cs{newacronymstyle} with \styfmt{glossaries-extra} unless you have
reverted \ics{newacronym} back to its generic definition from \styfmt{glossaries}
(using \ics{RestoreAcronyms}). The acronym styles from the
\styfmt{glossaries} package can't be used with abbreviations defined
with \cs{newabbreviation}.
\end{important}

The \meta{setup} argument deals with the way the entry is defined
and may set attributes for the given abbreviation 
category. This argument should redefine
\begin{definition}[\DescribeMacro\CustomAbbreviationFields]
\cs{CustomAbbreviationFields}
\end{definition}
to set the entry fields including the \gloskey{name} (defaults to
the short form if omitted),
\gloskey{sort}, \gloskey{first}, \gloskey{firstplural}. Other fields
may also be set, such as \gloskey{text}, \gloskey{plural} and
\gloskey{description}.

\begin{important}
\cs{CustomAbbreviationFields} is expanded by \cs{newabbreviation}
so take care to protect commands that shouldn't be expanded.
\end{important}

For example, the \abbrstyle{long-short} style has the following in
\meta{setup}:
\begin{verbatim}
  \renewcommand*{\CustomAbbreviationFields}{%
    name={\protect\glsabbrvfont{\the\glsshorttok}},
    sort={\the\glsshorttok},
    first={\protect\glsfirstlongfont{\the\glslongtok}%
     \protect\glsxtrfullsep{\the\glslabeltok}%
     (\protect\glsfirstabbrvfont{\the\glsshorttok})},%
    firstplural={\protect\glsfirstlongfont{\the\glslongpltok}%
     \protect\glsxtrfullsep{\the\glslabeltok}%
     (\protect\glsfirstabbrvfont{\the\glsshortpltok})},%
    plural={\protect\glsabbvfont{\the\glsshortpltok}},%
    description={\the\glslongtok}}%
\end{verbatim}
Note that the \gloskey{first} and \gloskey{firstplural} are
set even though they're not used by \cs{gls}.

The \meta{setup} argument may also redefine
\begin{definition}[\DescribeMacro\GlsXtrPostNewAbbreviation]
\cs{GlsXtrPostNewAbbreviation}
\end{definition}
which can be used to assign attributes. (This will automatically
be initialised to do nothing.)

For example, the \abbrstyle{short-footnote} includes the following in
\meta{setup}:
\begin{verbatim}
  \renewcommand*{\GlsXtrPostNewAbbreviation}{%
    \glssetattribute{\the\glslabeltok}{nohyperfirst}{true}%
    \glshasattribute{\the\glslabeltok}{regular}%
    {%
      \glssetattribute{\the\glslabeltok}{regular}{false}%
    }%
    {}%
  }%
\end{verbatim}
This sets the \catattr{nohyperfirst} attribute to \qt{true}.
It also unsets the \catattr{regular} attribute if it has
previously been set. Note that the \catattr{nohyperfirst}
attribute doesn't get unset by other styles, so take care
not to switch styles for the same category.

You can access the short, long, short plural and long plural
values through the following token registers.

Short value (defined by \styfmt{glossaries}):
\begin{definition}[\DescribeMacro\glsshorttok]
\cs{glsshorttok}
\end{definition}

Short plural value (defined by \styfmt{glossaries-extra}):
\begin{definition}[\DescribeMacro\glsshortpltok]
\cs{glsshortpltok}
\end{definition}
(This may be the default value or, if provided, the value provided by the user
through the \gloskey{shortplural} key in the optional argument
of \ics{newabbreviation}.)

Long value (defined by \styfmt{glossaries}):
\begin{definition}[\DescribeMacro\glslongtok]
\cs{glslongtok}
\end{definition}

Long plural value (defined by \styfmt{glossaries-extra}):
\begin{definition}[\DescribeMacro\glslongpltok]
\cs{glslongpltok}
\end{definition}
(This may be the default value or, if provided, the value provided by the user
through the \gloskey{longplural} key in the optional argument
of \ics{newabbreviation}.)

There are two other registers available that are defined by
\styfmt{glossaries}:

\begin{definition}[\DescribeMacro\glslabeltok]
\cs{glslabeltok}
\end{definition}
which contains the entry's label and
\begin{definition}[\DescribeMacro\glskeylisttok]
\cs{glskeylisttok}
\end{definition}
which contains the values provided in the optional argument
of \ics{newabbreviation}.

Remember put \cs{the} in front of the register command as in the
examples above. The category label can be access through
the command (not a register):
\begin{definition}[\DescribeMacro\glscategorylabel]
\cs{glscategorylabel}
\end{definition}
This may be used inside the definition of
\cs{GlsXtrPostNewAbbreviation}.

If you want to base a style on an existing style, you can use
\begin{definition}[\DescribeMacro\GlsXtrUseAbbrStyleSetup]
\cs{GlsXtrUseAbbrStyleSetup}\marg{name}
\end{definition}
where \meta{name} is the name of the existing style.
For example, the \abbrstyle{short-sc-footnote} and \abbrstyle{short-sm-footnote}
styles both simply use
\begin{verbatim}
\GlsXtrUseAbbrStyleSetup{short-footnote}
\end{verbatim}
within \meta{setup}.

The \meta{fmts} argument deals with the way the entry is displayed
in the document. This argument should redefine the following
commands:

The default suffix for the plural short form (if not overridden by
the \gloskey{shortplural} key):
\begin{definition}[\DescribeMacro\abbrvpluralsuffix]
\cs{abbrvpluralsuffix}
\end{definition}
(Note that this isn't used for the plural long form, which
just uses the regular \cs{glspluralsuffix}.)

The font used for the short form on \gls{firstuse} or in the full forms:
\begin{definition}[\DescribeMacro\glsfirstabbrvfont]
\cs{glsfirstabbrvfont}\marg{text}
\end{definition}

The font used for the short form on subsequent use or through
commands like \ics{glsxtrshort}:
\begin{definition}[\DescribeMacro\glsabbrvfont]
\cs{glsabbrvfont}\marg{text}
\end{definition}

The font used for the long form on \gls{firstuse} or in the full forms:
\begin{definition}[\DescribeMacro\glsfirstlongfont]
\cs{glsfirstlongfont}\marg{text}
\end{definition}

The font used for the long form in commands like \cs{glsxtrlong}
use:
\begin{definition}[\DescribeMacro\glslongfont]
\cs{glslongfont}\marg{text}
\end{definition}

Display full form singular no case-change (used by \ics{gls} on
\gls{firstuse} for abbreviations without the \catattr{regular} attribute
set):
\begin{definition}[\DescribeMacro\glsxtrfullformat]
\cs{glsxtrfullformat}\marg{label}\marg{insert}
\end{definition}

Display full form singular first letter converted to upper case 
(used by \ics{Gls} on \gls{firstuse} for abbreviations without the 
\catattr{regular} attribute set):
\begin{definition}[\DescribeMacro\Glsxtrfullformat]
\cs{Glsxtrfullformat}\marg{label}\marg{insert}
\end{definition}

Display full form plural no case-change 
(used by \ics{glspl} on \gls{firstuse} for abbreviations without the 
\catattr{regular} attribute set):
\begin{definition}[\DescribeMacro\glsxtrfullplformat]
\cs{glsxtrfullplformat}\marg{label}\marg{insert}
\end{definition}

Display full form plural first letter converted to upper case
(used by \ics{Glspl} on \gls{firstuse} for abbreviations without the 
\catattr{regular} attribute set):
\begin{definition}[\DescribeMacro\Glsxtrfullplformat]
\cs{Glsxtrfullplformat}\marg{label}\marg{insert}
\end{definition}

In addition \meta{fmts} may also redefine the following commands that 
govern the inline full formats. If the style doesn't redefine them,
they will default to the same as the display full forms.

Inline singular no case-change (used by 
\ics{glsentryfull}, \ics{glsxtrfull} and \ics{GLSxtrfull}):
\begin{definition}[\DescribeMacro\glsxtrinlinefullformat]
\cs{glsxtrinlinefullformat}\marg{label}\marg{insert}
\end{definition}

Inline singular first letter converted to upper case (used by 
\ics{Glsentryfull} and \ics{Glsxtrfull}):
\begin{definition}[\DescribeMacro\Glsxtrinlinefullformat]
\cs{Glsxtrinlinefullformat}\marg{label}\marg{insert}
\end{definition}

Inline plural no case-change (used by 
\ics{glsentryfullpl}, \ics{glsxtrfullpl} and \ics{GLSxtrfullpl}):
\begin{definition}[\DescribeMacro\glsxtrinlinefullplformat]
\cs{glsxtrinlinefullplformat}\marg{label}\marg{insert}
\end{definition}

Inline plural first letter converted to upper case (used by 
\ics{Glsentryfullpl} and \ics{Glsxtrfullpl}):
\begin{definition}[\DescribeMacro\Glsxtrinlinefullplformat]
\cs{Glsxtrinlinefullplformat}\marg{label}\marg{insert}
\end{definition}

If you want to provide support for \sty{glossaries-accsupp}
use the following \cs{glsaccess\meta{xxx}} commands
(\sectionref{sec:accsupp}) within the definitions of
\cs{glsxtrfullformat} etc instead of the analogous
\cs{glsentry}\meta{xxx} commands. (If you don't use
\sty{glossaries-accsupp}, they will just do the corresponding
\cs{glsentry}\meta{xxx} command.)

For example, the \abbrstyle{short-long} style has the following in
\meta{fmts}:
\begin{verbatim}
  \renewcommand*{\abbrvpluralsuffix}{\glspluralsuffix}%
  \renewcommand*{\glsabbrvfont}[1]{\glsabbrvdefaultfont{##1}}%
  \renewcommand*{\glsfirstabbrvfont}[1]{\glsfirstabbrvdefaultfont{##1}}%
  \renewcommand*{\glsfirstlongfont}[1]{\glsfirstlongdefaultfont{##1}}%
  \renewcommand*{\glslongfont}[1]{\glslongdefaultfont{##1}}%
  \renewcommand*{\glsxtrfullformat}[2]{%
    \glsfirstabbrvfont{\glsaccessshort{##1}}##2\glsxtrfullsep{##1}%
    (\glsfirstlongfont{\glsaccesslong{##1}})%
  }%
  \renewcommand*{\glsxtrfullplformat}[2]{%
    \glsfirstabbrvfont{\glsaccessshortpl{##1}}##2\glsxtrfullsep{##1}%
    (\glsfirstlongfont{\glsaccesslongpl{##1}})%
  }%
  \renewcommand*{\Glsxtrfullformat}[2]{%
    \glsfirstabbrvfont{\Glsaccessshort{##1}}##2\glsxtrfullsep{##1}%
    (\glsfirstlongfont{\glsaccesslong{##1}})%
  }%
  \renewcommand*{\Glsxtrfullplformat}[2]{%
    \glsfirstabbrvfont{\Glsaccessshortpl{##1}}##2\glsxtrfullsep{##1}%
    (\glsfirstlongfont{\glsaccesslongpl{##1}})%
  }%
\end{verbatim}
Since the inline full commands aren't redefined, they default
to the same as the display versions.

If you want to base a style on an existing style, you can use
\begin{definition}[\DescribeMacro\GlsXtrUseAbbrStyleFmts]
\cs{GlsXtrUseAbbrStyleFmts}\marg{name}
\end{definition}
within \meta{fmts}, where \meta{name} is the name of the existing
style. For example, the \abbrstyle{short-sc-long} style has the
following in \meta{fmts}:
\begin{verbatim}
  \GlsXtrUseAbbrStyleFmts{short-long}%
  \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrscsuffix}%
  \renewcommand*{\glsabbrvfont}[1]{\glsxtrscfont{##1}}%
\end{verbatim}
and the \abbrstyle{short-sm-long} style has:
\begin{verbatim}
  \GlsXtrUseAbbrStyleFmts{short-long-desc}%
  \renewcommand*{\glsabbrvfont}[1]{\glsxtrsmfont{##1}}%
  \renewcommand*{\abbrvpluralsuffix}{\protect\glsxtrsmsuffix}%
\end{verbatim}

The simplest examples of creating a new style based on an
existing style are the \qt{em} styles, such as the
\abbrstyle{short-em-long} style, which is defined as:
\begin{verbatim}
\newabbreviationstyle
{short-em-long}% label
{% setup
  \GlsXtrUseAbbrStyleSetup{short-long}%
}%
{% fmts
  \GlsXtrUseAbbrStyleFmts{short-long}%
  \renewcommand*{\glsabbrvfont}[1]{\glsxtremfont{##1}}%
}
\end{verbatim}

\chapter{Entries in Sectioning Titles, Headers, Captions and Contents}
\label{sec:headtitle}

The \styfmt{glossaries} user manual cautions against using commands
like \cs{gls} in chapter or section titles. The principle problems
are:
\begin{itemize}
\item if you have a table of contents, the \gls{firstuseflag} 
will be unset in the contents rather than later in the document;
\item if you have the location lists displayed in the glossary,
unwanted locations will be added to it corresponding to the table of
contents (if present) and every page that contains the entry in the
page header (if the page style in use adds the chapter or section
title to the header);
\item if the page style in use adds the chapter or section title to
the header and attempts to convert it to upper case, the entry label
(in the argument of \cs{gls} etc) will be converted to upper case
and the entry won't be recognised;
\item if you use \sty{hyperref}, commands like \cs{gls} can't be
expanded to a simple string and only the label will appear in the
PDF bookmark (with a warning from \sty{hyperref});
\item if you use \sty{hyperref}, you will end up with nested hyperlinks
in the table of contents.
\end{itemize}
Similar problems can also occur with captions (except for the page
header and bookmark issues).

To get around all these problems, the \styfmt{glossaries} user manual
recommends using the expandable non-hyperlink commands, such as 
\ics{glsentrytext} (for regular entries) or \ics{glsentryshort}
(for abbreviations). This is the simplest solution, but doesn't
allow for special formatting that's applied to the entry through
commands like \cs{glstext} or \cs{glsxtrshort}. This means that if,
for example, you are using one of the abbreviation styles that uses
\ics{textsc} then the short form displayed with \cs{glsentryshort} won't use small
caps. If you only have one abbreviation style in use, you can
explicitly enclose \cs{glsentryshort}\marg{label} in the argument of
\cs{glsabbrvfont}, like this:
\begin{verbatim}
\chapter{A Chapter about \glsabbrvfont{\glsentryshort{html}}}
\end{verbatim}
Or, if you are using \sty{hyperref}:
\begin{verbatim}
\chapter{A Chapter about 
\texorpdfstring{\glsabbrvfont{\glsentryshort{html}}}{\glsentryshort{html}}}
\end{verbatim}

Since this is a bit cumbersome, you might want to define a new
command to do this for you. However, if you have mixed styles this
won't work as commands like \cs{gls} and \cs{glsxtrshort} redefine
\cs{glsabbrvfont} to match the entry's style before displaying it.
In this case, the above example doesn't take into account the
shifting definitions of \cs{glsabbrvfont} and will use whatever
happens to be the last abbreviation style in use. More complicated
solutions interfere with the upper casing used by the standard
page styles that display the chapter or section title in the page
header using \ics{MakeUppercase}.

The \styfmt{glossaries-extra} package tries to resolve this by
modifying \ics{markright} and \ics{markboth}. If you don't like this
change, you can restore their former definitions using
\begin{definition}[\DescribeMacro\glsxtrRevertMarks]
\cs{glsxtrRevertMarks}
\end{definition}
In this case, you'll have to use the \styfmt{glossaries} manual's
recommendations of either simply using \cs{glsentryshort} (as above)
or use the sectioning command's option argument to provide an
alternative for the table of contents and page header. For example:
\begin{verbatim}
\chapter[A Chapter about \glsentryshort{html}]{A Chapter about \gls{html}}
\end{verbatim}

If you don't revert the mark commands back with
\cs{glsxtrRevertMarks}, you can use the commands described below in
the argument of sectioning commands. You can still use them even
if the mark commands have been reverted, but only where they don't
conflict with the page style.

The commands listed below all use \ics{texorpdfstring} if
\sty{hyperref} has been loaded so that the expandable non-formatted
version is added to the PDF bookmarks. Note that since the commands
that convert the first letter to upper case aren't expandable, the
non-case-changing version is used for the bookmarks.

These commands essentially behave as though you have used
\cs{glsxtrshort} (or equivalent) with the options
\gloskey[glslink]{noindex} and \gloskey[glslink]{hyper\eq false}.
The text produced won't be converted to upper case in the page
headings by default. If you want the text converted to upper case
you need to set the \catattr{headuc} attribute to \qt{true}
for the appropriate category.

\begin{important}
If you use one of the \ics{textsc} styles, be aware that the default
fonts don't provide bold small-caps or italic small-caps. This
means that if the chapter or section title style uses bold, this
may override the small-caps setting, in which case the abbreviation
will just appear as lower case bold. If the heading style uses
italic, the abbreviation may appear in upright small-caps,
\emph{even if you have set the \catattr{headuc} attribute} since
the all-capitals form still uses \cs{glsabbrvfont}.
You may want to consider using the \sty{slantsc} package in this
case.
\end{important}

Display the short form:
\begin{definition}[\DescribeMacro\glsfmtshort]
\cs{glsfmtshort}\marg{label}
\end{definition}

Display the plural short form:
\begin{definition}[\DescribeMacro\glsfmtshortpl]
\cs{glsfmtshortpl}\marg{label}
\end{definition}

First letter upper case singular short form:
\begin{definition}[\DescribeMacro\Glsfmtshort]
\cs{Glsfmtshort}\marg{label}
\end{definition}
(No case-change applied to PDF bookmarks.)

First letter upper case plural short form:
\begin{definition}[\DescribeMacro\Glsfmtshortpl]
\cs{Glsfmtshortpl}\marg{label}
\end{definition}
(No case-change applied to PDF bookmarks.)

Display the long form:
\begin{definition}[\DescribeMacro\glsfmtlong]
\cs{glsfmtlong}\marg{label}
\end{definition}

Display the plural long form:
\begin{definition}[\DescribeMacro\glsfmtlongpl]
\cs{glsfmtlongpl}\marg{label}
\end{definition}

First letter upper case singular long form:
\begin{definition}[\DescribeMacro\Glsfmtlong]
\cs{Glsfmtlong}\marg{label}
\end{definition}
(No case-change applied to PDF bookmarks.)

First letter upper case plural long form:
\begin{definition}[\DescribeMacro\Glsfmtlongpl]
\cs{Glsfmtlongpl}\marg{label}
\end{definition}
(No case-change applied to PDF bookmarks.)

There are similar commands for the full form, but note that these
use the \emph{inline} full form, which may be different from the
full form used by \cs{gls}.

Display the full form:
\begin{definition}[\DescribeMacro\glsfmtfull]
\cs{glsfmtfull}\marg{label}
\end{definition}

Display the plural full form:
\begin{definition}[\DescribeMacro\glsfmtfullpl]
\cs{glsfmtfullpl}\marg{label}
\end{definition}

First letter upper case singular full form:
\begin{definition}[\DescribeMacro\Glsfmtfull]
\cs{Glsfmtfull}\marg{label}
\end{definition}
(No case-change applied to PDF bookmarks.)

First letter upper case plural full form:
\begin{definition}[\DescribeMacro\Glsfmtfullpl]
\cs{Glsfmtfullpl}\marg{label}
\end{definition}
(No case-change applied to PDF bookmarks.)

There are also equivalent commands for the value of the
\gloskey{text} field:
\begin{definition}[\DescribeMacro\glsfmttext]
\cs{glsfmttext}\marg{label}
\end{definition}

First letter converted to upper case:
\begin{definition}[\DescribeMacro\Glsfmttext]
\cs{Glsfmttext}\marg{label}
\end{definition}
(No case-change applied to PDF bookmarks.)

The plural equivalents:
\begin{definition}[\DescribeMacro\glsfmtplural]
\cs{glsfmtplural}\marg{label}
\end{definition}
and
\begin{definition}[\DescribeMacro\Glsfmtplural]
\cs{Glsfmtplural}\marg{label}
\end{definition}

Similarly for the value of the
\gloskey{first} field:
\begin{definition}[\DescribeMacro\glsfmtfirst]
\cs{glsfmtfirst}\marg{label}
\end{definition}

First letter converted to upper case:
\begin{definition}[\DescribeMacro\Glsfmtfirst]
\cs{Glsfmtfirst}\marg{label}
\end{definition}
(No case-change applied to PDF bookmarks.)

The plural equivalents:
\begin{definition}[\DescribeMacro\glsfmtfirstpl]
\cs{glsfmtfirstpl}\marg{label}
\end{definition}
and
\begin{definition}[\DescribeMacro\Glsfmtfirstpl]
\cs{Glsfmtfirstpl}\marg{label}
\end{definition}

\chapter{Categories}
\label{sec:categories}

Each entry defined by \ics{newglossaryentry} (or commands that
internally use it such as \ics{newabbreviation}) 
is assigned a category
through the \gloskey{category} key. You may add any category that
you like, but since the category is a label used in the creation
of some control sequences, avoid problematic characters within the
category label. (So take care if you have \sty{babel} shorthands on
that make some characters active.)

The use of categories can give you more control over the way entries
are displayed in the text or glossary. Note that an entry's category
is independent of the glossary type. Be careful not to confuse
\gloskey{category} with \gloskey{type}.

The default category assumed by
\cs{newglossaryentry} is labelled \category{general}. Abbreviations
defined with \cs{newabbreviation} have the category set to
\category{abbreviation} by default. Abbreviations defined with
\cs{newacronym} have the category set to \category{acronym} by
default.

Additionally, if you have enabled \ics{newterm} with the
\pkgopt{index} package option that command
will set the category to \category{index} by default. If you have
enabled \ics{glsxtrnewsymbol} with the \pkgopt{symbols} package
option, that command will set the category to \category{symbol}. If you have
enabled \ics{glsxtrnewnumber} with the \pkgopt{numbers} package
option, that command will set the category to \category{number}.

You can obtain the category label for a given entry using
\begin{definition}[\DescribeMacro\glscategory]
\cs{glscategory}\marg{label}
\end{definition}
This is equivalent to commands like \cs{glsentryname} and so may be
used in an expandable context. No error is generated if the entry
doesn't exist.

You can test the category for a given entry using
\begin{definition}[\DescribeMacro\glsifcategory]
\cs{glsifcategory}\marg{entry-label}\marg{category-label}\marg{true
part}\marg{false part}
\end{definition}
This is equivalent to
\begin{alltt}
\ics{ifglsfieldeq}\marg{entry-label}\{category\}\marg{category-label}\marg{true
part}\marg{false part}
\end{alltt}
so any restrictions that apply to \cs{ifglsfieldeq} also apply to
\cs{glsifcategory}.

Each category may have a set of attributes. For example, the
\category{general} and \category{acronym} categories have the
attribute \catattr{regular} set to \qt{true} to indicate that all
entries with either of those categories are regular entries (as
opposed to abbreviations). This attribute is accessed by
\cs{glsentryfmt} to determine whether to use \cs{glsgenentryfmt} or
\cs{glsxtrgenabbrvfmt}.

Other attributes recognised by \styfmt{glossaries-extra} are:

\begin{description}

\item[\catattr{nohyperfirst}] When using commands like \ics{gls}
this will automatically suppress the hyperlink on \gls{firstuse} for entries with a
category that has this attribute set to \qt{true}.
(This settings can be overridden by explicitly setting
the \gloskey[glslink]{hyper} key on or off in the optional argument of
commands like \cs{gls}.) As from version 1.07, \cs{glsfirst},
\cs{Glsfirst}, \cs{GLSfirst} and their plural versions (which should ideally
behave in a similar way to the \gls{firstuse} of \cs{gls} or
\cs{glspl}) now honour
this attribute (but not the package-wide \pkgopt[false]{hyperfirst}
option, which matches the behaviour of \sty{glossaries}). If you
want commands these \cs{glsfirst} etc commands to ignore the
\catattr{nohyperfirst} attribute then just redefine
\begin{definition}[\DescribeMacro\glsxtrchecknohyperfirst]
\cs{glsxtrchecknohyperfirst}\marg{label}
\end{definition}
to do nothing.

\item[\catattr{nohyper}] When using commands like \ics{gls}
this will automatically suppress the hyperlink for entries with a
category that has this attribute set to \qt{true}.
(This settings can be overridden by explicitly setting
the \gloskey[glslink]{hyper} key on or off in the optional argument of
commands like \cs{gls}.)

\item[\catattr{indexonlyfirst}] This is similar to the 
\pkgopt{indexonlyfirst} package option but only for entries
that have a category with this attribute set to \qt{true}.

\item[\catattr{wrgloss}] When using commands like \ics{gls},
if this attribute is set to \qt{after}, it will automatically
implement \gloskey[glslink]{wrgloss}\optfmt{=after}. (New to v1.14.)

\item[\catattr{discardperiod}] If set to \qt{true}, the
post-\gls{linktext} hook will
discard a~full stop (period) that follows \emph{non-plural} commands like \cs{gls} or
\cs{glstext}. (Provided for entries such as abbreviations that end with a full stop.)

Note that this can cause a problem if you access a field that
doesn't end with a full stop. For example:
\begin{verbatim}
\newabbreviation
 [user1={German Speaking \TeX\ User Group}]
 {dante}{DANTE e.V.}{Deutschsprachige Anwendervereinigung \TeX\
e.V.}
\end{verbatim}
Here the \gloskey{short} and \gloskey{long} fields end with a full stop, but the
\gloskey{user1} field doesn't. The simplest solution in this
situation is to put the sentence terminator in the final optional
argument. For example:
\begin{verbatim}
\glsuseri{dante}[.]
\end{verbatim}
This will bring the punctuation character inside the \gls{linktext}
and it won't be discarded.

\item[\catattr{pluraldiscardperiod}] If this attribute is set to 
\qt{true} \emph{and} the \catattr{discardperiod} attribute is set to
\qt{true}, this will behave as above for the plural commands like
\cs{glspl} or \cs{glsplural}.

\item[\catattr{retainfirstuseperiod}] If this attribute is set
to \qt{true} then the full stop won't be discarded for
\gls{firstuse} instances, even if \catattr{discardperiod} or
\catattr{pluraldiscardperiod} are set. This is useful for
\meta{short} (\meta{long}) abbreviation styles where only the short
form has a trailing full stop..

\item[\catattr{insertdots}] If this attribute is set to \qt{true}
any entry defined using \ics{newabbreviation} will automatically
have full stops (periods) inserted after each letter. The entry will
be defined with those dots present as though they had been present
in the \meta{short} argument of \cs{newabbreviation} (rather than
inserting them every time the entry is used). The short plural
form defaults to the new dotted version of the original \meta{short}
form with the plural suffix appended.

\begin{important}
If you explicitly override
the short plural using the \gloskey{shortplural} key, you must
explicitly insert the dots yourself (since there's no way for the
code to determine if the plural has a suffix that shouldn't be
followed by a dot).
\end{important}

This attribute is best used with the \catattr{discardperiod}
attribute set to \qt{true}.

\item[\catattr{aposplural}] If this attribute is set to \qt{true},
\ics{newabbreviation} will insert an apostrophe (') before
the plural suffix for the \emph{short} plural form (unless explicitly
overridden with the \gloskey{shortplural} key). The long plural form
is unaffected by this setting.

\item[\catattr{noshortplural}] If this attribute is set to
\qt{true}, \ics{newabbreviation} won't append the plural suffix for
the short plural form. This means the \gloskey{short} and
\gloskey{shortplural} values will be the same unless explicitly
overridden. \emph{The \catattr{aposplural} attribute trumps
the \catattr{noshortplural} attribute.}

\item[\catattr{headuc}] If this attribute is set to \qt{true},
commands like \ics{glsfmtshort} will use the upper case version
in the page headers.

\item[\catattr{tagging}] If this attribute is set to \qt{true},
the tagging command defined by \ics{GlsXtrEnableInitialTagging}
will be activated to use \ics{glsxtrtagfont} in the glossary
(see \sectionref{sec:tagging}).

\item[\catattr{entrycount}] Unlike the above attributes,
this attribute isn't boolean but instead must be an integer 
value and is used in combination with \ics{glsenableentrycount}
(see \sectionref{sec:entrycountmods}). Leave blank or undefined
for categories that shouldn't have this facility enabled. The
value of this attribute is used by \ics{glsxtrifcounttrigger}
to determine how commands such as \ics{cgls} should behave.

With \styfmt{glossaries}, commands like \cs{cgls} use \cs{cglsformat}
only if the previous usage count for that entry was equal to~1.
With \styfmt{glossaries-extra} the test is now for entries that
have the \catattr{entrycount} attribute set and
where the previous usage count for that entry is less than or
equal to the value of that attribute.

\item[\catattr{glossdesc}] The \ics{glossentrydesc} command
(used in the predefined glossary styles) is modified by
\styfmt{glossaries-extra} to check for this attribute.
The attribute may have one of the following values:
\begin{itemize}
\item \texttt{firstuc}: the first letter of the description will be
converted to upper case (using \ics{Glsentrydesc}).

\item \texttt{title}: the description will be used in the argument of the
title casing command \ics{capitalisewords} (provided by
\sty{mfirstuc}). If you want to use a different command
you can redefine:
\begin{definition}[\DescribeMacro\glsxtrfieldtitlecasecs]
\cs{glsxtrfieldtitlecasecs}\marg{phrase cs}
\end{definition}
For example:
\begin{verbatim}
\newcommand*{\glsxtrfieldtitlecasecs}[1]{\xcapitalisefmtwords*{#1}}
\end{verbatim}
(Note that the argument to \cs{glsxtrfieldtitlecasecs}
will be a control sequence whose replacement text is the 
entry's description, which is why \cs{xcapitalisefmtwords}
is needed instead of \cs{capitalisefmtwords}.)

\end{itemize}
Any other values of this attribute are ignored. Remember
that there are design limitations for both the first letter
uppercasing and the title casing commands. See the \sty{mfirstuc}
user manual for further details.

\item[\catattr{glossdescfont}] (New to version 1.04) 
In addition to the above, the modified \ics{glossentrydesc} 
command also checks this attribute. If set, it should be the name of
a control sequence (without the leading backslash) that takes one
argument. This control sequence will be applied to the description
text. For example:
\begin{verbatim}
\glssetcategoryattribute{general}{glossdescfont}{emph}
\end{verbatim}


\item[\catattr{glossname}] As \catattr{glossdesc} but applies
to \ics{glossentryname}. Additionally, if this attribute is
set to \qt{uc} the name is converted to all capitals.

\item[\catattr{indexname}] If set, the \cs{glsxtrpostnamehook} hook
used at the end of \ics{glossentyname}
will index the entry using \ics{index}. See
\sectionref{sec:autoindex} for further details.

\item[\catattr{glossnamefont}] (New to version 1.04) 
In addition to the above, the modified \ics{glossentryname} 
command also checks this attribute. If set, it should be the name of
a control sequence (without the leading backslash) that takes one
argument. This control sequence will be applied to the name
text. For example:
\begin{verbatim}
\glssetcategoryattribute{general}{glossnamefont}{emph}
\end{verbatim}
Note that this overrides \cs{glsnamefont} which will only
be used if this attribute hasn't been set.

Remember that glossary styles may additionally apply a font change,
such as the list styles which put the name in the optional argument
of \cs{item}.

\item[\catattr{dualindex}] If set, whenever a glossary entry
has information written to the external glossary file
through commands like \ics{gls} and \ics{glsadd}, a~corresponding
line will be written to the indexing file using \ics{index}. See
\sectionref{sec:autoindex} for further details.

\item[\catattr{targeturl}] If set, the hyperlink generated by
commands like \cs{gls} will be set to the URL provided by this
attributes value. For example:
\begin{verbatim}
\glssetcategoryattribute{general}{targeturl}{master-doc.pdf}
\end{verbatim}
(See also the accompanying sample file
\texttt{sample-external.tex}.) If the URL contains awkward
characters (such as \verb|%| or \verb|~|) remember that the base
\styfmt{glossaries} package provides commands like
\ics{glspercentchar} and \cs{glstildechar} that expand to literal
characters.

If you want to a named anchor within the target URL (notionally
adding \texttt{\#}\meta{name} to the URL), then you also
need to set \catattr{targetname} to the anchor \meta{name}. You may
use \cs{glslabel} within \meta{name} which is set by commands
like \cs{gls} to the entry's label.

All the predefined glossary styles start each entry
listing with \cs{glstarget} which sets the anchor to 
\verb|\glolinkprefix\glslabel|, so if you want entries to link
to glossaries in the URL given by \catattr{targeturl}, you
can just do:
\begin{verbatim}
\glssetcategoryattribute{general}{targetname}{\glolinkprefix\glslabel}
\end{verbatim}
(If the target document changed \cs{glolinkprefix} then you will
need to adjust the above as appropriate.)

If the anchor is in the form \meta{name1}\texttt{.}\meta{name2}
then use \catattr{targetname} for the \meta{name2} part and
\catattr{targetcategory} for the \meta{name1} part.

For example:
\begin{verbatim}
\glssetcategoryattribute{general}{targeturl}{master-doc.pdf}
\glssetcategoryattribute{general}{targetcategory}{page}
\glssetcategoryattribute{general}{targetname}{7}
\end{verbatim}
will cause all link text for \texttt{general} entries to
link to \texttt{master-doc.pdf\#page.7} (page 7 of that PDF).

If you want a mixture in your document of entries that link to 
an internal glossary and entries that link to an external URL
then you can use the starred form of \ics{newignoredglossary}
for the external list. For example:
\begin{verbatim}
\newignoredglossary*{external}

\glssetcategoryattribute{external}{targeturl}{master-doc.pdf}
\glssetcategoryattribute{general}{targetname}{\glolinkprefix\glslabel}

\newglossaryentry{sample}{name={sample},description={local example}}

\newglossaryentry{sample2}{name={sample2},
  type=external,
  category=external,
  description={external example}}
\end{verbatim}


\end{description}

An attribute can be set using:
\begin{definition}[\DescribeMacro\glssetcategoryattribute]
\cs{glssetcategoryattribute}\marg{category-label}\marg{attribute-label}\marg{value}
\end{definition}
where \meta{category-label} is the category label,
\meta{attribute-label} is the attribute label and \meta{value} is
the new value for the attribute.

There is a shortcut version to set the \catattr{regular} attribute
to \qt{true}:
\begin{definition}[\DescribeMacro\glssetregularcategory]
\cs{glssetregularcategory}\marg{category-label}
\end{definition}

If you need to lookup the category label for a particular entry, you
can use the shortcut command:
\begin{definition}[\DescribeMacro\glssetattribute]
\cs{glssetattribute}\marg{entry-label}\marg{attribute-label}\marg{value}
\end{definition}
This uses \cs{glssetcategoryattribute} with \cs{glscategory} to set
the attribute. Note that this will affect all other entries that
share this entry's category.

You can fetch the value of an attribute for a particular category
using:
\begin{definition}[\DescribeMacro\glsgetcategoryattribute]
\cs{glsgetcategoryattribute}\marg{category-label}\marg{attribute-label}
\end{definition}
Again there is a shortcut if you need to lookup the category label
for a given entry:
\begin{definition}[\DescribeMacro\glsgetattribute]
\cs{glsgetattribute}\marg{entry-label}\marg{attribute-label}
\end{definition}

You can test if an attribute has been assigned to a given
category using:
\begin{definition}[\DescribeMacro\glshascategoryattribute]
\cs{glshascategoryattribute}\marg{category-label}\marg{attribute-label}\marg{true
code}\marg{false code}
\end{definition}
This uses \sty{etoolbox}'s 
\cs{ifcsvoid} and does \meta{true code} if the attribute has been
set and isn't blank and isn't \cs{relax}. The shortcut if you need
to lookup the category label from an entry is:
\begin{definition}[\DescribeMacro\glshasattribute]
\cs{glshasattribute}\marg{entry-label}\marg{attribute-label}\marg{true
code}\marg{false code}
\end{definition}

You can test the value of an attribute for a particular category
using:
\begin{definition}[\DescribeMacro\glsifcategoryattribute]
\cs{glsifcategoryattribute}\marg{category-label}\marg{attribute-label}\marg{value} \marg{true-part}\marg{false-part}
\end{definition}
This tests if the attribute (given by \meta{attribute-label}) for
the category (given by \meta{category-label}) is set and equal to
\meta{value}. If true, \meta{true-part} is done. If the attribute
isn't set or is set but isn't equal to \meta{value}, \meta{false
part} is done.

For example:
\begin{verbatim}
\glsifcategoryattribute{general}{nohyper}{true}{NO HYPER}{HYPER}
\end{verbatim}
This does \qt{NO HYPER} if the \category{general} category has the
\catattr{nohyper} attribute set to \texttt{true} otherwise if
does \qt{HYPER}.

With boolean-style attributes like \catattr{nohyper}, make sure you
always test for \texttt{true} not \texttt{false} in case the attribute hasn't been set.

Again there's a shortcut if you need to lookup the category label
from a particular entry:
\begin{definition}[\DescribeMacro\glsifattribute]
\cs{glsifattribute}\marg{entry-label}\marg{attribute-label}\marg{value}\marg{true-part} \marg{false-part}
\end{definition}

There's also a shortcut to determine if a particular category has
the \catattr{regular} attribute set to \qt{true}:
\begin{definition}[\DescribeMacro\glsifregularcategory]
\cs{glsifregularcategory}\marg{category-label}\marg{true-part}\marg{false-part}
\end{definition}
Alternatively, if you need to lookup the category for a particular
entry:
\begin{definition}[\DescribeMacro\glsifregular]
\cs{glsifregular}\marg{entry-label}\marg{true-part}\marg{false-part}
\end{definition}
Note that if the \catattr{regular} attribute hasn't be set, the
above do \meta{false-part}. There are also reverse commands that
test if the \catattr{regular} attribute has been set to \qt{false}:
\begin{definition}[\DescribeMacro\glsifnotregularcategory]
\cs{glsifnotregularcategory}\marg{category-label}\marg{true-part}\marg{false-part}
\end{definition}
or for a particular entry:
\begin{definition}[\DescribeMacro\glsifnotregular]
\cs{glsifnotregular}\marg{entry-label}\marg{true-part}\marg{false-part}
\end{definition}
Again, if the \catattr{regular} attribute hasn't been set, the above
do \meta{false-part}, so these reverse commands aren't logically
opposite in the strict sense.

You can iterate through all entries with a given category using:
\begin{definition}
\cs{glsforeachincategory}\oarg{glossary-labels}\marg{category-label} \marg{glossary-cs}\marg{label-cs}\marg{body}
\end{definition}
This iterates through all entries in the glossaries identified by
the comma-separated list \meta{glossary-labels} that have the
category given by \meta{category-label} and performs \meta{body} for
each match. Within \meta{body}, you can use \meta{glossary-cs} and
\meta{label-cs}
(which much be control sequences) to access the current glossary and
entry label. If \meta{glossary-labels} is omitted, all glossaries
are assumed.

Similarly, you can iterate through all entries that have a category
with a given attribute using:
\begin{definition}[\DescribeMacro\glsforeachwithattribute]
\cs{glsforeachwithattribute}\oarg{glossary-labels}\marg{attribute-label} \marg{attribute-value}\marg{glossary-cs}\marg{label-cs}\marg{body}
\end{definition}
This will do \meta{body} for each entry that has a category with the
attribute \meta{attribute-label} set to \meta{attribute-value}.
The remaining arguments are as the previous command.

You can change the category for a particular entry using the
standard glossary field changing commands, such as
\ics{glsfielddef}. Alternatively, you can use
\begin{definition}[\DescribeMacro\glsxtrsetcategory]
\cs{glsxtrsetcategory}\marg{entry-labels}\marg{category-label}
\end{definition}
This will change the category to \meta{category-label} for each
entry listed in the comma-separated list \meta{entry-labels}. This
command uses \ics{glsfieldxdef} so it will expand
\meta{category-label} and make the change global.

You can also change the category for all entries with a glossary or
glossaries using:
\begin{definition}[\DescribeMacro\glsxtrsetcategoryforall]
\cs{glsxtrsetcategoryforall}\marg{glossary-labels}\marg{category-label}
\end{definition}
where \meta{glossary-labels} is a comma-separated list of glossary
labels.

\chapter{Entry Counting}
\label{sec:entrycount}

As mentioned in \sectionref{sec:entrycountmods},
\styfmt{glossaries-extra} modifies the \ics{glsenableentrycount} command to allow
for the \catattr{entrycount} attribute. This means that
you not only need to enable entry counting with
\ics{glsenableentrycount}, but you also need
to set the appropriate attribute (see \sectionref{sec:categories}).

\begin{important}
Remember that entry counting only counts the number of times an
entry is used by commands that change the \gls{firstuseflag}. (That
is, all those commands that mark the entry as having been used.)
There are many commands that don't modify this flag and they won't
contribute to the entry use count.
\end{important}

With \styfmt{glossaries-extra}, you may use \ics{cgls} instead of
\ics{gls} even if you haven't enabled entry counting. You will only
get a warning if you use \cs{glsenableentrycount} without setting
the \catattr{entrycount} attribute.  (With \styfmt{glossaries},
commands like \ics{cgls} will generate a warning if
\cs{glsenableentrycount} hasn't been used.) The abbreviation
shortcut \ics{ab} uses \cs{cgls} (see
\sectionref{sec:abbrshortcuts}) unlike the acronym shortcut \ics{ac}
which uses \cs{gls}.

All upper case versions (not provided by \styfmt{glossaries}) are
also available:
\begin{definition}[\DescribeMacro\cGLS]
\cs{cGLS}\oarg{options}\marg{label}\oarg{insert}
\end{definition}
and
\begin{definition}[\DescribeMacro\cGLSpl]
\cs{cGLSpl}\oarg{options}\marg{label}\oarg{insert}
\end{definition}
These are analogous to \cs{cgls} and \cs{cglspl} but they
use
\begin{definition}[\DescribeMacro\cGLSformat]
\cs{cGLSformat}\marg{label}\marg{insert}
\end{definition}
and
\begin{definition}[\DescribeMacro\cGLSplformat]
\cs{cGLSplformat}\marg{label}\marg{insert}
\end{definition}
which convert the analogous \cs{cglsformat} and
\cs{cglsplformat} to upper case.

Just using \styfmt{glossaries}:
\begin{verbatim}
\documentclass{article}

\usepackage{glossaries}

\makeglossaries

\glsenableentrycount

\newacronym{html}{HTML}{hypertext markup language}
\newacronym{xml}{XML}{extensible markup language}

\begin{document}

Used once: \cgls{html}.

Used twice: \cgls{xml} and \cgls{xml}.

\printglossaries

\end{document}
\end{verbatim}

If you switch to \styfmt{glossaries-extra} you must set the
\catattr{entrycount} attribute:
\begin{verbatim}
\documentclass{article}

\usepackage{glossaries-extra}

\makeglossaries

\glsenableentrycount

\glssetcategoryattribute{abbreviation}{entrycount}{1}

\newabbreviation{html}{HTML}{hypertext markup language}
\newabbreviation{xml}{XML}{extensible markup language}

\begin{document}

Used once: \cgls{html}.

Used twice: \cgls{xml} and \cgls{xml}.

\printglossaries

\end{document}
\end{verbatim}

When activated with \cs{glsenableentrycount}, commands such as 
\ics{cgls} now use
\begin{definition}[\DescribeMacro\glsxtrifcounttrigger]
\cs{glsxtrifcounttrigger}\marg{label}\marg{trigger code}\marg{normal
code}
\end{definition}
to determine if the entry trips the entry count trigger.
The \meta{trigger code} uses commands like \cs{cglsformat} and 
unsets the \gls{firstuseflag}. The \meta{normal code} is the code that
would ordinarily be performed by whatever the equivalent
command is (for example, \cs{cgls} will use \cs{cglsformat} in 
\meta{trigger code} but the usual \cs{gls} behaviour in \meta{normal
code}).

The default definition is:
\begin{verbatim}
\newcommand*{\glsxtrifcounttrigger}[3]{%
 \glshasattribute{#1}{entrycount}%
 {%
   \ifnum\glsentryprevcount{#1}>\glsgetattribute{#1}{entrycount}\relax
    #3%
   \else
    #2%
   \fi 
 }%
 {#3}% 
}
\end{verbatim}
This means that if an entry is assigned to a category that has
the \catattr{entrycount} attribute then the \meta{trigger code}
will be used if the previous count value 
(the number of times the entry was used on the last run) is greater
than the value of the attribute.

For example, to trigger normal use if the previous count value
is greater than four:
\begin{verbatim}
\glssetcategoryattribute{abbreviation}{entrycount}{4}
\end{verbatim}

There is a convenient command provided to enable entry counting,
set the \catattr{entrycount} attribute and redefine \ics{gls},
etc to use \ics{cgls} etc:
\begin{definition}[\DescribeMacro\GlsXtrEnableEntryCounting]
\cs{GlsXtrEnableEntryCounting}\marg{categories}\marg{value}
\end{definition}
The first argument \meta{categories} is a comma-separated list
of categories. For each category, the \catattr{entrycount}
attribute is set to \meta{value}. In addition, this does:
\begin{verbatim}
\renewcommand*{\gls}{\cgls}%
\renewcommand*{\Gls}{\cGls}%
\renewcommand*{\glspl}{\cglspl}%
\renewcommand*{\Glspl}{\cGlspl}%
\renewcommand*{\GLS}{\cGLS}%
\renewcommand*{\GLSpl}{\cGLSpl}%
\end{verbatim}
This makes it easier to enable entry-counting on existing
documents.

If you use \cs{GlsXtrEnableEntryCounting} more than once, subsequent uses will
just set the \catattr{entrycount} attribute for each listed
category.

The above example document can then become:
\begin{verbatim}
\documentclass{article}

\usepackage{glossaries-extra}

\makeglossaries

\GlsXtrEnableEntryCounting{abbreviation}{1}

\newabbreviation{html}{HTML}{hypertext markup language}
\newabbreviation{xml}{XML}{extensible markup language}

\begin{document}

Used once: \gls{html}.

Used twice: \gls{xml} and \gls{xml}.

\printglossaries

\end{document}
\end{verbatim}

The standard entry-counting function describe above counts
the number of times an entry has been marked as used throughout
the document. (The reset commands will reset the total back to 
zero.) If you prefer to count per sectional-unit, you can
use
\begin{definition}[\DescribeMacro\GlsXtrEnableEntryUnitCounting]
\cs{GlsXtrEnableEntryUnitCounting}\marg{categories}\marg{value}\marg{counter-name}
\end{definition}
where \meta{categories} is a comma-separated list of categories
to which this feature should be applied, \meta{value} is the
trigger value and \meta{counter-name} is the name of the counter
used by the sectional unit.

\begin{important}
Due to the asynchronous nature of \TeX's output routine,
discrepancies will occur in page spanning paragraphs if you
use the \ctr{page} counter.
\end{important}

Note that you can't use both the document-wide counting and
the per-unit counting in the same document.

The counter value is used as part of a label, which means
that \cs{the}\meta{counter-name} needs to be expandable.
Since \sty{hyperref} also has a similar requirement and provides
\cs{theH}\meta{counter-name} as an expandable alternative,
\styfmt{glossaries-extra} will use \cs{theH}\meta{counter-name}
if it exists otherwise it will use \cs{the}\meta{counter-name}.

The per-unit counting function uses two attributes: \catattr{entrycount}
(as before) and \catattr{unitcount} (the name of the counter).

Both the original document-wide counting mechanism and the
per-unit counting mechanism provide a command that can be
used to access the current count value for this run:
\begin{definition}[\DescribeMacro\glsentrycurrcount]
\cs{glsentrycurrcount}\marg{label}
\end{definition}
and the final value from the previous run:
\begin{definition}[\DescribeMacro\glsentryprevcount]
\cs{glsentryprevcount}\marg{label}
\end{definition}
In the case of the per-unit counting, this is the final value
\emph{for the current unit}. In both commands \meta{label}
is the entry's label.

The per-unit counting mechanism additionally provides:
\begin{definition}[\DescribeMacro\glsentryprevtotalcount]
\cs{glsentryprevtotalcount}\marg{label}
\end{definition}
which gives the sum of all the per-unit totals from the previous run
for the entry given by \meta{label}, and
\begin{definition}[\DescribeMacro\glsentryprevmaxcount]
\cs{glsentryprevmaxcount}\marg{label}
\end{definition}
which gives the maximum per-unit total from the previous run.

The above two commands are unavailable for the document-wide counting.

Example of per-unit counting, where the unit is the chapter:
\begin{verbatim}
\documentclass{report}
\usepackage{glossaries-extra}

\GlsXtrEnableEntryUnitCounting{abbreviation}{2}{chapter}

\makeglossaries

\newabbreviation{html}{HTML}{hypertext markup language}
\newabbreviation{css}{CSS}{cascading style sheet}

\newglossaryentry{sample}{name={sample},description={sample}}

\begin{document}
\chapter{Sample}

Used once: \gls{html}.

Used three times: \gls{css} and \gls{css} and \gls{css}.

Used once: \gls{sample}.

\chapter{Another Sample}

Used once: \gls{css}.

Used twice: \gls{html} and \gls{html}.

\printglossaries
\end{document}
\end{verbatim}
In this document, the \texttt{css} entry is used three times in the
first chapter. This is more than the trigger value of 2, so
\verb|\gls{css}| is expanded on \gls{firstuse} with the short
form used on subsequent use, and the \texttt{css} entries in
that chapter are added to the glossary. In the second chapter,
the \texttt{css} entry is only used once, which trips the 
suppression trigger, so in that chapter, the long form
is used and \verb|\gls{css}| doesn't get a line added to
the glossary file.

The \texttt{html} is used a total of three times, but the
expansion and indexing suppression trigger is tripped 
in both chapters because the per-unit total (1 for the first
chapter and 2 for the second chapter) is less than or equal
to the trigger value.

The \texttt{sample} entry has only been used once, but it doesn't
trip the indexing suppression because it's in the \category{general}
category, which hasn't been listed in
\cs{GlsXtrEnableEntryUnitCounting}.

The per-unit entry counting can be used for other purposes.
In the following example document the trigger value is set
to zero, which means the index suppression won't be triggered,
but the unit entry count is used to automatically suppress the
hyperlink for commands like \ics{gls} by modifying the
hook
\begin{definition}[\DescribeMacro\glslinkcheckfirsthyperhook]
\cs{glslinkcheckfirsthyperhook}
\end{definition}
which is used at the end of the macro the determines whether
or not to suppress the hyperlink.

\begin{verbatim}
\documentclass{article}

\usepackage[colorlinks]{hyperref}
\usepackage{glossaries-extra}

\makeglossaries

\GlsXtrEnableEntryUnitCounting{general}{0}{page}

\newglossaryentry{sample}{name={sample},description={an example}}

\renewcommand*{\glslinkcheckfirsthyperhook}{%
  \ifnum\glsentrycurrcount\glslabel>0
   \setkeys{glslink}{hyper=false}%
  \fi
}

\begin{document}

A \gls{sample} entry.
Next use: \gls{sample}.

\newpage

Next page: \gls{sample}.
Again: \gls{sample}.

\printglossaries

\end{document}
\end{verbatim}
This only produces a hyperlink for the first instance of 
\verb|\gls{sample}| on each page.

The earlier warning about using the \ctr{page} counter still 
applies. If the first instance of \cs{gls} occurs at the top of the
page within a paragraph that started on the previous page, then
the count will continue from the previous page.

\chapter{Auto-Indexing}
\label{sec:autoindex}

It's possible that you may also want a normal index as well as
the glossary, and you may want entries to automatically be
added to the index (as in this document).
There are two attributes that govern this: \catattr{indexname}
and \catattr{dualindex}.

\begin{sloppypar}
The \ics{glsxtrpostnamehook} macro, used
at the end of \ics{glossentryname} and \ics{Glossentryname},
checks the \catattr{indexname} attribute for the category
associated with that entry.
Since \cs{glossentryname} is used in the default glossary
styles, this makes a convenient way of automatically indexing
each entry name at its location in the glossary without
fiddling around with the value of the \gloskey{name} key.
\end{sloppypar}

The internal macro used by the \styfmt{glossaries} package to
write the information to the external glossary file is
modified to check for the \catattr{dualindex} attribute.

In both cases, the indexing is done through
\begin{definition}[\DescribeMacro\glsxtrdoautoindexname]
\cs{glsxtrdoautoindexname}\marg{label}\marg{attribute-label}
\end{definition}
This uses the standard \ics{index} command with the sort value 
taken from the entry's \gloskey{sort} key and the actual value 
set to \cs{glsentryname}\marg{label}.  If the value of the 
attribute given by \meta{attribute-label} is \qt{true}, no encap 
will be added, otherwise the encap will be the
attribute value. For example:
\begin{verbatim}
\glssetcategoryattribute{general}{indexname}{textbf}
\end{verbatim}
will set the encap to \texttt{textbf} which will display the
relevant page number in bold whereas
\begin{verbatim}
\glssetcategoryattribute{general}{dualindex}{true}
\end{verbatim}
won't apply any formatting to the page number in the index.

\begin{important}
The location used in the index will always be the page number
not the counter used in the glossary. (Unless some other loaded
package has modified the definition of \cs{index} to use
some thing else.)
\end{important}

By default the \gloskey[glslink]{format} key won't be used with 
the \catattr{dualindex} attribute. You can allow the 
\gloskey[glslink]{format} key to override the attribute value
by using the preamble-only command:
\begin{definition}[\DescribeMacro\GlsXtrEnableIndexFormatOverride]
\cs{GlsXtrEnableIndexFormatOverride}
\end{definition}
If you use this command and \sty{hyperref} has been loaded, 
then the \env{theindex} environment will be modified to redefine 
\ics{glshypernumber} to allow formats that use that command.

\begin{important}
The \catattr{dualindex} attribute will still be used on 
subsequent use even if the \catattr{indexonlyfirst} attribute
(or \pkgopt{indexonlyfirst} package option) is set. However,
the \catattr{dualindex} attribute will honour the 
\gloskey[glslink]{noindex} key.
\end{important}

The \cs{glsxtrdoautoindexname} command will attempt to escape any of
\ics{makeindex}'s special characters, but there may be special cases
where it fails, so take care.  This assumes the default \gls{makeindex} actual,
level, quote and encap values (unless any of the commands
\ics{actualchar}, \ics{levelchar}, \ics{quotechar} or
\ics{encapchar} have been defined before \styfmt{glossaries-extra}
is loaded).

If this isn't the case, you can use the following preamble-only
commands to set the correct characters.
\begin{important}
Be very careful of possible shifting category codes!
\end{important}

\begin{definition}[\DescribeMacro\GlsXtrSetActualChar]
\cs{GlsXtrSetActualChar}\marg{char}
\end{definition}
Set the actual character to \meta{char}.

\begin{definition}[\DescribeMacro\GlsXtrSetLevelChar]
\cs{GlsXtrSetLevelChar}\marg{char}
\end{definition}
Set the level character to \meta{char}.

\begin{definition}[\DescribeMacro\GlsXtrSetEscChar]
\cs{GlsXtrSetEscChar}\marg{char}
\end{definition}
Set the escape (quote) character to \meta{char}.

\begin{definition}[\DescribeMacro\GlsXtrSetEncapChar]
\cs{GlsXtrSetEncapChar}\marg{char}
\end{definition}
Set the encap character to \meta{char}.

\chapter{On-the-Fly Document Definitions}
\label{sec:onthefly}

\begin{important}
The commands described here may superficially look like
\meta{word}\cs{index}\marg{word}, but they behave rather 
differently. If you want to use \cs{index} then just use
\cs{index}.
\end{important}

The \styfmt{glossaries} package advises against defining entries
in the \env{document} environment. As mentioned in
\sectionref{sec:pkgopts} above, this ability is disabled by
default with \styfmt{glossaries-extra} but can be enabled using
the \pkgopt{docdefs} package options.

Although this can be problematic, the \styfmt{glossaries-extra}
package provides a way of defining and using entries within
the \env{document} environment without the tricks used with the
\pkgopt{docdefs} option. \emph{There are limitations with this
approach, so take care with it.} This function is disabled by
default, but can be enabled using the preamble-only command:
\begin{definition}[\DescribeMacro\GlsXtrEnableOnTheFly]
\cs{GlsXtrEnableOnTheFly}
\end{definition}
When used, this defines the commands described below.

\begin{important}
The commands \cs{glsxtr}, \cs{glsxtrpl}, \cs{Glsxtr}
and \cs{Glsxtrpl} can't be used after the glossaries have been
displayed (through \ics{printglossary} etc). It's best not to mix
these commands with the standard glossary commands, such
as \cs{gls} or there may be unexpected results.
\end{important}

\begin{definition}[\DescribeMacro\glsxtr]
\cs{glsxtr}\oarg{gls-options}\oarg{dfn-options}\marg{label}
\end{definition}
If an entry with the label \meta{label} has already been defined,
this just does \cs{gls}\oarg{gls-options}\marg{label}. If
\meta{label} hasn't been defined, this will define the entry
using:
\begin{alltt}
\cs{newglossaryentry}\marg{label}\{name=\marg{label},
 category=\cs{glsxtrcat},
 description=\{\cs{nopostdesc}\},
 \meta{dfn-options}\}
\end{alltt}

\begin{important}
The \meta{label} must contain any non-expandable commands, such as
formatting commands or problematic characters.
If the term requires any of these, they must be omitted from the
\meta{label} and placed in the \gloskey{name} key must be provided
in the optional argument \meta{dfn-options}.
\end{important}

The second optional argument \meta{dfn-options} should be empty
if the entry has already been defined, since it's too late for
them. If it's not empty, a~warning will be generated with
\begin{definition}[\DescribeMacro\GlsXtrWarning]
\cs{GlsXtrWarning}\marg{dfn-options}\marg{label}
\end{definition}

For example, this warning will be generated on the second instance
of \cs{glsxtr} below:
\begin{verbatim}
\glsxtr[][plural=geese]{goose}
% ... later
\glsxtr[][plural=geese]{goose}
\end{verbatim}

If you are considering doing something like:
\begin{verbatim}
\newcommand*{\goose}{\glsxtr[][plural=geese]{goose}}
\renewcommand*{\GlsXtrWarning}[2]{}
% ... later
\goose\ some more text here
\end{verbatim}
then don't bother. It's simpler and less problematic to just
define the entries in the preamble with \ics{newglossaryentry}
and then use \cs{gls} in the document.

There are plural and case-changing alternatives to \cs{glsxtr}:
\begin{definition}[\DescribeMacro\glsxtrpl]
\cs{glsxtrpl}\oarg{gls-options}\oarg{dfn-options}\marg{label}
\end{definition}
This is like \cs{glsxtr} but uses \cs{glspl} instead of \cs{gls}.

\begin{definition}[\DescribeMacro\Glsxtr]
\cs{Glsxtr}\oarg{gls-options}\oarg{dfn-options}\marg{label}
\end{definition}
This is like \cs{glsxtr} but uses \cs{Gls} instead of \cs{gls}.

\begin{definition}[\DescribeMacro\Glsxtrpl]
\cs{Glsxtrpl}\oarg{gls-options}\oarg{dfn-options}\marg{label}
\end{definition}
This is like \cs{glsxtr} but uses \cs{Glspl} instead of \cs{gls}.

If you use UTF-8 and don't want the inconvenient of needing
to use an ASCII-only label, then it's better to use
\XeLaTeX\ or \LuaLaTeX\ instead of \LaTeX\ (or \pdfLaTeX).
If you really desperately want to use UTF-8 entry labels without
switching to \XeLaTeX\ or \LuaLaTeX\ then there is a starred
version of \cs{GlsXtrEnableOnTheFly} that allows you to
use UTF-8 characters in \meta{label}, but it's experimental and 
may not work in some cases.

\begin{important}
If you use the starred version of \cs{GlsXtrEnableOnTheFly}
don't use any commands in the \meta{label}, even if they expand
to just text.
\end{important}

\chapter{bib2gls: Managing Reference Databases}
\label{sec:bib2gls}

There is a new command line application under development called
\gls{bib2gls}, which works in much the same way as \appfmt{bibtex}.
Instead of storing all your entry definitions in a \texttt{.tex} and
loading them using \cs{input} or \cs{loadglsentries}, the entries
can instead be stored in a \texttt{.bib} file and \gls{bib2gls} can
selectively write the appropriate commands to a \texttt{.glstex}
file which is loaded using \cs{glsxtrresourcefile} (or
\cs{GlsXtrLoadResources}).

This means that you can use a reference managing system, such as
JabRef, to maintain the database and it reduces the \TeX\ overhead
by only defining the entries that are actually required in the
document. If you currently have a \texttt{.tex} file that contains
hundreds of definitions, but you only use a dozen or so in your
document, then the build time is needlessly slowed by the unrequired
definitions that occur when the file is input.

Although \gls{bib2gls} isn't ready yet, there have been some new
commands and options added to \styfmt{glossaries-extra} to help
assist the integration of \gls{bib2gls} into the document build
process.

An example of the contents of \texttt{.bib} file that stores
glossary entries that can be extracted with \gls{bib2gls}:
\begin{verbatim}
@entry{bird,
  name={bird},
  description = {feathered animal},
  see={[see also]{duck,goose}}
}

@entry{duck,
  name={duck},
  description = {a waterbird with short legs}
}

@entry{goose,
  name="goose",
  plural="geese",
  description={a waterbird with a long neck}
}
\end{verbatim}

The follow provides some abbreviations:
\begin{verbatim}
@string{ssi={server-side includes}}
@string{html={hypertext markup language}}

@abbreviation{shtml,
  short="shtml",
  long= ssi # " enabled " # html,
  description={a combination of \gls{html} and \gls{ssi}}
}

@abbreviation{html,
  short ="html",
  long  = html,
  description={a markup language for creating web pages}
}

@abbreviation{ssi,
  short="ssi",
  long = ssi,
  description={a simple interpreted server-side scripting language}
}
\end{verbatim}

Here are some symbols:
\begin{verbatim}
preamble{"\providecommand{\mtx}[1]{\boldsymbol{#1}}"}

@symbol{M,
  name={$\mtx{M}$},
  text={\mtx{M}},
  description={a matrix}
}

@symbol{v,
  name={$\vec{v}$},
  text={\vec{v}},
  description={a vector}
}

@symbol{S,
  name={$\mathcal{S}$},
  text={\mathcal{S}},
  description={a set}
}
\end{verbatim}

To ensure that \gls{bib2gls} can find out which entries have been
used in the document, you need the \pkgopt{record} package. Option:
\begin{verbatim}
\usepackage[record]{glossaries-extra}
\end{verbatim}
If this option's value is omitted (as above), the normal indexing
will be switched off, since \gls{bib2gls} can also sort the entries and 
collate the locations.

If you still want to use an indexing application (for example, you
need a custom \gls{xindy} rule), then just use
\pkgopt[alsoindex]{record} and continue to use \cs{makeglossaries}
and \cs{printglossary} (or \cs{printglossaries}), but instruct
\gls{bib2gls} to omit sorting to save time.

The \texttt{.glstex} file created by \cs{bib2gls} is loaded using:
\begin{definition}[\DescribeMacro\glsxtrresourcefile]
\cs{glsxtrresourcefile}\oarg{options}\marg{filename}
\end{definition}
(Don't include the file extension in \meta{filename}.)
There's a shortcut version that sets \meta{filename} \cs{jobname}:
\begin{definition}[\DescribeMacro\GlsXtrLoadResources]
\cs{GlsXtrLoadResources}\oarg{options}
\end{definition}
On the first use, this command is a shortcut for
\begin{alltt}
\cs{glsxtrresourcefile}\oarg{options}\{\cs{jobname}\}
\end{alltt}
On subsequent use,\footnote{Version 1.11 only allowed one use
of \cs{GlsXtrLoadResources} per document.}\ this command is a shortcut for
\begin{alltt}
\cs{glsxtrresourcefile}\oarg{options}\{\cs{jobname}-\meta{n}\}
\end{alltt}
where \meta{n} is the current value of
\begin{definition}
\cs{glsxtrresourcecount}
\end{definition}
which is incremented at the end of \cs{GlsXtrLoadResources}.
Any advisory notes regarding \cs{glsxtrresourcefile} also
apply to \cs{GlsXtrLoadResources}.

The \cs{glsxtrresourcefile} command writes the line
\begin{alltt}
\cs{glsxtr@resource}\marg{options}\marg{filename}
\end{alltt}
to the \texttt{.aux} file and will input
\meta{filename}\texttt{.glstex} if it exists.\footnote{v1.08 assumed
\meta{filename}\texttt{.tex} but that's potentially dangerous if,
for example, \meta{filename} happens to be the same as \cs{jobname}.
The \texttt{.glstex} extension was enforced by version 1.11.}

The options are ignored by \styfmt{glossaries-extra} but are picked
up by \gls{bib2gls} and are used to supply various information, such
as the name of the \texttt{.bib} files and any changes to the
default behaviour.

Since the \texttt{.glstex} won't exist on the first \LaTeX\ run, the
\pkgopt{record} package option additionally switches on
\pkgopt[warn]{undefaction}. Any use of commands like \cs{gls} or
\cs{glstext} will produce ?? in the document, since they are
undefined at this point. Once \gls{bib2gls} has created the
\texttt{.glstex} file the references should be resolved.

Note that as from v1.12, \cs{glsxtrresourcefile} temporarily
switches the category code of \texttt{@} to 11 (letter) while it
reads the file to allow for any internal commands stored in the
location field.

Since the \texttt{.glstex} file only defines those references used
within the document and the definitions have been written in the
order corresponding to \gls{bib2gls} sorted list, the glossaries can
simply be displayed using \cs{printunsrtglossary} (or
\cs{printunsrtglossaries}), described in \sectionref{sec:printunsrt}.

Suppose the \texttt{.bib} examples shown above have been stored in
the files \texttt{terms.bib}, \texttt{abbrvs.bib} and
\texttt{symbols.bib} which may either be in the current directory or
on \TeX's path. Then the document might look like:
\begin{verbatim}
\documentclass{article}

\usepackage[record]{glossaries-extra}

\setabbreviationstyle{long-short-desc}

\GlsXtrLoadResources[src={terms,abbrvs,symbols}]

\begin{document}
\gls{bird}

\gls{shtml}

\gls{M}

\printunsrtglossaries
\end{document}
\end{verbatim}
The document build process (assuming the document is called
\texttt{mydoc}) is:
\begin{verbatim}
pdflatex mydoc
bib2gls mydoc
pdflatex mydoc
\end{verbatim}
This creates a single glossary containing the entries:
\texttt{bird}, \texttt{duck}, \texttt{goose},
\texttt{html}, \texttt{M}, \texttt{shtml} and \texttt{ssi} (in that
order). The \texttt{bird}, \texttt{shtml} and \texttt{M} entries
were added because \gls{bib2gls} detected (from the \texttt{.aux}
file) that they had been used in the document. The other entries
were added because \gls{bib2gls} detected (from the \texttt{.bib}
files) that they are referenced by the used entries. In the case of
\texttt{duck} and \texttt{goose}, they are in the \gloskey{see}
field for \texttt{bird}. In the case of \texttt{ssi} and
\texttt{html}, they are referenced in the \gloskey{description}
field of \texttt{shtml}. These cross-referenced entries won't have a
location list when the glossary is first displayed, but depending on
how they are referenced, they may pick up a location list on the
next document build.

The entries can be separated into different glossaries with
different sort methods:
\begin{verbatim}
\documentclass{article}

\usepackage[record,abbreviations,symbols]{glossaries-extra}

\setabbreviationstyle{long-short-desc}

\GlsXtrLoadResources[src={terms},sort={en-GB},type=main]

\glsxtrresourcefile
 [src={abbrvs},sort={letter-nocase},type=abbreviations]
 {\jobname-abr}

\glsxtrresourcefile
 [src={symbols},sort={use},type={symbols}]
 {\jobname-sym}

\begin{document}
\gls{bird}

\gls{shtml}

\gls{M}

\printunsrtglossaries
\end{document}
\end{verbatim}
(By default, entries are sorted according to the operating system's
locale. If this doesn't match the document language, you need to 
set this in the option list, for example \verb|sort=de-CH-1996|
for Swiss German using the new orthography.)

Note that \cs{glsaddall} doesn't work in this case as it has to
iterate over the glossary lists, which will be empty on the first
run and on subsequent runs will only contain those entries that have
been selected by \gls{bib2gls}. Instead, if you want to add all
entries to the glossary, you need to tell \gls{bib2gls} this in the
options list:
\begin{verbatim}
\GlsXtrLoadResources[src={terms},selection={all}]
\end{verbatim}

The \gls{bib2gls} user manual will contain more detail.

\chapter{Miscellaneous New Commands}
\label{sec:miscnew}

The \styfmt{glossaries} package provides \ics{glsrefentry} entry to
cross-reference entries when used with the \pkgopt{entrycounter} or
\pkgopt{subentrycounter} options. The \styfmt{glossaries-extra}
package provides a supplementary command
\begin{definition}[\DescribeMacro\glsxtrpageref]
\cs{glsxtrpageref}\marg{label}
\end{definition}
that works in the same way except that it uses \ics{pageref}
instead of \ics{ref}.

You can copy an entry to another glossary using
\begin{definition}[\DescribeMacro\glsxtrcopytoglossary]
\cs{glsxtrcopytoglossary}\marg{entry-label}\marg{glossary-type}
\end{definition}
This appends \meta{entry-label} to the end of the internal
list for the glossary given by \meta{glossary-type}.
Be careful if you use the \sty{hyperref} package as this 
may cause duplicate hypertargets. You will need to change
\cs{glolinkprefix} to another value or disable hyperlinks
when you display the duplicate. Alternatively, use the new
\gloskey[printglossary]{target} key to switch off the targets:
\begin{verbatim}
\printunsrtglossary[target=false]
\end{verbatim}

The \styfmt{glossaries} package allows you to set preamble code
for a given glossary type using \cs{setglossarypreamble}. This
overrides any previous setting. With \styfmt{glossaries-extra}
(as from v1.12) you can instead append to the preamble
using
\begin{definition}[\DescribeMacro\apptoglossarypreamble]
\cs{apptoglossarypreamble}\oarg{type}\marg{code}
\end{definition}
or prepend using
\begin{definition}[\DescribeMacro\pretoglossarypreamble]
\cs{pretoglossarypreamble}\oarg{type}\marg{code}
\end{definition}

\section{Entry Fields}
\label{sec:fields}

A field may now be used to store the name of a text-block command
that takes a single argument. The field is given by
\begin{definition}[\DescribeMacro\GlsXtrFmtField]
\cs{GlsXtrFmtField}
\end{definition}
The default value is \texttt{\GlsXtrFmtField}. Note that the
value must be the control sequence name \emph{without the initial
backslash}.

For example:
\begin{verbatim}
\newcommand*{\mtx}[1]{\boldsymbol{#1}}
\newcommand*{\mtxinv}[1]{\mtx{#1}\sp{-1}}

\newglossaryentry{matrix}{%
  name={matrix},
  symbol={\ensuremath{\mtx{M}}},
  plural={matrices},
  user1={mtx},
  description={rectangular array of values}
}

\newglossaryentry{identitymatrix}{%
  name={identity matrix},
  symbol={\ensuremath{\mtx{I}}},
  plural={identity matrices},
  description={a diagonal matrix with all diagonal elements equal to
1 and all other elements equal to 0}
}

\newglossaryentry{matrixinv}{%
  name={matrix inverse},
  symbol={\ensuremath{\mtxinv{M}}},
  user1={mtxinv},
  description={a square \gls{matrix} such that
   $\mtx{M}\mtxinv{M}=\glssymbol{identitymatrix}$}
}
\end{verbatim}

There are two commands provided that allow you to apply the
command to an argument:
\begin{definition}[\DescribeMacro\glsxtrfmt]
\cs{glsxtrfmt}\oarg{options}\marg{label}\marg{text}
\end{definition}
This effectively does
\begin{alltt}
\cs{glslink}\oarg{options}\marg{label}\marg{\meta{cs}\marg{text}}
\end{alltt}
where \meta{cs} is the command obtained from the control
sequence name supplied in the provided field. If the field
hasn't been set, \cs{glsxtrfmt} will simply do \meta{text}.
The default \meta{options} are given by
\begin{definition}[\DescribeMacro\GlsXtrFmtDefaultOptions]
\cs{GlsXtrFmtDefaultOptions}
\end{definition}
This is defined as \texttt{\GlsXtrFmtDefaultOptions} but may
be redefined as appropriate. Note that the replacement text of
\cs{GlsXtrFmtDefaultOptions} is prepended to the optional
argument of \cs{glslink}. 

For example:
\begin{verbatim}
\[
  \glsxtrfmt{matrix}{A}
  \glsxtrfmt{matrixinv}{A}
  =
  \glssymbol{identitymatrix}
\]
\end{verbatim}
If the default options are set to \texttt{noindex} then 
\cs{glsxtrfmt} won't index, but will create a hyperlink (if
\sty{hyperref} has been loaded). This can be changed so that
it also suppresses the hyperlink:
\begin{verbatim}
\renewcommand{\GlsXtrFmtDefaultOptions}{hyper=false,noindex}
\end{verbatim}

Note that \cs{glsxtrfmt} won't work with PDF bookmarks. Instead
you can use
\begin{definition}[\DescribeMacro\glsxtrentryfmt]
\cs{glsxtrentryfmt}\marg{label}\marg{text}
\end{definition}
This uses \cs{texorpdfstring} and will simply expand to \meta{text}
within the PDF bookmarks, but in the document it will do
\meta{cs}\marg{text} if a control sequence name has been provided
or just \meta{text} otherwise.

The \styfmt{glossaries} package provides \cs{glsaddstoragekey} to
add new keys. This command will cause an error if the key has
already been defined. The \styfmt{glossaries-extra} package provides
a supplementary command that will only define the key if it doesn't
already exist:
\begin{definition}[\DescribeMacro\glsxtrprovidestoragekey]
\cs{glsxtrprovidestoragekey}\marg{key}\marg{default}\marg{cs}
\end{definition}
If the key has already been defined, it will still provide the command given in
the third argument \meta{cs} (if it hasn't already been defined). Unlike
\cs{glsaddstoragekey}, \meta{cs} may be left empty if you're happy
to just use \cs{glsfieldfetch} to fetch the value of this new key.

You can test if a key has been provided with:
\begin{definition}[\DescribeMacro\glsxtrifkeydefined]
\cs{glsxtrifkeydefined}\marg{key}\marg{true}\marg{false}
\end{definition}
This tests if \meta{key} is available for use in the
\meta{key}=\value{value} list in the second argument of
\cs{newglossaryentry} (or the optional argument of
commands like \cs{newabbreviation}). The corresponding
field may not have been set for any of the entries if no
default was provided.

There are now commands provided to set individual fields. Note that
these only change the specified field, not any related values. For
example, changing the value of the \gloskey{text} field won't update
the \gloskey{plural} field. There are also some fields that
should really only be set when entries are defined (such
as the \gloskey{parent} field). Unexpected results may occur
if they are subsequently changed.

\begin{definition}[\DescribeMacro\GlsXtrSetField]
\cs{GlsXtrSetField}\marg{label}\marg{field}\marg{value}
\end{definition}
Sets the field given by \meta{field} to \meta{value} for the entry
given by \meta{label}. No expansion is performed. It's not
necessary for the field to have been defined as a key. You
can access the value later with \cs{glsxtrusefield}. Note that
\cs{glsxtrifkeydefined} only tests if a key has been defined for use
with commands like \cs{newglossaryentry}. If a field without a
corresponding key is assigned a value, the key remains undefined.
This command is robust.

\cs{GlsXtrSetField} uses
\begin{definition}[\DescribeMacro\glsxtrsetfieldifexists]
\cs{glsxtrsetfieldifexists}\marg{label}\marg{field}\marg{code}
\end{definition}
where \meta{label} is the entry label and \meta{code} is the
assignment code.

This command just uses \ics{glsdoifexists}\marg{label}\marg{code}
(ignoring the \meta{field} argument), so by default it causes an
error if the entry doesn't exist.  This can be changed to a warning
with \pkgopt[warn]{undefaction}.  You can redefine
\cs{glsxtrsetfieldifexists} to simply do \meta{code} if you want to
skip the existence check.  Alternatively you can instead use
\begin{definition}[\DescribeMacro\glsxtrdeffield]
\cs{glsxtrdeffield}\marg{label}\marg{field}\meta{arguments}\marg{replacement text}
\end{definition}
This simply uses \sty{etoolbox}'s \cs{csdef} without any checks.
This command isn't robust. There is also a version that uses
\cs{csedef} instead:
\begin{definition}[\DescribeMacro\glsxtredeffield]
\cs{glsxtredeffield}\marg{label}\marg{field}\meta{arguments}\marg{replacement text}
\end{definition}

\begin{definition}[\DescribeMacro\gGlsXtrSetField]
\cs{gGlsXtrSetField}\marg{label}\marg{field}\marg{value}
\end{definition}
As \cs{GlsXtrSetField} but globally.

\begin{definition}[\DescribeMacro\eGlsXtrSetField]
\cs{eGlsXtrSetField}\marg{label}\marg{field}\marg{value}
\end{definition}
As \cs{GlsXtrSetField} but uses protected expansion.

\begin{definition}[\DescribeMacro\xGlsXtrSetField]
\cs{xGlsXtrSetField}\marg{label}\marg{field}\marg{value}
\end{definition}
As \cs{gGlsXtrSetField} but uses protected expansion.

\begin{definition}[\DescribeMacro\GlsXtrLetField]
\cs{GlsXtrLetField}\marg{label}\marg{field}\marg{cs}
\end{definition}
Sets the field given by \meta{field} to the replacement text of \meta{cs} 
for the entry given by \meta{label} (using \cs{let}).

\begin{definition}[\DescribeMacro\csGlsXtrLetField]
\cs{csGlsXtrLetField}\marg{label}\marg{field}\marg{cs name}
\end{definition}
As \cs{GlsXtrLetField} but the control sequence name is supplied
instead.

\begin{definition}[\DescribeMacro\GlsXtrLetFieldToField]
\cs{GlsXtrLetFieldToField}\marg{label-1}\marg{field-1}\marg{label-2}\marg{field-2}
\end{definition}
Sets the field given by \meta{field-1} for the entry given by
\meta{label-1} to the field given by \meta{field-2} for the entry
given by \meta{label-2}. There's no check for the existence of
\meta{label-2}, but
\cs{glsxtrsetfieldifexists}\marg{label-1}\marg{field-1}\marg{code}
is still used, as for \cs{GlsXtrSetField}.

The \styfmt{glossaries} package provides \ics{glsfieldfetch} which
can be used to fetch the value of the given field and store it in a
control sequence. The \styfmt{glossaries-extra} package provides 
another way of accessing the field value:
\begin{definition}[\DescribeMacro\glsxtrusefield]
\cs{glsxtrusefield}\marg{entry-label}\marg{field-label}
\end{definition}
This works in the same way as commands like \cs{glsentrytext} but
the field label is specified in the first argument. Note that the
\meta{field-label} corresponds to the internal field tag, which
isn't always the same as the key name. See Table~4.1 of the
\sty{glossaries} manual. No error occurs if the entry or field
haven't been defined. This command is not robust.

There is also a version that converts the first letter to uppercase
(analogous to \cs{Glsentrytext}):
\begin{definition}[\DescribeMacro\Glsxtrusefield]
\cs{Glsxtrusefield}\marg{entry-label}\marg{field-label}
\end{definition}

If you want to use a field to store a list that can be used
as an \sty{etoolbox} internal list, you can use the following
command that adds an item to the field using \sty{etoolbox}'s
\cs{listcsadd}:
\begin{definition}[\DescribeMacro\glsxtrfieldlistadd]
\cs{glsxtrfieldlistadd}\marg{label}\marg{field}\marg{item}
\end{definition}
where \meta{label} is the entry's label, \meta{field} is
the entry's field and \meta{item} is the item to add. There
are analogous commands that use \cs{listgadd}, \cs{listeadd}
and \cs{listxadd}:
\begin{definition}[\DescribeMacro\glsxtrfieldlistgadd]
\cs{glsxtrfieldlistgadd}\marg{label}\marg{field}\marg{item}
\end{definition}
\begin{definition}[\DescribeMacro\glsxtrfieldlisteadd]
\cs{glsxtrfieldlisteadd}\marg{label}\marg{field}\marg{item}
\end{definition}
\begin{definition}[\DescribeMacro\glsxtrfieldlistxadd]
\cs{glsxtrfieldlistxadd}\marg{label}\marg{field}\marg{item}
\end{definition}
You can then iterate over the list using:
\begin{definition}[\DescribeMacro\glsxtrfielddolistloop]
\cs{glsxtrfielddolistloop}\marg{label}\marg{field}
\end{definition}
or
\begin{definition}[\DescribeMacro\glsxtrfieldforlistloop]
\cs{glsxtrfieldforlistloop}\marg{label}\marg{field}\marg{handler}
\end{definition}
that internally use \cs{dolistcsloop} and \cs{forlistloop},
respectively.

There are also commands that use \cs{ifinlistcs}:
\begin{definition}[\DescribeMacro\glsxtrfieldifinlist]
\cs{glsxtrfieldifinlist}\marg{label}\marg{field}\marg{item}\marg{true}\marg{false}
\end{definition}
and \cs{xifinlistcs}
\begin{definition}[\DescribeMacro\glsxtrfieldxifinlist]
\cs{glsxtrfieldxifinlist}\marg{label}\marg{field}\marg{item}\marg{true}\marg{false}
\end{definition}

See the \sty{etoolbox}'s user manual for further
details of these commands, in particular the limitations
of \cs{ifinlist}.

When using the \pkgopt{record} option, in addition to recording the
usual location, you can also record the current value
of another counter at the same time using the preamble-only command:
\begin{definition}[\DescribeMacro\GlsXtrRecordCounter]
\cs{GlsXtrRecordCounter}\marg{counter name}
\end{definition}
For example:
\begin{verbatim}
\usepackage[record]{glossaries-extra}
\GlsXtrRecordCounter{section}
\end{verbatim}
Each time an entry is referenced with commands like \cs{gls}
or \cs{glstext}, the \texttt{.aux} file will not only contain
the \cs{glsxtr@record} command but also
\begin{alltt}
\cs{glsxtr@counterrecord}\marg{label}\{section\}\marg{n}
\end{alltt}
where \meta{n} is the current expansion of \cs{thesection}
and \meta{label} is the entry's label. On the next run, when the
\texttt{.aux} file is run, this command will do
\begin{alltt}
\cs{glsxtrfieldlistgadd}\marg{label}\{record.\meta{counter}\}\marg{n}
\end{alltt}
In the above example, if \verb|\gls{bird}| is used in section~1.2
this would be
\begin{verbatim}
\glsxtrfieldlistgadd{bird}{record.section}{1.2}
\end{verbatim}
Note that there's no key corresponding to this new
\texttt{record.section} field, but its value can be
accessed with \cs{glsxtrfielduse} or the list can be
iterated over with \cs{glsxtrfielddolistloop} etc.

\section{Display All Entries Without Sorting or Indexing}
\label{sec:printunsrt}

\begin{definition}[\DescribeMacro\printunsrtglossary]
\cs{printunsrtglossary}\oarg{options}
\end{definition}
This behaves like \cs{printnoidxglossary} but never sorts the
entries and always lists all the defined entries for the given
glossary (and doesn't require \cs{makenoidxglossaries}). 

There's also a starred form
\begin{definition}[\DescribeMacro\printunsrtglossary*]
\cs{printunsrtglossary}*\oarg{options}\marg{code}
\end{definition}
which is equivalent to
\begin{alltt}
\cs{begingroup}
 \meta{code}\cs{printunsrtglossary}\oarg{options}\%
\cs{endgroup}
\end{alltt}
Note that unlike \cs{glossarypreamble}, the supplied \meta{code} is
done before the glossary header.

This means you now have the option to simply list all entries on the
first \LaTeX\ run without the need for a post-processor, however
there will be no \gls{numberlist} in this case, as that has to be
set by a post-processor such as \gls{bib2gls} (see
\sectionref{sec:bib2gls}).

For example:
\begin{verbatim}
\documentclass{article}

\usepackage{glossaries-extra}

\newglossaryentry{zebra}{name={zebra},description={stripy animal}}
\newglossaryentry{ant}{name={ant},description={an insect}}

\begin{document}
\gls{ant} and \gls{zebra}

\printunsrtglossaries
\end{document}
\end{verbatim}
In the above, zebra will be listed before ant as it was defined
first.

If you allow document definitions with the \pkgopt{docdefs} option, 
the document will require a second \LaTeX\ run if the entries are
defined after \cs{printunsrtglossary}.

The optional argument is as for \cs{printnoidxglossary} (except for
the \gloskey[printnoidxglossary]{sort} key, which isn't available).

All glossaries may be displayed in the order of their definition
using:
\begin{definition}[\DescribeMacro\printunsrtglossaries]
\cs{printunsrtglossaries}
\end{definition}
which is analogous to \cs{printnoidxglossaries}. This just
iterates over all defined glossaries (that aren't on the ignored
list) and does \cs{printunsrtglossary}[type=\meta{type}].

The \cs{printunsrtglossary} command internally uses
\begin{definition}[\DescribeMacro\printunsrtglossaryhandler]
\cs{printunsrtglossaryhandler}\marg{label}
\end{definition}
for each item in the list, where \meta{label} is the current label.

By default this just does
\begin{definition}[\DescribeMacro\glsxtrunsrtdo]
\cs{glsxtrunsrtdo}\marg{label}
\end{definition}
which determines whether to use \cs{glossentry} or
\cs{subglossentry} and checks the \gloskey{location} and
\gloskey{loclist} fields for the \gls{numberlist}.

You can redefine the handler if required.

\begin{important}
If you redefine the handler to exclude entries, you may end
up with an empty glossary. This could cause a problem for
the list-based styles.
\end{important}

For example, if the preamble includes:
\begin{verbatim}
\usepackage[record,style=index]{glossaries-extra}
\GlsXtrRecordCounter{section}
\end{verbatim}
then you can print the glossary but first redefine the handler
to only select entries that include the current section number
in the \texttt{record.section} field:
\begin{verbatim}
\renewcommand{\printunsrtglossaryhandler}[1]{%
  \glsxtrfieldxifinlist{#1}{record.section}{\thesection}
  {\glsxtrunsrtdo{#1}}%
  {}%
}
\end{verbatim}

Alternatively you can use the starred form of
\cs{printunsrtglossary} which will localise the change:

\begin{verbatim}
\printunsrtglossary*{%
  \renewcommand{\printunsrtglossaryhandler}[1]{%
    \glsxtrfieldxifinlist{#1}{record.section}{\thesection}
    {\glsxtrunsrtdo{#1}}%
    {}%
  }%
}
\end{verbatim}

If you are using the \sty{hyperref} package and want to 
display the same glossary more than once, you can also
add a temporary redefinition of \cs{glolinkprefix} to
avoid duplicate hypertarget names. For example:

\begin{verbatim}
\printunsrtglossary*{%
  \renewcommand{\printunsrtglossaryhandler}[1]{%
    \glsxtrfieldxifinlist{#1}{record.section}{\thesection}
    {\glsxtrunsrtdo{#1}}%
    {}%
  }%
  \ifcsundef{theHsection}%
  {%
    \renewcommand*{\glolinkprefix}{record.#2.\csuse{thesection}.}%
  }%
  {%
    \renewcommand*{\glolinkprefix}{record.#2.\csuse{theHsection}.}%
  }%
}
\end{verbatim}
If it's a short summary at the start of a section, you might
also want to suppress the glossary header and add some vertical
space afterwards:
\begin{verbatim}
\printunsrtglossary*{%
  \renewcommand{\printunsrtglossaryhandler}[1]{%
    \glsxtrfieldxifinlist{#1}{record.section}{\thesection}
    {\glsxtrunsrtdo{#1}}%
    {}%
  }%
  \ifcsundef{theHsection}%
  {%
    \renewcommand*{\glolinkprefix}{record.#2.\csuse{thesection}.}%
  }%
  {%
    \renewcommand*{\glolinkprefix}{record.#2.\csuse{theHsection}.}%
  }%
  \renewcommand*{\glossarysection}[2][]{}%
  \appto\glossarypostamble{\glspar\medskip\glspar}%
}
\end{verbatim}

There's a shortcut command that does this:
\begin{definition}[\DescribeMacro\printunsrtglossaryunit]
\cs{printunsrtglossaryunit}\oarg{options}\marg{counter name}
\end{definition}
The above example can simply be replaced with:
\begin{verbatim}
\printunsrtglossaryunit{section}
\end{verbatim}

This shortcut command is actually defined to use \cs{printunsrtglossary*} with
\begin{definition}[\DescribeMacro\printunsrtglossaryunitsetup]
\cs{printunsrtglossaryunitsetup}\marg{counter name}
\end{definition}
so if you want to just make some minor modifications you can
do
\begin{verbatim}
\printunsrtglossary*{\printunsrtglossaryunitsetup{section}%
  \renewcommand*{\glossarysection}[2][]{\subsection*{Summary}}%
}
\end{verbatim}
which will start the list with a subsection header with the
title \qt{Summary} (overriding the glossary's title).

Note that this shortcut command is only available with the
\pkgopt{record} (or \pkgopt[alsoindex]{record}) package option.

This temporary change in the hypertarget prefix means you
need to explicitly use \cs{hyperlink} to create a link to it
as commands like \cs{gls} will try to link to the target
created with the default definition of \cs{gloslinkprefix}.
This isn't a problem if you want a primary glossary of all terms
produced using just \cs{printunsrtglossary} (in the front or back
matter) which can be the target for all glossary references
and then just use \cs{printunsrtglossaryunit} for a quick 
summary at the start of a section etc.

\section{Entry Aliases}
\label{sec:alias}

An entry can be made an alias of another entry using the
\gloskey{alias} key. The value should be the label of the other
term. There's no check for the other's existence when the aliased
entry is defined. This is to allow the possibility of defining the
other entry after the aliased entry. (For example, when used with
\gls{bib2gls}.)

If an entry \meta{entry-1} is made an alias of \meta{entry-2} then:
\begin{itemize}
\item If the \gloskey{see} field wasn't provided when \meta{entry-1}
was defined, the \gloskey{alias} key will automatically trigger
\begin{alltt}
\cs{glssee}\marg{entry-1}\marg{entry-2}
\end{alltt}
\item If the \sty{hyperref} package has been loaded then
\cs{gls}\marg{entry-1} will link to \meta{entry-2}'s target. (Unless
the \catattr{targeturl} attribute has been set for \meta{entry-1}'s
category.)
\item With \pkgopt[off]{record} or \pkgopt[alsoindex]{record}, the \gloskey[glslink]{noindex} setting will automatically be triggered
when referencing \meta{entry-1} with commands like \cs{gls} or
\cs{glstext}. This prevents \meta{entry-1} from have a
\gls{locationlist} (aside from the cross-reference added with
\cs{glssee}) unless it's been explicitly indexed with \cs{glsadd} or
if the indexing has been explicitly set using
\texttt{noindex=false}.

Note that with \pkgopt[only]{record}, the \gls{locationlist}
for aliased entries is controlled with \gls{bib2gls}['s] settings.
\end{itemize}

The index suppression trigger is performed by
\begin{definition}[\DescribeMacro\glsxtrsetaliasnoindex]
\cs{glsxtrsetaliasnoindex}
\end{definition}
This is performed after the default options provided by
\ics{GlsXtrSetDefaultGlsOpts} have been set.
With \pkgopt[only]{record}, \cs{glsxtrsetaliasnoindex} will 
default to do nothing.

Within the definition of \cs{glsxtrsetaliasnoindex} you can use
\begin{definition}[\DescribeMacro\glsxtrindexaliased]
\cs{glsxtrindexaliased}
\end{definition}
to index \meta{entry-2}. 

The index suppression command can be redefined to index the main
term instead. For example:
\begin{verbatim}
\renewcommand{\glsxtrsetaliasnoindex}{%
 \glsxtrindexaliased
 \setkeys{glslink}{noindex}%
}
\end{verbatim}

The value of the \gloskey{alias} field can be accessed using
\begin{definition}[\DescribeMacro\glsxtralias]
\cs{glsxtralias}\marg{label}
\end{definition}

\chapter{Supplemental Packages}
\label{sec:supplemental}

The \styfmt{glossaries} bundle provides additional support packages
\sty{glossaries-prefix} (for prefixing) and \sty{glossaries-accsupp}
(for accessibility support). These packages aren't automatically
loaded.

\section{Prefixes or Determiners}
\label{sec:prefix}

If prefixing is required, you can simply load
\sty{glossaries-prefix} after \styfmt{glossaries-extra}. For example:
\begin{verbatim}
\documentclass{article}

\usepackage{glossaries-extra}
\usepackage{glossaries-prefix}

\makeglossaries

\newabbreviation
 [prefix={an\space},
 prefixfirst={a~}]
 {svm}{SVM}{support vector machine}

\begin{document}

First use: \pgls{svm}.
Next use: \pgls{svm}.

\printglossaries

\end{document}
\end{verbatim}

\section{Accessibility Support}
\label{sec:accsupp}

The \sty{glossaries-accsupp} needs to be loaded before
\styfmt{glossaries-extra} or through the \pkgopt{accsupp} package
option:
\begin{verbatim}
\usepackage[accsupp]{glossaries-extra}
\end{verbatim}
If you don't load \sty{glossaries-accsupp} or you load
\sty{glossaries-accsupp} after \styfmt{glossaries-extra}
the new \cs{glsaccess}\meta{xxx} commands described below will
simply be equivalent to the corresponding \cs{glsentry}\meta{xxx}
commands.

The following \cs{glsaccess}\meta{xxx} commands add accessibility information wrapped around
the corresponding \cs{glsentry}\meta{xxx} commands. There is
no check for existence of the entry nor do any of these commands
add formatting, hyperlinks or indexing information.

\begin{definition}[\DescribeMacro\glsaccessname]
\cs{glsaccessname}\marg{label}
\end{definition}
This displays the value of the \gloskey{name} field for the entry
identified by \meta{label}.

If the \sty{glossaries-accsupp} package isn't loaded, this is 
simply defined as:
\begin{verbatim}
\newcommand*{\glsaccessname}[1]{\glsentryname{#1}}
\end{verbatim}
otherwise it's defined as:
\begin{verbatim}
\newcommand*{\glsaccessname}[1]{%
  \glsnameaccessdisplay
  {%
    \glsentryname{#1}%
  }%
  {#1}%
}
\end{verbatim}
(\ics{glsnameaccessdisplay} is defined by the
\sty{glossaries-accsupp} package.) The first letter upper case
version is:
\begin{definition}[\DescribeMacro\Glsaccessname]
\cs{Glsaccessname}\marg{label}
\end{definition}
Without the \sty{glossaries-accsupp} package this is just defined 
as:
\begin{verbatim}
\newcommand*{\Glsaccessname}[1]{\Glsentryname{#1}}
\end{verbatim}
With the \sty{glossaries-accsupp} package this is defined as:
\begin{verbatim}
\newcommand*{\Glsaccessname}[1]{%
  \glsnameaccessdisplay
  {%
    \Glsentryname{#1}%
  }%
  {#1}%
}
\end{verbatim}

The following commands are all defined in an analogous manner.
\begin{definition}[\DescribeMacro\glsaccesstext]
\cs{glsaccesstext}\marg{label}
\end{definition}
This displays the value of the \gloskey{text} field.

\begin{definition}[\DescribeMacro\Glsaccesstext]
\cs{Glsaccesstext}\marg{label}
\end{definition}
This displays the value of the \gloskey{text} field with the first
letter converted to upper case.

\begin{definition}[\DescribeMacro\glsaccessplural]
\cs{glsaccessplural}\marg{label}
\end{definition}
This displays the value of the \gloskey{plural} field.

\begin{definition}[\DescribeMacro\Glsaccessplural]
\cs{Glsaccessplural}\marg{label}
\end{definition}
This displays the value of the \gloskey{plural} field
with the first letter converted to upper case.

\begin{definition}[\DescribeMacro\glsaccessfirst]
\cs{glsaccessfirst}\marg{label}
\end{definition}
This displays the value of the \gloskey{first} field.

\begin{definition}[\DescribeMacro\Glsaccessfirst]
\cs{Glsaccessfirst}\marg{label}
\end{definition}
This displays the value of the \gloskey{first} field
with the first letter converted to upper case.

\begin{definition}[\DescribeMacro\glsaccessfirstplural]
\cs{glsaccessfirstplural}\marg{label}
\end{definition}
This displays the value of the \gloskey{firstplural} field.

\begin{definition}[\DescribeMacro\Glsaccessfirstplural]
\cs{Glsaccessfirstplural}\marg{label}
\end{definition}
This displays the value of the \gloskey{firstplural} field
with the first letter converted to upper case.

\begin{definition}[\DescribeMacro\glsaccesssymbol]
\cs{glsaccesssymbol}\marg{label}
\end{definition}
This displays the value of the \gloskey{symbol} field.

\begin{definition}[\DescribeMacro\Glsaccesssymbol]
\cs{Glsaccesssymbol}\marg{label}
\end{definition}
This displays the value of the \gloskey{symbol} field
with the first letter converted to upper case.

\begin{definition}[\DescribeMacro\glsaccesssymbolplural]
\cs{glsaccesssymbolplural}\marg{label}
\end{definition}
This displays the value of the \gloskey{symbolplural} field.

\begin{definition}[\DescribeMacro\Glsaccesssymbolplural]
\cs{Glsaccesssymbolplural}\marg{label}
\end{definition}
This displays the value of the \gloskey{symbolplural} field
with the first letter converted to upper case.

\begin{definition}[\DescribeMacro\glsaccessdesc]
\cs{glsaccessdesc}\marg{label}
\end{definition}
This displays the value of the \gloskey{desc} field.

\begin{definition}[\DescribeMacro\Glsaccessdesc]
\cs{Glsaccessdesc}\marg{label}
\end{definition}
This displays the value of the \gloskey{desc} field
with the first letter converted to upper case.

\begin{definition}[\DescribeMacro\glsaccessdescplural]
\cs{glsaccessdescplural}\marg{label}
\end{definition}
This displays the value of the \gloskey{descplural} field.

\begin{definition}[\DescribeMacro\Glsaccessdescplural]
\cs{Glsaccessdescplural}\marg{label}
\end{definition}
This displays the value of the \gloskey{descplural} field
with the first letter converted to upper case.

\begin{definition}[\DescribeMacro\glsaccessshort]
\cs{glsaccessshort}\marg{label}
\end{definition}
This displays the value of the \gloskey{short} field.

\begin{definition}[\DescribeMacro\Glsaccessshort]
\cs{Glsaccessshort}\marg{label}
\end{definition}
This displays the value of the \gloskey{short} field with the first
letter converted to upper case.

\begin{definition}[\DescribeMacro\glsaccessshortpl]
\cs{glsaccessshortpl}\marg{label}
\end{definition}
This displays the value of the \gloskey{shortplural} field.

\begin{definition}[\DescribeMacro\Glsaccessshortpl]
\cs{Glsaccessshortpl}\marg{label}
\end{definition}
This displays the value of the \gloskey{shortplural} field with the first
letter converted to upper case.

\begin{definition}[\DescribeMacro\glsaccesslong]
\cs{glsaccesslong}\marg{label}
\end{definition}
This displays the value of the \gloskey{long} field.

\begin{definition}[\DescribeMacro\Glsaccesslong]
\cs{Glsaccesslong}\marg{label}
\end{definition}
This displays the value of the \gloskey{long} field with the first
letter converted to upper case.

\begin{definition}[\DescribeMacro\glsaccesslongpl]
\cs{glsaccesslongpl}\marg{label}
\end{definition}
This displays the value of the \gloskey{longplural} field.

\begin{definition}[\DescribeMacro\Glsaccesslongpl]
\cs{Glsaccesslongpl}\marg{label}
\end{definition}
This displays the value of the \gloskey{longplural} field with the first
letter converted to upper case.

\chapter{Sample Files}
\label{sec:samples}

The following sample files are provided with this package:
\begin{description}
\item[sample.tex] Simple sample file that uses one of the dummy
files provided by the \styfmt{glossaries} package for testing.

\item[sample-mixture.tex] General entries, acronyms and initialisms
all treated differently.

\item[sample-name-font] Categories and attributes are used to
customize the way different entries appear.

\item[sample-abbrv.tex] General abbreviations.

\item[sample-acronym.tex] Acronyms aren't initialisms and don't
expand on \gls{firstuse}.

\item[sample-acronym-desc.tex] Acronyms that have a separate long
form and description.

\item[sample-crossref.tex] Unused entries that have been
cross-referenced automatically are added at the end of the document.

\item[sample-indexhook.tex] Use the index hook to track
which entries have been indexed (and therefore find out
which ones haven't been indexed).

\item[sample-footnote.tex] Footnote abbreviation style that moves
the footnote marker outside of the hyperlink generated by \cs{gls} 
and moves it after certain punctuation characters for neatness.

\item[sample-undef.tex] Warn on undefined entries instead of
generating an error.

\item[sample-mixed-abbrv-styles.tex] Different abbreviation styles
for different entries.

\item[sample-initialisms.tex] Automatically insert dots into
initialisms.

\item[sample-postdot.tex] Another initialisms example.

\item[sample-postlink.tex] Automatically inserting text after
the \gls{linktext} produced by commands like \cs{gls} (outside 
of hyperlink, if present).

\item[sample-header.tex] Using entries in section/chapter headings.

\item[sample-autoindex.tex] Using the \catattr{dualindex} and
\catattr{indexname} attributes to automatically add glossary
entries to the index (in addition to the glossary \gls{locationlist}).

\item[sample-autoindex-hyp.tex] As previous but uses \sty{hyperref}.

\item[sample-nested.tex] Using \ics{gls} within the
value of the \gloskey{name} key.

\item[sample-entrycount.tex] Enable entry-use counting (only index
if used more than $n$ times).

\item[sample-unitentrycount.tex] Enable use of per-unit entry-use counting.

\item[sample-pages.tex] Insert \qt{page} or \qt{pages} before the
location list.

\item[sample-onelink.tex] Using the per-unit entry counting
to only have one hyperlink per entry per page.

\item[sample-altmodifier.tex] Set the default options for
commands like \cs{gls} and add an alternative modifier.

\item[sample-mixedsort.tex] Uses the optional argument
of \cs{makeglossaries} to allow a mixture of \cs{printglossary}
and \cs{printnoidxglossary}.

\item[sample-external.tex] Uses the \catattr{targeturl} attribute
to allow for entries that should link to an external URL
rather than to an internal glossary.

\item[sample-fmt.tex] Provides text-block commands associated
with entries in order to use \cs{glsxtrfmt}.

\item[sample-alias.tex] Uses the \gloskey{alias} key.
(See \sectionref{sec:alias}.)

\item[sample-alttree.tex] Uses the \sty{glossaries-extra-stylemods}
package with the \glostyle{alttree} style (see \sectionref{sec:stylemods}).

\item[sample-alttree-sym.tex] Another \glostyle{alttree} example
that measures the symbol widths.

\item[sample-alttree-marginpar.tex] Another \glostyle{alttree} example
that puts the \gls{numberlist} in the margin.

\item[sample-onthefly.tex] Using on-the-fly commands. Terms with
accents must have the \gloskey{name} key explicitly set.

\item[sample-onthefly-xetex.tex] Using on-the-fly commands
with \XeLaTeX. Terms with UTF-8 characters don't need to
have the \gloskey{name} key explicitly set. Terms that contain
commands must have the \gloskey{name} key explicitly set
with the commands removed from the label.

\item[sample-onthefly-utf8.tex] Tries to emulate the previous
sample file for use with \LaTeX\ through the starred version
of \ics{GlsXtrEnableOnTheFly}. This is a bit iffy and may not
always work. Terms that contain commands must have the 
\gloskey{name} key explicitly set with the commands removed from 
the label.

\item[sample-accsupp.tex] Integrate \sty{glossaries-accsupp}.

\item[sample-prefix.tex] Integrate \sty{glossaries-prefix}.

\item[sample-suppl-main.tex] Uses \gloskey[glsadd]{thevalue} to 
reference a location in the supplementary file
\texttt{sample-suppl.tex}.

\item[sample-suppl-main-hyp.tex] A more complicated version to the
above that uses the \sty{hyperref} package to reference a location
in the supplementary file \texttt{sample-suppl-hyp.tex}.

\end{description}

\chapter{Multi-Lingual Support}
\label{sec:lang}

There's only one command provided by \styfmt{glossaries-extra} 
that you're likely to want to change in your document and that's
\ics{abbreviationsname} (\sectionref{sec:pkgopts}) if you use
the \pkgopt{abbreviations} package option to automatically
create the glossary labelled \texttt{abbreviations}. If this
command doesn't already exist, it will be defined to
\qt{Abbreviations} if \sty{babel} hasn't been loaded, otherwise
it will be defined as \cs{acronymname} (provided by
\styfmt{glossaries}).

You can redefine it in the usual way. For example:
\begin{verbatim}
\renewcommand*{\abbreviationsname}{List of Abbreviations}
\end{verbatim}
Or using \sty{babel} or \sty{polyglossia} captions hook:
\begin{verbatim}
\appto\captionsenglish{%
 \renewcommand*{\abbreviationsname}{List of Abbreviations}%
}
\end{verbatim}

Alternatively you can use the \gloskey[printglossary]{title}
key when you print the list of abbreviations. For example:
\begin{verbatim}
\printabbreviations[title={List of Abbreviations}]
\end{verbatim}
or
\begin{verbatim}
\printglossary[type=abbreviations,title={List of Abbreviations}]
\end{verbatim}

The other fixed text commands are the diagnostic messages, which
shouldn't appear in the final draft of your document.

The \styfmt{glossaries-extra} package has the facility to load
language modules if they exist, but won't warn if they don't.

If you want to write your own language module, you just need to
create a file called
\texttt{glossariesxtr-}\meta{lang}\texttt{.ldf}, where \meta{lang}
is the language name (see the \sty{tracklang} package). For example,
\texttt{glossariesxtr-french.ldf}.

The simplest code for this file is:
\begin{verbatim}
\ProvidesGlossariesExtraLang{french}[2015/12/09 v1.0]

\newcommand*{\glossariesxtrcaptionsfrench}{%
 \def\abbreviationsname{Abr\'eviations}%
}
\glossariesxtrcaptionsfrench

\ifcsdef{captions\CurrentTrackedDialect}
{%
  \csappto{captions\CurrentTrackedDialect}%
  {%
    \glossariesxtrcaptionsfrench
  }%
}%
{%
  \ifcsdef{captions\CurrentTrackedLanguage}
  {%
    \csappto{captions\CurrentTrackedLanguage}%
    {%
      \glossariesxtrcaptionsfrench
    }%
  }%
  {%
  }%
  \glossariesxtrcaptionsfrench
}
\end{verbatim}

You can adapt this for other languages by replacing 
all instances of the language identifier \texttt{french} and
the translated text \verb|Abr\'eviations| as appropriate.
This \texttt{.ldf} file then needs to be put somewhere on \TeX's
path so that it can be found by \styfmt{glossaries-extra}.
You might also want to consider uploading it to CTAN so that
it can be useful to others. (Please don't send it to me. I already
have more packages than I am able to maintain.)

If you additionally want to provide translations for the diagnostic
messages used when a glossary is missing, you need to redefine
the following commands:
\begin{definition}[\DescribeMacro\GlsXtrNoGlsWarningHead]
\cs{GlsXtrNoGlsWarningHead}\marg{label}\marg{file}
\end{definition}
This produces the following text in English:
\begin{quote}
\GlsXtrNoGlsWarningHead{\meta{label}}{\meta{file}}
\end{quote}

\begin{definition}[\DescribeMacro\GlsXtrNoGlsWarningEmptyStart]
\cs{GlsXtrNoGlsWarningEmptyStart}
\end{definition}
This produces the following text in English:
\begin{quote}
\GlsXtrNoGlsWarningEmptyStart
\end{quote}

\begin{definition}[\DescribeMacro\GlsXtrNoGlsWarningEmptyMain]
\cs{GlsXtrNoGlsWarningEmptyMain}
\end{definition}
This produces the following text in English:
\begin{quote}
\GlsXtrNoGlsWarningEmptyMain
\end{quote}

\begin{definition}[\DescribeMacro\GlsXtrNoGlsWarningEmptyNotMain]
\cs{GlsXtrNoGlsWarningEmptyNotMain}\marg{label}
\end{definition}
This produces the following text in English:
\begin{quote}
\GlsXtrNoGlsWarningEmptyNotMain{\meta{label}}
\end{quote}

\begin{definition}[\DescribeMacro\GlsXtrNoGlsWarningCheckFile]
\cs{GlsXtrNoGlsWarningCheckFile}\marg{file}
\end{definition}
This produces the following text in English:
\begin{quote}
\GlsXtrNoGlsWarningCheckFile{\meta{file}}
\end{quote}

\begin{definition}[\DescribeMacro\GlsXtrNoGlsWarningMisMatch]
\cs{GlsXtrNoGlsWarningMisMatch}
\end{definition}
This produces the following text in English:
\begin{quote}
\GlsXtrNoGlsWarningMisMatch
\end{quote}

\begin{definition}[\DescribeMacro\GlsXtrNoGlsWarningNoOut]
\cs{GlsXtrNoGlsWarningNoOut}\marg{file}
\end{definition}
This produces the following text in English:
\begin{quote}
\GlsXtrNoGlsWarningNoOut{\meta{file}}
\end{quote}

\begin{definition}[\DescribeMacro\GlsXtrNoGlsWarningTail]
\cs{GlsXtrNoGlsWarningTail}
\end{definition}
This produces the following text in English:
\begin{quote}
\GlsXtrNoGlsWarningTail
\end{quote}

\begin{definition}[\DescribeMacro\GlsXtrNoGlsWarningBuildInfo]
\cs{GlsXtrNoGlsWarningBuildInfo}
\end{definition}
This is advice on how to generate the glossary files.
See the documented code (\texttt{glossaries-extra-code.pdf})
for further details.

\begin{definition}[\DescribeMacro\GlsXtrNoGlsWarningAutoMake]
\cs{GlsXtrNoGlsWarningAutoMake}\marg{label}
\end{definition}
This is the message produced when the \pkgopt{automake} option
is used, but the document needs a rerun or the shell escape
setting doesn't permit the execution of the external application.
This command also generates a warning in the transcript file.
See the documented code for further details.

\printglossaries
\PrintIndex

\end{document}